Docker-Nagios icon indicating copy to clipboard operation
Docker-Nagios copied to clipboard

Persistent MIBs

Open tronyx opened this issue 6 years ago • 2 comments
trafficstars

How do I add custom MIBs and keep them persistent. Tried mounting the MIBs directory from within the container with a bind mount, but that then wipes out all the existing MIBs in the container.

tronyx avatar Mar 12 '19 00:03 tronyx

Hi @christronyxyocum This is a good question, I will look in to adding a mounted path to search for MIBs

JasonRivers avatar Mar 12 '19 08:03 JasonRivers

You actually don't need to do anything.

  1. Install SNMP on your Docker Host.
  2. Update the snmp.conf file to look like this:
#mibs :
mibdirs /usr/share/snmp/mibs:/usr/share/snmp/mibs/ietf:/usr/share/snmp/mibs/iana
mibs +ALL
  1. Add the following volumes to your container config:
- "/usr/share/snmp/mibs:/usr/share/snmp/mibs:ro"
- "/var/lib/snmp/mibs:/var/lib/snmp/mibs:ro"
- "/etc/snmp/snmp.conf:/etc/snmp/snmp.conf:ro"
  1. ??????????
  2. Enjoy custom/updated MIBs by simply updating/adding to the ones on the Docker Host.

I now have Nagios SNMP checks for my ReadyNAS and Unraid Servers.

tronyx avatar Oct 15 '19 21:10 tronyx