Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Configure Network Device from JSON File

Overview

To add network devices to Contrail Insights, you can draft a network device JSON file and set the following variable in group_vars/all:

Multiple network devices can be added to the JSON file. This file can be written manually from the network inventory. Alternatively, tools like LLDP can be used to generate the device names, interface connections, and topology information.

The network device topology file should adhere to the following example schema(s). Note that a device can also be configured with multiple sources (SNMP, JTI, gRPC and NETCONF). Following is one example for each source. Note that only user.snmp, user.jti, user.grpc, and user.netconf are accepted in the Source field and a period ('.') cannot be specified in the NetworkDeviceId field.

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

Network Device JSON Example for SNMP Device

Some fields have a fixed list of valid choices:

  • NetworkDevice.MetaData.SnmpConfig.Version: "2c", "3"

  • NetworkDevice.MetaData.SnmpConfig.Protocol: "MD5", "SHA"

  • NetworkDevice.MetaData.SnmpConfig.Level: "noAuthNoPriv", "authNoPriv", "authPriv"

  • NetworkDevice.MetaData.SnmpConfig.PrivProtocol: "AES", "DES"

The field MetaData.SnmpConfig.PollInterval is optional. You can input a value which is a multiple of 60. It determines the period that Contrail Insights will poll for SNMP data from the device (units is in seconds). By default, this value is set to 60 seconds.

Following are the possible values for the field MetaData.SnmpConfig.OIDList:

  • "TCP-MIB::tcp"

  • "IF-MIB::ifXTable"

  • "IF-MIB::ifTable"

  • "UDP-MIB::udp"

  • "UCD-SNMP-MIB::memory"

  • "IP-MIB::ipInReceives"

  • "IPV6-MIB::ipv6IfTable"

  • "JUNIPER-FIREWALL-MIB::jnxFWCounterDisplayFilterName"

  • "NETWORK_DEVICE_SYSTEM_METRICS_MIB"

  • "JUNIPER-PFE-MIB::jnxPfeMemoryUkernFreePercent"

  • "JUNIPER-SUBSCRIBER-MIB::jnxSubscriberTotalCount"

  • "JUNIPER-IPv6-MIB::jnxIpv6StatsReceives"

  • "1.3.6.1.4.1.2636.3.4.2"

  • "enterprises.2636.3.1.13.1"

  • "enterprises.2636.3.39.1.12"

  • "1.3.6.1.2.1.25.2"

These are all of the MIBs that Contrail Insights supports out of the box. To enable additional SNMP MIB monitoring, see Custom SNMP Plug-Ins for more information.

Note:

SNMP Traps are automatically enabled on SNMP devices if the SNMP Trap plug-in is enabled. The SnmpEngineId field is needed for SNMP Trap v3.

Network Device JSON Example for JTI Device

Following are the possible values for the field MetaData.JtiConfig.SensorList:

  • "/junos/system/linecard/cpu/memory/"

  • "/junos/system/linecard/fabric/"

  • "/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/optics/"

  • "/junos/system/linecard/packet/usage/"

  • "/junos/system/linecard/qmon/"

These are all of the JTI UDP sensors Contrail Insights supports out of the box. To enable additional JTI sensor monitoring, see Custom Sensors for JTI, gRPC, and NETCONF for more information.

Note that the variables ForwardingClass, DeviceLocalPort, Dscp, ReportRate, PayloadSize, and LocalAddress are optional variables. DeviceLocalPort will default to 21112, Dscp will default to 20, and ReportRate will default to 60 if you do not supply these values. LocalAddress is used to set the local-address of export-profile in the device configuration. If you do not supply LocalAddress, then Contrail Insights will use the device's ManagementIp field to set local-address of export-profile on the device.

Network Device JSON Example for gRPC Device

Following are the possible values for the field MetaData.GrpcConfig.SensorList:

  • "/arp-information/ipv4/neighbors/neighbor/"

  • "/bgp-rib/afi-safis/afi-safi/ipv4-unicast/loc-rib/"

  • "/bgp-rib/afi-safis/afi-safi/ipv4-unicast/neighbors/"

  • /bgp-rib/afi-safis/afi-safi/ipv6-unicast/loc-rib/"

  • "/bgp-rib/afi-safis/afi-safi/ipv6-unicast/neighbors/"

  • "/components/"

  • "/interfaces/"

  • "/junos/npu-memory/"

  • "/junos/rsvp-interface-information/"

  • "/junos/services/label-switched-path/usage/"

  • "/junos/services/segment-routing/interface/egress/usage/"

  • "/junos/services/segment-routing/interface/ingress/usage/"

  • "/junos/services/segment-routing/sid/usage/"

  • "/junos/system/linecard/cpu/memory/"

  • "/junos/system/linecard/firewall/"

  • "/junos/system/linecard/intf-exp/"

  • "/junos/system/linecard/npu/memory/"

  • "/junos/system/linecard/npu/utilization/"

  • "/junos/system/linecard/optics/"

  • "/junos/system/linecard/packet/usage/"

  • "/junos/system/linecard/qmon-sw/"

  • "/junos/system/subscriber-management/aaa/accounting-statistics/"

  • "/junos/system/subscriber-management/aaa/dynamic-request-statistics/"

  • "/junos/system/subscriber-management/client-protocols/dhcp/v6/"

  • "/junos/system/subscriber-management/client-protocols/dhcp/v4/"

  • "/junos/system/subscriber-management/client-protocols/l2tp/summary/"

  • "/junos/system/subscriber-management/client-protocols/ppp/statistics/"

  • "/junos/system/subscriber-management/client-protocols/pppoe/statistics/"

  • "/junos/system/subscriber-management/infra/network/ppp/"

  • "/junos/system/subscriber-management/infra/network/pppoe/"

  • "/junos/system/subscriber-management/infra/sdb/statistics/"

  • "/junos/task-memory-information/task-memory-overall-report/task-memory-stats-list/task-memory-stats/"

  • "/junos/task-memory-information/task-memory-overall-report/task-size-block-list/task-size-block/"

  • "/lacp/"

  • "/lldp/interfaces/interface/neighbors/"

  • "/lldp/interfaces/interface/state/"

  • "/nd6-information/"

These are all of the gRPC sensors Contrail Insights supports out of the box. To enable additional gRPC sensor monitoring, see Custom Sensors for JTI, gRPC, and NETCONF for more information.

Note that the variable SSLEnabled determines whether you want to set up a secure connection to the device. See Contrail Insights JTI (gRPC) Monitoring for more information.

DeviceLocalPort is an optional variable which defaults to 50051.

Network Device JSON Example for NetConf Device