Infrastructure Integration

Configuration

  1. Configure the agent by editing /etc/netsil-dd-agent/conf.d/snmp.yamlin the collectors.

Example:

    init_config:
    #    #You can specify an additional folder for your custom mib files (python format)
    #    mibs_folder: /path/to/your/mibs/folder
    #    ignore_nonincreasing_oid: False

    instances:

      # SNMP v1-v2 configuration
      #
      # - ip_address: localhost
      #   port: 161
      #   community_string: public
      #   snmp_version: 2 # Only required for snmp v1, will default to 2
      #   timeout: 1 # second, by default
      #   retries: 5
      #   enforce_mib_constraints: true  # if set to false we will not check the values
      #                                  # returned meet the MIB constraints. Defaults to True.
      #   tags:
      #     - optional_tag_1
      #     - optional_tag_2
      #
      #   # Specify metrics you want to monitor
      #   metrics:
      #     # You can specify metrics using MIBS (Counter and Gauge)
      #     - MIB: UDP-MIB
      #       symbol: udpInDatagrams
      #     - MIB: TCP-MIB
      #       symbol: tcpActiveOpens
      #     # If it's just a scalar, you can specify by OID and name it
      #     - OID: 1.3.6.1.2.1.6.5
      #       name: tcpPassiveOpens
      #     
      #     # You can also specify a specific tag for these with the metric_tags field
      #     - OID: 1.3.6.1.2.1.6.5
      #       name: tcpPassiveOpens
      #       metric_tags:
      #         - TCP
      #
      #     # This monitor auto-detects OID data types from the remote agent's response.
      #     # If you're dealing with a buggy agent that returns incorrect data types for OIDs,
      #     # You can force the data type with the 'forced_type' parameter.  Valid options for
      #     # this parameter are 'gauge' and 'counter'.
      #     # Example: When a F5 Networks load balancer is queried for this OID, it will return
      #     # it as a Counter64 when it should be a gauge.  So, we force the data type to gauge:
      #     - OID: 1.3.6.1.4.1.3375.2.1.1.2.1.8.0
      #       name: F5_TotalCurrentConnections
      #       forced_type: gauge
      #
      #     # You can also query a table and specify
      #     #   - which columns to report as value (symbols)
      #     #   - which columns / indexes to use as tags (metric_tags)
      #     - MIB: IF-MIB
      #       table: ifTable
      #       symbols:
      #         - ifInOctets
      #         - ifOutOctets
      #       metric_tags:
      #         - tag: interface
      #           column: ifDescr  # specify which column to read the tag value from
      #     - MIB: IP-MIB
      #       table: ipSystemStatsTable
      #       symbols:
      #         - ipSystemStatsInReceives
      #       metric_tags:
      #         - tag: ipversion
      #           index: 1        # specify which index you want to read the tag value from

      # SNMP v3 configuration
      # check http://pysnmp.sourceforge.net/docs/current/security-configuration.html
      #
      # - ip_address: 192.168.34.10
      #   # port: 161 # default value
      #   user: user
      #   authKey: password
      #   privKey: private_key
      #   authProtocol: authProtocol
      #   privProtocol: privProtocol
      #   timeout: 1 # second, by default
      #   retries: 5
      #   tags:
      #     - optional_tag_1
      #     - optional_tag_2
      #   metrics:
      #     - MIB: UDP-MIB
      #       symbol: udpInDatagrams
      #     - MIB: TCP-MIB
      #       symbol: tcpActiveOpens
  1. Check and make sure that all yaml files are valid with following command:

    /etc/init.d/netsil-collectors configcheck
    
  2. Restart the Agent using the following command:

    /etc/init.d/netsil-collectors restart
    
  3. Execute the info command to verify that the integration check has passed:

    /etc/init.d/netsil-collectors info
    

The output of the command should contain a section similar to the following:

    Checks
    ======

      [...]

      snmp
      ----
          - instance #0 [OK]
          - Collected 8 metrics & 0 events