ADC

Export metrics directly from NetScaler to Splunk

NetScaler now supports direct export of metrics to Splunk in the JSON format. NetScaler provides rich metrics to monitor your application health and application security health. By exporting the metrics provided by NetScaler to Splunk, you can visualize the metrics and get meaningful insights.

Configure exporting metrics directly from NetScaler to Splunk

To configure the export of metrics you must perform the following steps:

  1. Configure an HTTP event collector (HEC) on Splunk.
  2. Create a service for Splunk on NetScaler.
  3. Create a time series analytics profile for direct export of metrics to Splunk.

Configure an HTTP event collector on Splunk

You can forward metrics to Splunk by configuring an HTTP event collector. Configuring the HTTP event collector involves creating an authentication token and associating a metric index with the token where metrics are sent, and setting the HTTP port number.

See the Splunk documentation for information on how to configure the HTTP event collector.

Once you have configured the HTTP event collector, copy the authentication token and save it for reference. You need to specify this token while configuring the analytics profile on NetScaler.

Create a collector service for Splunk on NetScaler

You can create a collector service on NetScaler to collect and export metrics from NetScaler to Splunk. Do the following to create a collector service for Splunk.

add service <collector> <splunk-server-ip-address> <protocol> <port>

Example:

add service splunk_service 10.102.34.155 HTTP 8088

In this configuration:

  • ip-address: Specify the Splunk server IP address.
  • collector-name: Specify the collector.
  • protocol: Specify the protocol as HTTP or HTTPS
  • port: Specify the port number of the Splunk HTTP event collector.

Configure a time series analytics profile on NetScaler

Do the following to create a time series analytic profile on NetScaler. While creating the time series profile, enable the option for metrics collection and specify details such as Splunk authentication token, name of the collector, output mode, and URL. By default, the time series analytics data is exported every 30 seconds but you can configure it in the range of 30–300 seconds using the metrics frequency parameter.

  1. Create a time series analytics profile.

    add analytics profile <profile-name> -type timeseries -metrics enabled  -outputMode json -collectors <collector-name>  -analyticsAuthToken <"auth-token"> -analyticsEndpointUrl <endpoint-url>
    

    In this configuration, auth_token must be configured as “Splunk <auth token generated in Splunk HTTP event collector>”.

    Example:

        add analytics profile splunk_profile -type timeseries -metrics enabled -outputMode json -collectors splunk_service -analyticsAuthToken "Splunk 1234-5678-12345" -analyticsEndpointUrl /services/collector
    

    In this configuration:

    • metrics: Specify the value as enabled to enable metrics collection.
    • collectors: Specify the collector service created for Splunk.
    • analyticsAuthToken: Specify the authentication token to be included in the authorization header while sending metrics to Splunk. The format is “Splunk auth-token”. Here, auth-token is the authentication token created on the Splunk server while configuring the HTTP event collector.
    • analyticsEndpointUrl : Configure this value as /services/collector to send metrics to the default index associated with the configured auth token. To redirect metrics to a specific index, specify the index name in the URL (/services/collector?index=).

    Note:

    You can modify the time series analytics profile parameters using the set analytics profile command.

  2. Verify the analytics profile configuration using the show analytics profile command.

    # show analytics profile splunk_profile
    
    1)   Name: splunk_profile
        Collector: splunk_service
        Profile-type: timeseries
            Output Mode: json
            Metrics: ENABLED
            Schema File: schema.json
            Metrics Export Frequency: 30
            Events: DISABLED
            Auditlog: DISABLED
            Serve mode: Push
        Authentication Token: <auth-token>
        Endpoint URL: /services/collector
        Endpoint Content-type:
        Endpoint Metadata:
        Reference Count: 0
    

Once the configuration is successful, metrics are sent as HTTP payloads to Splunk and you can view it on the Splunk application user interface.

Export metrics directly from NetScaler to Splunk