Page 1 of 1
Change the severity of snmptraps
Posted: Tue Jan 21, 2020 8:59 am
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?
Re: Change the severity of snmptraps
Posted: Tue Jan 21, 2020 4:09 pm
by mbellerue
Unfortunately no, it's a onsey-twosey kind of operation.

Re: Change the severity of snmptraps
Posted: Wed Jan 22, 2020 7:19 am
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.
Re: Change the severity of snmptraps
Posted: Wed Jan 22, 2020 6:10 pm
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.
Re: Change the severity of snmptraps
Posted: Mon Jan 27, 2020 9:52 am
by rhassing
We are using the snmp interface in NagiosXI.
Re: Change the severity of snmptraps
Posted: Mon Jan 27, 2020 5:53 pm
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.