Page 1 of 1

Issue with processing traps within Manage MIBs

Posted: Thu Aug 05, 2021 2:49 pm
by nevillestyles
Good afternoon,

We're currently undertaking a proof of concept of the Nagios tools and have some specific requirements it needs to meet, many around the receipt and processing of SNMP traps.

I've been able to successfully process traps against a MIB that already exists on the server (SNMPv2-MIB) so I know the process works. As well as supporting hundreds of MIBs in our existing monitoring tools, we maintain our own MIB (attached) which I'm using during our PoC. I've been able to upload it without error but when I attempt to process the traps in the MIB, nothing happens. We get no error returned but no number appears in the Associated Traps column on the Mange MIBs page, nor are they listed in the Defined Traps tab on the SNMP Trap Interface page.

When importing the MIB I observe it's been added to /usr/share/snmp/mibs, we just cannot process the traps.

We're running XI on CentOS 7 (64-bit):

Code: Select all

$ cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)
We performed a manual installation on a newly built VM.

Any guidance would be appreciated.

Many thanks,
Neville

Re: Issue with processing traps within Manage MIBs

Posted: Fri Aug 06, 2021 10:25 am
by pbroste
Hello @nevillestyles

Thanks for reaching out on the proof of concept issue that you are working through, sounds like you have made excellent progress, and I am glad that we can assist.

Sounds like you can pull snmp data from a mib that already exists on the server but not from the mibs you brought over. I am wondering if something is going on with permission *(owner/group). Could you go ahead and check "r/w" and ownership. I see this on my test server (ls -l )
-rw-r--r-- 1 root root
Have you verified snmp can read from your mib and provide data results? For example:

Code: Select all

snmpwalk -v 2c -c [community_string] [yourhostaddress] -m “/dir/your_mib”
If you see correct info, we can then go ahead and check with 'snmptrap' command to see if able to process from mib.

Code: Select all

snmptrap -v 2c -c [community_string] [yourhostaddress] -m "/dir/your_mib"
General options
-m MIB[:...] load given list of MIBs (ALL loads everything)
-M DIR[:...] look in given list of directories for MIBs
(default: /root/.snmp/mibs:/usr/share/snmp/mibs)
Please follow up with the results,
Perry

Re: Issue with processing traps within Manage MIBs

Posted: Fri Aug 06, 2021 11:09 am
by nevillestyles
Hi Perry,

Thanks for starting to look at this for us. Here's the long listing of /usr/share/snmp/mibs:

Code: Select all

[root@nag-td-01 mibs]# ls -l | head
total 1868
-rw-rw-r--  1 apache nagios  30415 Aug  6 15:53 AFFINITI-MIB.mib
-rw-rw-r--. 1 root   nagios  17455 Jan 22  2021 AGENTX-MIB.txt
-rw-rw-r--. 1 root   nagios  50948 Jan 22  2021 BRIDGE-MIB.txt
-rw-rw-r--. 1 root   nagios  68104 Jan 22  2021 DISMAN-EVENT-MIB.txt
-rw-rw-r--. 1 root   nagios  24613 Jan 22  2021 DISMAN-SCHEDULE-MIB.txt
-rw-rw-r--. 1 root   nagios  64311 Jan 22  2021 DISMAN-SCRIPT-MIB.txt
-rw-rw-r--. 1 root   nagios  84492 Jan 22  2021 EtherLike-MIB.txt
-rw-rw-r--. 1 root   nagios   4660 Jan 22  2021 HCNUM-TC.txt
-rw-rw-r--. 1 root   nagios  52544 Jan 22  2021 HOST-RESOURCES-MIB.txt
We only use our MIB for SNMP traps, not for polling so I'm unable to test its readability.

Regards,
Neville

Re: Issue with processing traps within Manage MIBs

Posted: Mon Aug 09, 2021 7:19 am
by nevillestyles
Hi Perry,

I've figured it out (by trying to process the MIB using snmpttconvertmib). It turns out we are using underscores in some variable and traps names which were causing issues.

Removing those allowed us to process the traps as expected.

Regards,
Neville

Re: Issue with processing traps within Manage MIBs

Posted: Mon Aug 09, 2021 10:22 am
by pbroste
Hello @nevillestyles

Thanks for following up with the details, we see that AFFINITI-MIB.mib is owned by apache nagios and assigned to nagios group.

Let's do the same with the others mibs listed:

Code: Select all

chown apache:nagios /your/mibs/directory
Thanks,
Perry