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. You can now enable the NetScaler Observability Exporter configuration within the NetScaler Ingress Controller using a ConfigMap.
Schema for NS_ANALYTICS_CONFIG
The schema for NS_ANALYTICS_CONFIG
is as follows. The attributes in the ConfigMap must conform to this schema.
type: map
mapping:
NS_ANALYTICS_CONFIG:
required: false
type: map
mapping:
endpoint:
required: false
type: map
mapping:
metrics:
required: false
type: map
mapping:
service:
required: false
type: str
transactions:
required: false
type: map
mapping:
service:
required: false
type: str
distributed_tracing:
required: false
type: map
mapping:
enable:
required: true
type: str
enum:
- 'true'
- 'false'
samplingrate:
required: false
type: int
range:
max: 100
min: 0
timeseries:
required: false
type: map
mapping:
port:
required: false
type: int
metrics:
required: false
type: map
mapping:
enable:
required: true
type: str
enum:
- 'true'
- 'false'
mode:
required: true
type: str
enum:
- prometheus
- avro
- influx
export_frequency:
required: false
type: int
range:
max: 300
min: 30
schema_file:
required: false
type: str
enable_native_scrape:
required: false
type: str
enum:
- 'true'
- 'false'
auditlogs:
required: false
type: map
mapping:
enable:
required: true
type: str
enum:
- 'true'
- 'false'
events:
required: false
type: map
mapping:
enable:
required: true
type: str
enum:
- 'true'
- 'false'
transactions:
required: false
type: map
mapping:
enable:
required: true
type: str
enum:
- 'true'
- 'false'
port:
required: false
type: int
<!--NeedCopy-->
Notes:
- Starting from NSIC release 2.0.x, the
endpoint.server
parameter has been replaced with theendpoint.metrics.service
parameter.- Starting from NSIC release 2.0.x, the
endpoint.service
parameter has been replaced with theendpoint.transactions.service
parameter.- If you are upgrading from any NSIC Helm chart version 1.x to 2.x, note down the
metrics_endpoint
(analyticsConfig.endpoint.server) andtransactions_endpoint
(analyticsConfig.endpoint.service) values, and then upgrade using the following set parameters in Helm upgrade:--set analyticsConfig.endpoint.metrics.service=<metrics_endpoint>,analyticsConfig.endpoint. transactions.service=<transactions_endpoint>
.
Creating a ConfigMap for analytics configuration
You can create a ConfigMap for analytics configuration during NSIC installation or upgrade using the Helm chart or the NetScaler Operator. For information about the parameters that need to be configured to create a ConfigMap, see Configuration.
Following is a sample values.yaml for a ConfigMap. For information on supported variables, see Supported environment variables for analytics configuration using ConfigMap.
analyticsConfig:
required: true
distributedTracing:
enable: true
samplingrate: 100
endpoint:
metrics:
service: "1.1.1.1"
transactions:
service: "1.1.1.2"
timeseries:
port: 5563
metrics:
enable: true
mode: 'prometheus'
exportFrequency: 30
schemaFile: schema.json
enableNativeScrape: false
auditlogs:
enable: true
events:
enable: true
transactions:
enable: true
port: 5557
<!--NeedCopy-->
For more information on how to configure ConfigMap support on the NetScaler Ingress Controller, see Configuring ConfigMap support for the NetScaler Ingress Controller.
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.
-
For more information, see Distributed tracing.
-
endpoint
: Specifies the IP address or DNS address of the observability endpoint.-
metrics
:-
service
: Set this value as the IP address or DNS address of the observability endpoint.
-
-
transactions
:-
service
: Set this value as the IP address ornamespace/service
of the NetScaler Observability Exporter service.
-
-
-
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 possible values areavro
andprometheus
.
-
-
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 the transactional endpoint of analytics server. The default value is 5557.
-
You can change the ConfigMap settings at runtime while the NetScaler Ingress Controller is running.
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.