Ad Widget

Collapse

SNMP Mib check results in "cannot parse OID" but testing works

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • KBlasz
    Junior Member
    • Apr 2020
    • 20

    #1

    SNMP Mib check results in "cannot parse OID" but testing works

    Been struggling with this for a few hours, and so far I have
    • Downloaded all the necessary MIBS for the cisco firewall I am using to the Ubuntu Proxy (/usr/share/snmp/mibs/)
    • Installed snmpwalk on the proxy
    • setup a host with snmp port and address
    Running snmpwalk on the proxy server gives what seems to be the correct value as seen here:
    Click image for larger version

Name:	image.png
Views:	387
Size:	27.4 KB
ID:	501245

    Testing the check gives a successful response:
    Click image for larger version

Name:	image.png
Views:	448
Size:	33.8 KB
ID:	501243

    The MIB item for example vendor name​
    Click image for larger version

Name:	image.png
Views:	385
Size:	45.8 KB
ID:	501244

    But when I execute the check if failes with:
    snmp_parse_oid(): cannot parse OID "ENTITY-MIB::entPhysicalMfgName.1".
    Click image for larger version

Name:	image.png
Views:	388
Size:	15.4 KB
ID:	501246

    Any help is much appreciated. ​

  • Answer selected by KBlasz at 01-04-2025, 22:30.
    KBlasz
    Junior Member
    • Apr 2020
    • 20

    In case anyone else gets this issue, it seems to be something to do with the mib config file, its rather strange for me since it worked when running the test or snmp walk but rerunning the commands and ensuring the config file contained the paths fixed the issue.

    Extract of my commands in case its handy and I am too lazy to generalize:

    download the program and check for mibs

    Code:
    sudo apt install snmp-mibs-downloader
    sudo download-mibs
    edit config, e.g this is what i did to organize my cisco mibs:
    Code:
    sudo nano /etc/snmp/snmp.conf
    Code:
    #add the lines and comment everything else
    mibdirs -/usr/share/snmp/mibs/cisco
    mibdirs -/usr/share/snmp/mibs/ciscov2
    copy mib files to dir (e.g in my case i was copying from a windows host to ubuntu)
    Code:
    scp C:\AdminScripts\cisco-mibs\Zabbix-CISCO-ASA-MIBs.zip administrator@<IP Address>:/home/administrator/
    move them around to the correct folders:
    Code:
    apt install unzip
    unzip /home/administrator/Zabbix-CISCO-ASA-MIBs.zip -d /usr/share/snmp/mibs/cisco
    sudo mv /usr/share/snmp/mibs/cisco/Zabbix-CISCO-ASA-MIBs/* /usr/share/snmp/mibs/cisco
    mkdir /usr/share/snmp/mibs/ciscov2
    sudo tar -xzf /usr/share/snmp/mibs/cisco/v2.tar.gz -C /usr/share/snmp/mibs/ciscov2
    sudo mv /usr/share/snmp/mibs/ciscov2/auto/mibs/v2/* /usr/share/snmp/mibs/ciscov2
    finally restart the proxy service
    Code:
    sudo systemctl restart zabbix-proxy

    Comment

    • mrnobody
      Member
      • Oct 2024
      • 61

      #2
      Hi
      When you see something like "ENTITY-MIB::entPhysical" it's already translated, to be human readable.
      Change SNMP OID entry with 1.3.6.1.2.1.47.1.1.1.1.12.1
      This is the same OID without translation... Low level information, easier for machines, harder for us humans.

      Comment

      • KBlasz
        Junior Member
        • Apr 2020
        • 20

        #3
        In case anyone else gets this issue, it seems to be something to do with the mib config file, its rather strange for me since it worked when running the test or snmp walk but rerunning the commands and ensuring the config file contained the paths fixed the issue.

        Extract of my commands in case its handy and I am too lazy to generalize:

        download the program and check for mibs

        Code:
        sudo apt install snmp-mibs-downloader
        sudo download-mibs
        edit config, e.g this is what i did to organize my cisco mibs:
        Code:
        sudo nano /etc/snmp/snmp.conf
        Code:
        #add the lines and comment everything else
        mibdirs -/usr/share/snmp/mibs/cisco
        mibdirs -/usr/share/snmp/mibs/ciscov2
        copy mib files to dir (e.g in my case i was copying from a windows host to ubuntu)
        Code:
        scp C:\AdminScripts\cisco-mibs\Zabbix-CISCO-ASA-MIBs.zip administrator@<IP Address>:/home/administrator/
        move them around to the correct folders:
        Code:
        apt install unzip
        unzip /home/administrator/Zabbix-CISCO-ASA-MIBs.zip -d /usr/share/snmp/mibs/cisco
        sudo mv /usr/share/snmp/mibs/cisco/Zabbix-CISCO-ASA-MIBs/* /usr/share/snmp/mibs/cisco
        mkdir /usr/share/snmp/mibs/ciscov2
        sudo tar -xzf /usr/share/snmp/mibs/cisco/v2.tar.gz -C /usr/share/snmp/mibs/ciscov2
        sudo mv /usr/share/snmp/mibs/ciscov2/auto/mibs/v2/* /usr/share/snmp/mibs/ciscov2
        finally restart the proxy service
        Code:
        sudo systemctl restart zabbix-proxy

        Comment

        Working...