Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Custom Sensors for JTI, gRPC, and NETCONF

 

Overview

Contrail Insights includes several built-in JTI, gRPC, and NETCONF sensors. To enable these sensors, you can add the sensor information to the network device configuration file or from UI.

Contrail Insights also allows you to add new JTI, gRPC, and NETCONF sensors into the system. You need to supply a configuration file, set the variables in Ansible group_vars, and then re-run the playbook. The Contrail Insights Ansible playbook will deploy the new sensor configurations and start parsing data for the new sensor.

Starting with Contrail Insights version 3.3.0, NETCONF custom command support is added.

Sensor Configuration File

The sensor configuration file you provide for Contrail Insights needs to have certain fields.

For example: sample_jti_grpc_netconf_config.py

This sample configuration file indicates and describes all the required fields for a JTI, gRPC, and NETCONF configuration file. Contrail Insights Agent uses the parse_data function supplied in the configuration file to parse out the data received from the data. Then Contrail Insights pushes the output of the parser function to both event_stream and Contrail Insights DataManager.

Note that the input variable version is needed in some scenarios because data format might be different across different device OS versions. You can implement the parse_data function with multiple parsers based on the version variable input.

Enable Sensors Through Contrail Insights Ansible Playbook

After completing the configuration file, you need to add the sensor from the Contrail Insights Ansible playbook.

Copy your sensor configuration file to the Contrail Insights Ansible directory and add the following variables in group_vars/all:

config_file.py should be the name of the sensor configuration file and type_of_sensor should be either “GRPC” if it is a gRPC sensor, “JTI” if it is a JTI sensor, or "NETCONF" if it is a NETCONF sensor.

Then re-run the Contrail Insights Ansible playbook to add the new sensors into Contrail Insights. Contrail Insights copies your configuration file to all the Agents and then updates certified_plugins/grpc_network_device_usage.json and certified_plugins/jti_network_device_usage.json and certified_plugins/netconf_commandline.json for you.

Add More Metrics to Existing JTI, gPRC, and NETCONF Sensors

Contrail Insights has several built-in JTI, gRPC, and NETCONF sensors. To add more metrics for these sensors, instead of creating a new sensor_config file, you modify the existing sensor configuration file for these sensors.

To add metrics to existing JTI and gRPC sensors:

  1. Starting with AppFormix version 3.1, the built-in sensor_config file and the dependent files can be found in the /opt/appformix/manager/tailwind_manager/ folder in every Agent. Copy these files from the Agent.
  2. Update the sensor_config file by adding more metrics, then modifying the parse_data function to parse data for these new metrics.
  3. Place the updated files in your Ansible directory and re-run the playbook with appformix_control_plane_plugin_config_files defined correctly in group_vars/all.
Note

If your AppFormix version is earlier than 3.1, send an email to appformix-support and request the sensor configuration file for built-in JTI and gRPC sensors.

Release History Table
Release
Description
Starting with Contrail Insights version 3.3.0, NETCONF custom command support is added.