SNMP traps going to /var/log/messages file?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Bitflogger
Posts: 226
Joined: Mon Oct 16, 2017 9:24 am

SNMP traps going to /var/log/messages file?

Post by Bitflogger »

Hello,
I'm running v5.5.10, 64-bit, VM, CentOS 7.

I set up a server to send SNMP alerts, and it all seemed to work. Recently, I have seen SNMP alerts, from the same server, that end up in the /var/log/messages file.

I think thats because I have not configured those alerts to be caught by SNMPTT.

Is there a way to suppress SNMP alerts from getting into the messages file?

Feb 28 15:14:50 xihost.mydomain snmptrapd[5964]: 2019-02-28 15:14:50 server2.mydomain [UDP: [10.xxx.xxx.xxx]:59229->[128.xxx.xxx.xxx]:162]:#012DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (139621520) 16 days, 3:50:15.20#011SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-SMI::enterprises.9.9.156.2.0.3#011SNMPv2-SMI::enterprises.9.9.156.1.10.1 = INTEGER: 7#011SNMPv2-SMI::enterprises.9.9.156.1.10.4 = Gauge32: 1

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

Re: SNMP traps going to /var/log/messages file?

Post by tgriep »

There are a couple of places to look.
In the /etc/snmp/snmptrapd.conf file, if there is a log entry, change that.

Or another option is to edit the following file

Code: Select all

/etc/sysconfig/snmptrapd
And change the -LF option to forward logs to /dev/null

Code: Select all

OPTIONS="-Lf /dev/null"
Save the change the restart snmptrapd to load the change.

Code: Select all

systemctl restart snmptrapd
Be sure to check out our Knowledgebase for helpful articles and solutions!
Bitflogger
Posts: 226
Joined: Mon Oct 16, 2017 9:24 am

Re: SNMP traps going to /var/log/messages file?

Post by Bitflogger »

Thanks!

Please lock the case.

Earl
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: SNMP traps going to /var/log/messages file?

Post by scottwilkerson »

Bitflogger wrote:Thanks!

Please lock the case.

Earl
Locking
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked