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
SNMP traps going to /var/log/messages file?
-
Bitflogger
- Posts: 226
- Joined: Mon Oct 16, 2017 9:24 am
Re: SNMP traps going to /var/log/messages file?
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
And change the -LF option to forward logs to /dev/null
Save the change the restart snmptrapd to load the change.
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/snmptrapdCode: Select all
OPTIONS="-Lf /dev/null"Code: Select all
systemctl restart snmptrapdBe 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?
Thanks!
Please lock the case.
Earl
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?
LockingBitflogger wrote:Thanks!
Please lock the case.
Earl