Page 1 of 1

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

Posted: Thu Feb 28, 2019 5:05 pm
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

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

Posted: Thu Feb 28, 2019 5:44 pm
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

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

Posted: Mon Mar 04, 2019 11:48 am
by Bitflogger
Thanks!

Please lock the case.

Earl

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

Posted: Mon Mar 04, 2019 3:05 pm
by scottwilkerson
Bitflogger wrote:Thanks!

Please lock the case.

Earl
Locking