Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Network Devices

    AppFormix supports monitoring of metrics from network devices.

    AppFormix data model has object types for network devices, including the topology of connections between devices. The data model is configured using the REST APIs. The Ansible playbooks can read the topology information from a JSON file and configure the AppFormix Platform.

    For each network device, metrics are available for charts and alarms. Metric collection can be performed using SNMP or Junos Telemetry Interface (JTI), depending on the capability of the network device. SNMP metric collection is supported using SNMP versions 2c and 3. JTI metrics collection currently can be enabled for devices running a supported version of Junos. See Table 1 for the supported version list.

    Configuration Steps

    To configure AppFormix to monitor network devices, a few variables must be defined in group_vars/all before the Ansible playbook(s) are executed. The variables to define are:

        appformix_network_device_monitoring_enabled: true
        network_device_file_name: /path/to/network_device_file_name.json
        appformix_plugins:
            - { plugin_info: 'certified_plugins/snmp_network_device_usage.json' }
            - { plugin_info: 'certified_plugins/snmp_network_device_routing_engine.json' }
            - { plugin_info: 'certified_plugins/ifxtable_config.json' }
            - { plugin_info: 'certified_plugins/device_config.json' }
            - { plugin_info: 'certified_plugins/tcp_mib.json' }
            - { plugin_info: 'certified_plugins/juniper_alarm.json' }
            - { plugin_info: 'certified_plugins/jti_network_device_usage.json' }

    Select the plug-ins to enable based on the metrics and methods (SNMP, JTI) that you want to collect. More details about the plug-ins and the network_device_file_name are described in the following sections. See Network Device Monitoring with SNMP, Network Device Monitoring with JTI, and Format of the Network Device Topology File.

    Network Device Monitoring with SNMP

    Metrics can be collected from network devices using SNMP. If Contrail Analytics is present and AppFormix is configured with service details to connect to Contrail APIs, then AppFormix will automatically import network topology from Contrail. If Contrail Analytics is not present, then you must configure network topology using AppFormix REST APIs or with a file provided to Ansible playbooks.

    Enable SNMP Collection Plug-In

    To collect network device metrics by means of SNMP, you must first configure AppFormix to use the SNMP network device plug-ins for the OIDs to be collected. Include the plug-in descriptor in the appformix_plugins variable in group_vars/all.

    This variable must be initialized at the time of AppFormix Platform installation.

    appformix_plugins:
        - { plugin_info: 'certified_plugins/snmp_network_device_usage.json' }
        - { plugin_info: 'certified_plugins/snmp_network_device_routing_engine.json' }
        - { plugin_info: 'certified_plugins/ifxtable_config.json' }
        - { plugin_info: 'certified_plugins/device_config.json' }
        - { plugin_info: 'certified_plugins/tcp_mib.json' }
        - { plugin_info: 'certified_plugins/juniper_alarm.json' }

    For SNMP-based polling using plug-ins, the polling interval is 60 seconds.

    Network Device Monitoring with Contrail Analytics

    Contrail Analytics uses Link Layer Discovery Protocol (LLDP) to discover the network topology. AppFormix provides a Contrail adapter to interface with Contrail APIs. The Contrail adapter discovers underlay and overlay network topology from Contrail Analytics and configures the data model in the AppFormix Platform. The Contrail adapter also collects network metrics from the Contrail APIs and sends the data to the AppFormix Platform.

    Network device monitoring is enabled automatically when Contrail Service Monitoring is configured. To configure Contrail Service Monitoring, see Service Monitoring.

    Contrail Analytics collects metrics from network devices using SNMP. For the SNMP configuration details, refer to Contrail documentation.

    Network Device Monitoring without Contrail Analytics

    If Contrail is not present, then AppFormix Agent collects metrics directly from network devices using SNMP. AppFormix Agent polls SNMP metrics every 60 seconds.

    The list of devices and the topology can be configured using the AppFormix REST APIs or provided in a network device topology file as input to the Ansible playbooks. The format of the network device topology file is described below.

    For SNMP, versions 2c and 3 of the protocol are supported. All metrics present in the SNMP OID IF-MIB::ifTable are available for charts and alarms in AppFormix. For Juniper devices, routing engine CPU, memory, and temperature metrics (defined in the Juniper MIB file named mib-jnx-chassis.txt) are available for charts and alarms.

    Network Device Monitoring with JTI

    With Junos Telemetry Interface (JTI), a network device streams metrics to AppFormix Agent. AppFormix Agent performs all of the necessary network device configuration to enable JTI streaming telemetry. You only need to provide the device address and credentials in a network device topology file or with the AppFormix REST API. For each device configured in AppFormix, AppFormix Agent configures a network device to stream metrics to Agent on UDP port 42596 with an interval of 60 seconds.

    AppFormix Agent supports the following JTI sensors:

    - `/junos/system/linecard/cpu/memory/`
    - `/junos/system/linecard/firewall/`
    - `/junos/system/linecard/interface/`
    - `/junos/system/linecard/interface/logical/usage/`
    - `/junos/system/linecard/npu/memory/`
    - `/junos/system/linecard/npu/utilization/`
    - `/junos/system/linecard/packet/usage/`

    Enable JTI Collection Plug-In

    To collect network device metrics by means of JTI, you must first configure AppFormix to use the JTI network device plug-in. Include the plug-in descriptor in the appformix_plugins variable in group_vars/all.

    This variable must be initialized at the time of the AppFormix Platform installation.

    appformix_plugins:
        - { plugin_info: 'certified_plugins/jti_network_device_usage.json' }
    

    Format of the Network Device Topology File

    To provide the list of network devices, create a network device topology file. Tools like LLDP can be used to generate the device list, interface connections, and topology information. Alternately, this file can be written by hand from network inventory.

    Specify the network device topology file as an input to the Ansible playbooks. In group_vars/all, set variable network_device_file_name.

    For example:

    network_device_file_name: /path/to/network_device_file_name.json

    The file format is JSON. Multiple network devices can be added to the JSON file. The schema of the network device topology file used by the Ansible playbook follows this sample that shows three different devices. In the sample configuration, a different protocol is used to collect metrics from each of the three devices: SNMP version 2c, SNMP version 3, and JTI. Table 1 explains the fields in the sample configuration.

    {
      "NetworkDeviceList": [
        {
          "NetworkDevice": {
            "MetaData": {
              "SnmpConfig": {
                "Version": "2c",
                "Community": "public",
                "OIDList": ["IF-MIB::ifTable"]
              }
            },
            "ManagementIp": "10.1.1.2",
            "Name": "qfx1",
            "NetworkDeviceId": "qfx1",
            "Source": "user.snmp",
            "ChassisType": "tor",
            "ConnectionInfo": [
              {
                "local_interface_name": "et-0/1/0",
                "remote_system_id": "qfx2"
                "remote_interface_name": "et-0/0/1",
              }
            ]
          }
        },
        {
          "NetworkDevice": {
            "MetaData": {
              "SnmpConfig": {
                "Version": "3",
                "Username": "user1",
                "Password": "password1",
                "Level": "authPriv",
                "Protocol": "SHA"
                "PrivProtocol": "DES",
                "PrivKey": "privacy protocol pass phrase",
                "OIDList": ["IF-MIB::ifTable"]
              }
            },
            "ManagementIp": "10.1.1.3",
            "Name": "qfx2",
            "NetworkDeviceId": "qfx2",
            "Source": "user.snmp",
            "ChassisType": "spine",
            "ConnectionInfo": [
              {
                "local_interface_name": "et-0/0/1",
                "remote_system_id": "qfx1"
                "remote_interface_name": "et-0/1/0",
              },
              {
                "local_interface_name": "et-0/0/2",
                "remote_interface_name": "et-0/1/0",
                "remote_system_id": "qfx3"
              }
            ]
          }
        },
        {
          "NetworkDevice": {
            "MetaData": {
              "JtiConfig": {
                "Version": "17.2R1",
                "Username": "user2",
                "Password": "password2",
                "ReportRate": 60,
                "Dscp": 20,
                "DeviceLocalPort": 21112,
                "SensorList": [
                  {
                    "Name": "Interface_Sensor",
                    "Resource": "/junos/system/linecard/interface/"
                  }
                ]
              }
            },
            "ManagementIp": "10.1.1.4",
            "Name": "qfx3",
            "NetworkDeviceId": "qfx3",
            "Source": "user.jti",
            "ChassisType": "tor",
            "ConnectionInfo": [
              {
                "local_interface_name": "et-0/1/0",
                "remote_system_id": "qfx2"
                "remote_interface_name": "et-0/0/2",
              }
            ]
          }
        }
      ]
    }

    Table 1: Explanation of Fields in Network Device Topology Configuration JSON File

    Field

    Description

    NetworkDevice.Name

    Display name of this network device. Used in Dashboard.

    NetworkDevice.NetworkDeviceId

    Unique identifier for this network device. Must not include “.” in the value.

    NetworkDevice.ConnectionInfo

    A list of interfaces. Each entry in the list is a dictionary that describes the connection from a local interface to an interface on a remote device.

    NetworkDevice.ConnectionInfo.remote_system_id

    NetworkDeviceId of a remote network device that is connected to this network device.

    NetworkDevice.ConnectionInfo.remote_interface_name

    Name of interface on remote network device that forms a connection between this network device and remote network device.

    NetworkDevice.ConnectionInfo.local_interface_name

    Name of local interface that forms a connection between this network device and remote network device.

    NetworkDevice.MetaData.JtiConfig.SensorList

    List of JTI sensors to collect from a device. Name field cannot have spaces in the value. You can also update the sensor list in AppFormix Dashboard by selecting Settings > Network Devices > JTI Devices.

    NetworkDevice.MetaData.SnmpConfig.OIDList

    List of OIDs to collect from a device. Every OID in the list must be collected by one of the configured plug-ins. OIDs collected by AppFormix certified plug-ins include: IF-MIB::ifTable, IF-MIB::ifXTable, TCP-MIB::tcp.

    For Juniper devices, AppFormix has three additional certified plug-ins which include the following three OIDs: 1.3.6.1.4.1.2636.3.4.2, enterprises.2636.3.1.13.1, and APPFORMIX_ROUTING_ENGINE_MIB. You can also update the sensor list in AppFormix Dashboard by selecting Settings > Network Devices > SNMP Devices.

    The following fields have a fixed list of valid choices:

    NetworkDevice.ChassisType

    coreswitch, spine, tor

    NetworkDevice.MetaData.SnmpConfig.Version

    2c, 3

    NetworkDevice.MetaData.SnmpConfig.Level

    noAuthNoPriv, authNoPriv, authPriv

    NetworkDevice.MetaData.SnmpConfig.Protocol

    MD5, SHA

    NetworkDevice.MetaData.SnmpConfig.PrivProtocol

    AES, DES

    NetworkDevice.MetaData.JtiConfig.Version

    17.3R1, 17.2R1, 15.1F7, 15.1F6, 15.1F5

    NetworkDevice.Source

    user.jti, user.snmp

    The following fields have a default value:

    NetworkDevice.MetaData.JtiConfig.Dscp

    20

    NetworkDevice.MetaData.JtiConfig.ReportRate

    60

    NetworkDevice.MetaData.JtiConfig.DeviceLocalPort

    21112

    Note: Included in the release bundle is a sample configuration file sample_network_device_config.json.

    Packages Needed for SNMP Network Device Monitoring

    The SNMP plug-in is executed by Agent installed on hosts in the appformix_platform host aggregate. Some dependencies are required for plug-in execution. The AppFormix playbooks install the dependencies if the appformix_network_device_monitoring_enabled flag is set in the group_vars/all file at the time the AppFormix playbooks are executed.

    appformix_network_device_monitoring_enabled: true

    The following dependencies are installed by the playbooks, depending on the host operating system of the AppFormix Platform host. If troubleshooting network device monitoring, verify that the following packages are present on the appformix_platform hosts.

    For Ubuntu and Debian:

    • snmp 5.7.2

    • snmp-mibs-downloader 1.1

    For Centos and Red Hat Enterprise Linux:

    • net-snmp 5.7.2

    • net-snmp-utils 5.7.2

    Packages Needed for JTI Network Device Monitoring

    The AppFormix Agent(s) running on hosts in appformix_platform aggregate receives and analyzes JTI metrics. The following dependencies are required on hosts in the appformix_platform aggregate to support receiving and analyzing JTI metrics.

    sudo apt-get install netcat
    sudo apt-get install protobuf-compiler
    sudo apt-get install libprotobuf-dev
    

    These packages are needed for receiving and decoding JTI messages.

    Modified: 2018-05-23