Analytics configuration support using ConfigMap
You can use NetScaler Observability Exporter to export metrics and transactions from NetScaler CPX, MPX, or VPX and analyze the exported data to get meaningful insights. The NetScaler Observability Exporter support is enabled with in the NetScaler Ingress Controller configuration. You can now enable the NetScaler Observability Exporter configuration with in the NetScaler Ingress Controller using a ConfigMap.
Supported environment variables for analytics configuration using ConfigMap
You can configure the following parameters under NS_ANALYTICS_CONFIG
using a ConfigMap:
-
distributed_tracing
: This variable enables or disables OpenTracing in NetScaler and has the following attributes:-
enable
: Set this value totrue
to enable OpenTracing. The default value isfalse
. -
samplingrate
: Specifies the OpenTracing sampling rate in percentage. The default value is 100.
-
-
endpoint
: Specifies the IP address or DNS address of the analytics server.-
server
: Set this value as the IP address or DNS address of the server. -
service
: Specifies the IP address or service name of the NetScaler Observability Exporter service depending on whether the service is running on a virtual machine or as a Kubernetes service. If the NetScaler Observability Exporter instance is running on a virtual machine this parameter specifies the IP address. If the NetScaler Observability Exporter instance is running as a service in the Kubernetes cluster, this parameter specifies the instance as namespace/service name.
-
-
timeseries
: Enables exporting time series data from NetScaler. You can specify the following attributes for time series configuration.-
port
: Specifies the port number of time series end point of the analytics server. The default value is 5563. -
metrics
: Enables exporting metrics from NetScaler.-
enable
: Set this value totrue
to enable sending metrics. The default value isfalse
. -
mode
: Specifies the mode of metric endpoint. The default value isavro
.
-
-
auditlogs
: Enables exporting audit log data from NetScaler.-
enable
: Set this value totrue
to enable audit log data. The default value isfalse
.
-
-
events
: Enables exporting events from the NetScaler.-
enable
: Set this value totrue
to enable exporting events. The default value isfalse
.
-
-
-
transactions
: Enables exporting transactions from NetScaler.-
enable
: Set this value totrue
to enable sending transactions. The default value isfalse
. -
port
: Specifies the port number of transactional endpoint of analytics server. The default value is 5557.
-
The following configurations cannot be changed while the NetScaler Ingress Controller is running and you need to reboot the NetScaler Ingress Controller to apply these settings.
- server configuration (endpoint)
- port configuration (time series)
- port configuration (transactions)
You can change other ConfigMap settings at runtime while the NetScaler Ingress Controller is running.
Note:
When the user specifies value for a service as
namespace/service name
, NetScaler Ingress Controller derives the endpoint associated to that service and dynamically bind them to the transactional service group in NetScaler tier-1 ADC . If a user specifies the value for a service as IP address, the IP address is direclty bound to the transactional service group. NetScaler Ingress Controller is enhanced to create default web or TCP based analytics profiles and bind them to the logging virtual server. The default analytics profiles are bound to all load balancing virtual servers of applications if the NetScaler Observability Exporter is enabled in the cluster. If the user wants to change the analytics profile, they can use theanalyticsprofile
annotation.
The attributes of NS_ANALYTICS_CONFIG
should follow a well-defined schema. If any value provided does not confirm with the schema, then the entire configuration is rejected. For reference, see the schema file ns_analytics_config_schema.yaml.
Creating a ConfigMap for analytics configuration
This topic provides information on how to create a ConfigMap for analytics configuration.
Create a YAML file cic-configmap.yaml
with the required key-value pairs in the ConfigMap.
apiVersion: v1
kind: ConfigMap
metadata:
name: cic-configmap
labels:
app: citrix-ingress-controller
data:
LOGLEVEL: 'info'
NS_PROTOCOL: 'http'
NS_PORT: '80'
NS_HTTP2_SERVER_SIDE: 'ON'
NS_ANALYTICS_CONFIG: |
distributed_tracing:
enable: 'false'
samplingrate: 100
endpoint:
server: '1.1.1.1'
service: 'default/coe-kafka'
timeseries:
port: 5563
metrics:
enable: 'false'
mode: 'avro'
auditlogs:
enable: 'false'
events:
enable: 'false'
transactions:
enable: 'true'
port: 5557
For more information on how to configure ConfigMap support on the NetScaler Ingress Controller, see configuring ConfigMap support for the NetScaler Ingress Controller.
Schema for NS_ANALYTICS_CONFIG
Following is the schema for NS_ANALYTICS_CONFIG
. The attributes should confirm with this schema.
type: map
mapping:
NS_ANALYTICS_CONFIG:
required: no
type: map
mapping:
endpoint:
required: yes
type: map
mapping:
server:
required: yes
type: str
distributed_tracing:
required: no
type: map
mapping:
enable:
required: yes
type: str
enum:
- 'true'
- 'false'
samplingrate:
required: no
type: int
range:
max: 100
min: 0
timeseries:
required: no
type: map
mapping:
port:
required: no
type: int
metrics:
required: no
type: map
mapping:
enable:
required: yes
type: str
enum:
- 'true'
- 'false'
mode:
required: yes
type: str
enum:
- prometheus
- avro
- influx
auditlogs:
required: no
type: map
mapping:
enable:
required: yes
type: str
enum:
- 'true'
- 'false'
events:
required: no
type: map
mapping:
enable:
required: yes
type: str
enum:
- 'true'
- 'false'
transactions:
required: no
type: map
mapping:
enable:
required: yes
type: str
enum:
- 'true'
- 'false'
port:
required: no
type: int