Nagios Core- Snmptt service status failed

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
sannatar16
Posts: 8
Joined: Thu Jun 28, 2018 2:03 am

Nagios Core- Snmptt service status failed

Post by sannatar16 »

Hello,

I am trying to configure nagios server to process snmp traps from nw devices. I have installed nsti and snmptt as well.

When I am sending any test trap it is not logged under /var/log/snmptt folder. I see only snmpsystem.log in this folder.

In /var/log/messages, seeing the below error when sending snmp trap
Jul 24 08:07:55 xxxxxxxxxxx snmptt-sys[79834]: MySQL error: Unable to connect to database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.soc
k' (2)
service snmptt status
service snmptt status
Redirecting to /bin/systemctl status snmptt.service
? snmptt.service - SNMP Trap Translator (SNMPTT)
Loaded: loaded (/usr/lib/systemd/system/snmptt.service; disabled; vendor pres et: disabled)
Active: active (running) since Mon 2018-07-23 08:42:00 UTC; 23h ago
Process: 79666 ExecStart=/usr/sbin/snmptt --daemon (code=exited, status=0/SUCC ESS)
Main PID: 79669 (snmptt)
CGroup: /system.slice/snmptt.service
+-79668 /usr/bin/perl /usr/sbin/snmptt --daemon
+-79669 /usr/bin/perl /usr/sbin/snmptt --daemon

Jul 24 07:02:04 xxxxxxxxx snmptt-sys[79669]: MySQL error: Unable to conne...)
Jul 24 07:07:04 xxxxxxxxx snmptt-sys[79669]: MySQL error: Unable to conne...)
Jul 24 07:12:04 xxxxxxxxx snmptt-sys[79669]: MySQL error: Unable to conne...)
Jul 24 07:17:04 xxxxxxxxx snmptt-sys[79669]: MySQL error: Unable to conne...)
Jul 24 07:22:04 xxxxxxxxx snmptt-sys[79669]: MySQL error: Unable to conne...)
Jul 24 07:27:04 xxxxxxxxx snmptt-sys[79669]: MySQL error: Unable to conne...)
Jul 24 07:32:04 xxxxxxxxx snmptt-sys[79669]: MySQL error: Unable to conne...)
Jul 24 07:37:04 xxxxxxxxx snmptt-sys[79669]: MySQL error: Unable to conne...)
Jul 24 07:42:04 xxxxxxxxx snmptt-sys[79669]: MySQL error: Unable to conne...)
Jul 24 07:47:04 xxxxxxxxx snmptt-sys[79669]: MySQL error: Unable to conne...)
Please assist me what I am missing here.

Thanks in advance
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios Core- Snmptt service status failed

Post by tgriep »

Is the MYSQL database running on the server?
The test trap tries to add an entry in to the MYSQL database and it may not be running.
Also, did you edit the /etc/snmp/snmptt.ini file and add the MYSQL database credentials?
Can you post the file here?

Thanks
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked