Change the severity of snmptraps

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Change the severity of snmptraps

Post by rhassing »

When importing MIB files, I see that all snmptraps are defined with a default severity of Normal.
Is there a way to quickly (maybe not using the webinsterface) change the severity of a number of traps?
Rob Hassing
Image
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: Change the severity of snmptraps

Post by mbellerue »

Unfortunately no, it's a onsey-twosey kind of operation. :(
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Change the severity of snmptraps

Post by rhassing »

Hmm, I have 1744 traps defined, but all are of a Normal severity. But I think a lot of them should be changed to either Warning or Critical. Otherwise traps don't make sense if they are not alerting.
Rob Hassing
Image
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Change the severity of snmptraps

Post by Box293 »

Are you using the SNMP Trap Interface to manage all of your traps? If yes then we may need to do an SQL query to bulk change them.

If you are using the standard SNMP configuration then it would be a matter of bulk editing /etc/snmp/snmptt.conf.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Change the severity of snmptraps

Post by rhassing »

We are using the snmp interface in NagiosXI.
Rob Hassing
Image
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Change the severity of snmptraps

Post by Box293 »

So the way to do it right now is to edit the config and re-import it.
Copy the current config file:

Code: Select all

cp /etc/snmp/snmptt.conf.nxti /tmp/snmptt.conf.nxti
Then edit it as required.
Then run the import script so the changes are added back in:

Code: Select all

/usr/local/nagiosxi/scripts/nxti_import.php /tmp/snmptt.conf.nxti
At this point you would go into the SNMP Trap Interface > Advanced > Restore SNMPTT Configuration and it would be applied BUT that didn't work for me ... however simply de-activating a service and re-activating it did work for me.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked