Nagios Core- Snmptt service status failed

This forum is intended for the discussion of Nagios plugin development. Feature requests, patches, bug fixes, and all types of development-related discussions are welcome!

NOTE: The SourceForge.net nagiosplug-devel mailing list has been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Nagios Core- Snmptt service status failed

Postby sannatar16 » Tue Jul 24, 2018 3:17 am

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
sannatar16
 
Posts: 8
Joined: Thu Jun 28, 2018 2:03 am

Re: Nagios Core- Snmptt service status failed

Postby tgriep » Tue Jul 24, 2018 4:12 pm

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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
 
Posts: 7049
Joined: Thu Oct 30, 2014 9:02 am


Return to Nagios Plugin Development

Who is online

Users browsing this forum: No registered users and 2 guests