Unable to setup the SNMP trap

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
naranant
Posts: 90
Joined: Tue Oct 24, 2017 10:50 am

Unable to setup the SNMP trap

Post by naranant »

Team,

Not able to setup the SNMP trap for the IPC System. I have followed the below steps mentioned in the below two documents but I dont see any snmptunknown.log file getting generated.

https://assets.nagios.com/downloads/nag ... 1495812827

https://support.nagios.com/kb/article.php?id=77

When I tried to upload the two MIB file received from the IPC getting the error "MIB could not be installed". Request you to help me in setting this up let me know if I am missing any steps. Uploading the two MIB's that i have received
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Unable to setup the SNMP trap

Post by tgriep »

One thing, install this MIB file first on the server IPC-ROOT-REG-MIB.TXT before the other one as the IPC-UNIGY-FAULT-MIB.TXT MIB file requires the first one.

Next, it could be a permission issue on the files and folders the MIB is updating, to fix that run the following as root.

Code: Select all

chown root.nagios /etc/snmp/snmptt.ini /etc/snmp/snmptt.conf /etc/snmp
chmod g+w /etc/snmp/snmptt.ini /etc/snmp
chown root.nagios /usr/share/snmp/mibs /usr/share/snmp/mibs/processed_mibs
chmod g+w /usr/share/snmp/mibs /usr/share/snmp/mibs/processed_mibs
After the changes, let us know if the MIB file upload is fixed for you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
naranant
Posts: 90
Joined: Tue Oct 24, 2017 10:50 am

Re: Unable to setup the SNMP trap

Post by naranant »

The below two didn't run as it didn't find the processed_mibs file in that folder.

chown root.nagios /usr/share/snmp/mibs /usr/share/snmp/mibs/processed_mibs
chmod g+w /usr/share/snmp/mibs /usr/share/snmp/mibs/processed_mibs

Also, I tried the steps of uploading this MIB first IPC-ROOT-REG-MIB.TXT before the other one but it still gives the same error.

Regards,
Narayana
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Unable to setup the SNMP trap

Post by tgriep »

OK, the missing folder needs to be created so run the following as root

Code: Select all

mkdir /usr/share/snmp/mibs /usr/share/snmp/mibs/processed_mibs
chown root.nagios /usr/share/snmp/mibs /usr/share/snmp/mibs/processed_mibs
chmod g+w /usr/share/snmp/mibs /usr/share/snmp/mibs/processed_mibs
Then see if the MIB files can be uploaded.
Be sure to check out our Knowledgebase for helpful articles and solutions!
naranant
Posts: 90
Joined: Tue Oct 24, 2017 10:50 am

Re: Unable to setup the SNMP trap

Post by naranant »

Thank you I was able to upload the MIB's now. What is the next steps in checking the Traps.. I dont see the /var/log/snmptt/snmptt.log or snmpttunknown.log.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Unable to setup the SNMP trap

Post by tgriep »

Make sure the SNMP daemons are running on the server.
Lets restart them to be sure the changes are loaded.

Code: Select all

service snmptrapd restart
service snmptt restart
Generate a trap from the remote system and check the log file to see if it is received.
If it does show up in the snmptt.log file, then see if it is in the XI GUI by going to the Admin > Unconfigured Objects menu.
If it is there, then configure it and then Nagios should receive it from now on.
FYI, when a new trap is received, it has to be configured in the Unconfigured Objects menu so check there when a new device is sending traps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
naranant
Posts: 90
Joined: Tue Oct 24, 2017 10:50 am

Re: Unable to setup the SNMP trap

Post by naranant »

restarted the both the services created few alerts on the remote host but didn't get received any traps in the nagios.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Unable to setup the SNMP trap

Post by tgriep »

We would need to see the SNMP configuration files and the MIB files from the server so can you run the following 3 commands as root.

Code: Select all

tar cvfz /tmp/snmp.tgz /etc/snmp/*
tar cvfz /tmp/sharesnmp.tgz /usr/share/snmp/mibs/*
tar cvfz /tmp/snmplog.tgz /var/log/snmptt/*
Then post these 3 files so we can check the settings and the MIB files for any errors.

Code: Select all

/tmp/snmp.tgz
/tmp/sharesnmp.tgz
/tmp/snmplog.tgz
Also, run the following commands and post the output.

Code: Select all

iptables -L
What device did you send the trap from?
Name, IP address, etc.. is needed.
Thanks
Be sure to check out our Knowledgebase for helpful articles and solutions!
naranant
Posts: 90
Joined: Tue Oct 24, 2017 10:50 am

Re: Unable to setup the SNMP trap

Post by naranant »

I have sent you the details through PM.

Thanks..
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Unable to setup the SNMP trap

Post by tgriep »

Thanks for the files. It looks like the MIB files did not get installed in the configurations.
To install them, run the following as root to add the mibs with the command line utility.

Code: Select all

addmib /usr/share/snmp/mibs/IPC-ROOT-REG-MIB.TXT
addmib /usr/share/snmp/mibs/IPC-UNIGY-FAULT-MIB.TXT
service snmptt restart
service snmptrapd restart
Another thing to try it to turn off the firewall temporarily to see if the traps are received.
If the daemons are not receiving the traps, it will not create the snmptt.log and the snmpttunknown.log files like you described earlier.

For a quick test, run the following on the Nagios Server. This will send a test trap and if it works, it will show up in the Unconfigured Objects menu.

Code: Select all

snmptrap -v 2c -c public 127.0.0.1 '' .1.3.6.1.4.1.20006.1.5 NAGIOS-NOTIFY-MIB::nHostname s test
If you do see it, run the test trap from the remote device.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked