Converts a MIB file (in PySNMP format) to a yaml file that can be used by Datadog's SNMP agent integration: https://docs.datadoghq.com/integrations/snmp/
MIB Format
Datadog SNMP agent integration requires all MIB files to be in PySNMP format. The agent comes packaged with a list of MIBs that can be used out-of-the-box (in Linux environments this can be found here: /opt/datadog-agent/embedded/lib/python2.7/site-packages/pysnmp_mibs)
If looking to use your own MIB that is not already packaged with the Datadog agent follow the steps in the following documentation to convert to PySNMP format: https://docs.datadoghq.com/integrations/snmp/#use-your-own-mib
Once your MIB is in PySNMP format you can use this tool to parse the MIB and convert it into a usable yaml file.
- Clone this repository.
- Run
python parse.py
This script will:
a. Prompt you for the location/name of the MIB file
b. Parse OIDs from MIB file
c. Creates a fileend.yaml
that contains the contents ofbegin.yaml
with the parsed OIDs appended to the end of it - Rename
end.yaml
toconf.yaml
- Place
conf.yaml
in the agent's /conf.d/snmp.d/ directory - Edit the
conf.yaml
to include information about your SNMP device: hostname, port, community string, etc. - Remove unwanted OIDs from
conf.yaml
and OIDs that don't return gauges, counters, integers, or double values (ie. strings) - Restart the Datadog Agent