Ad Widget

Collapse

"snmp_parse_oid(): cannot parse OID" Error in Zabbix 3.4 Docker Version

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Isaac_G
    Junior Member
    • Aug 2018
    • 2

    #1

    "snmp_parse_oid(): cannot parse OID" Error in Zabbix 3.4 Docker Version

    Hi all,

    I'm stumped here. I've been using Zabbix 3.4 for a couple months now with no issues. However I've been banging my head against the wall with SNMP the last couple of days.

    Like the title says, I get the error "snmp_parse_oid()" from even the most basic SNMP call, such as sysUpTime.
    My current installation uses all of the Zabbix Docker images, so I've got zabbix-server-pgsql:3.4 linked to a database container and such.

    As a last resort, I spun up a new Zabbix 3.4 instance, this time using the "from packages" process to install everything directly on the host, so Docker wasn't involved. Under these circumstances, I imported the exact same hosts and templates from my non-functioning Docker install, and everything SNMP related worked like a charm.

    Any ideas on what is causing this discrepancy? And more importantly, how to get SNMP working on the Docker install? I can do a snmpwalk to the hosts in question using the same OID without issue. What's also strange, is if I give Zabbix the numeric OID in the Docker version, it grabs the data no problem. I don't think MIBs are a problem because like I said, the "from packages" install worked right out of the box, and at the moment I'm trying to only do basic SNMP queries that should be resolved by basic MIB's included in net-snmp packages.

    Any help is greatly appreciated!
  • Isaac_G
    Junior Member
    • Aug 2018
    • 2

    #2
    Well hate to be that guy that figures out his own post the same day but here it is:

    Be very wary of mounting volumes! Debugging steps taken:
    1. Spin up new container using zabbix appliance (like the docs say, it's great for debugging since it incorporates everything into 1 image) with the same settings (volumes/ports/etc...) as my existing Zabbix server container
    2. Examine the logs
    3. Viola!

    The logs showed that Zabbix could not find the MIBS!
    I thought this was strange since the Zabbix Dockerfile does indeed install snmp.
    Turns out the docs ALSO mention mounting a volume for any non-standard MIBs you might want to install. Well that's all fine and dandy, unless you don't have SNMP installed on the host the container is running on.
    If you don't have SNMP on the host, when you mount the volume you won't have a /snmp/mibs directory, so Docker creates an empty one. This then causes the Zabbix container mibs directory to have no MIBs either.
    My hunch is that if a MIB's volume is specified at container launch, Zabbix will only look there instead of the standard MIB's directory, so then since there's nothing in there, you don't have any MIB's!

    If any Zabbix devs end up looking at this, I'd suggest adding a footnote to the Dockerhub page about mounting the MIB volume. I should've known better, but it's a very easy mistake to make!
    Hopefully this will help somebody in the future

    Comment

    Working...