This project creates a helper container with the awesome generator tool from the the prometheus/snmp_exporter project.
to build just execute:
make
docker run -ti \
-v $PWD/snmp.yml:/generator/snmp.yml \
-v $PWD/generator.yml:/generator/generator.yml \
-v $PWD/CISCO-6200-MIB:/generator/mibs/cisco.mib \
alex/snmp_exporter_generator:latest generate
- create a
generator.yml
file in your host containing the OIDs that you would like the tool to walk and generate a config file and mount it as a volume to/generator/generator.yml
- create an empty
snmp.yml
file in your host where the generated configuration will be written, mount it in your container to/generator/generator.yml
- mount the MIB file of the OIDs you would like to walk to the
/generator/mibs/
directory (they can be several, depending on your walked OIDs). - By running
generate
the tool will write the result to the snmp.yml which afterwards you can trim as according to your needs.