Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

Custom SNMP Plug-Ins

 

AppFormix can monitor SNMP metrics of network devices in your data center. AppFormix includes several supported SNMP plug-ins shipped with the product including ifTable, ifXTable, and TCP plug-ins for network devices for all vendors and three more plug-ins for Juniper devices. In addition to the AppFormix built-in SNMP plug-ins, AppFormix allows you to create your own custom SNMP plug-ins. The custom SNMP plug-ins allow you to define the SNMP MIBs and metrics that you want to monitor. The only thing you need is to define a configuration file for the SNMP MIB you want to monitor.

Note

Confirm that you installed the related MIBs on the appformix_network_agent nodes before you generate the plug-ins.

Sample Custom SNMP Plug-In Configuration File

The sample configuration file is listed. You can also find this sample file in the AppFormix release bundle sample_snmp_config.py:

Table 1 describes the fields.

Table 1: SNMP Plug-In Configuration File Field Descriptions

Field

Description

SNMP_OID

The OID of SNMP MIB you want to monitor.

SNMP_MIB_KEYS

The metrics in this MIB are metrics that you want to monitor. The key needs to match the key received from the SNMP command.

PLUGIN_TYPE

There are three types of SNMP plug-ins:

snmp_network_deviceRefers to tabular MIBs which define multiple related object instances grouped in MIB tables. For example, ifTable defined the metrics for a list of interfaces on this device.
snmp_device_infoRefers to singular MIBs which define a single object instance. For example, 1.3.6.1.2.1.1.7 (OID for sysServices). You can specify by OID and name it.
snmp_device_attributeRefers to the case where there is not a field to determine the tag for each entry in tabular MIBs. Instead, the sample SNMP output of these MIBs are metric_name .x.x.x.x = value where x.x.x.x is the tag name. For instance, OID 1.3.6.1.4.1.9.9.42.1.1.8.1 (OID for CISCO-RTTMON-MIB)

SNMP_TAG_KEY

This field is required for tabular (plugin_type=snmp_network_device) MIBs to determine the tag for each entry of the SNMP output. This field is not needed for singular (plugin_type=device_info) MIBs .

AGGREGATE_ID

Must be set to “appformix_network_agents”.

PLUGIN_PREFIX

(Optional) This field is the prefix of the metrics shown in the AppFormix Dashboard. For example, for OID IF-MIB::ifTable, the prefix could be interface.

CalculationMethod

Prior to release 2.16, this field was called CalculationType. This denotes how AppFormix calculates this metric (rate/value).

ENTITY_TYPE

A list of strings that indicates what this MIBs data represents. If it reports interface data, ENTITY_TYPE=['interface'].

Configure Custom SNMP Plug-Ins in AppFormix

After you create the configuration file for your custom SNMP plug-in, the next step is to post your plug-in to AppFormix. Copy your configuration file to your AppFormix Ansible directory and include the plug-in descriptor in the appformix_custom_snmp_plugins variable in group_vars/all. This variable must be initialized at the time of the AppFormix Platform installation. Save the configuration file as sample_snmp_config.py in your installation directory.

Then AppFormix will take your configuration file, generate the plug-in configuration JSON file and install this plug-in to AppFormix during the AppFormix Platform installation.

Install MIBs in AppFormix Network Agents from Ansible

When adding or enabling a new plug-in in AppFormix, you need to install the corresponding MIBs in your AppFormix Network Agents. The AppFormix Ansible script helps you install the MIBs in both AppFormix Controller nodes and AppFormix Network Agents.

Set the following variable in group_vars/all:

Add the needed MIB files (.txt) in a folder and AppFormix will install all the MIBs from that folder in your AppFormix Controller nodes and AppFormix Network Agents by copying those MIB files to the location set in the platform_mib_location variable. You can change this variable in group_vars/all. The default value is /usr/share/snmp/mibs/.

Related Documentation