SNMP Traps

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: SNMP Traps

Post by scottwilkerson »

Lets run

Code: Select all

service snmptt stop
rm -f /var/run/snmptt.pid
service snmptt start
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
stratogen_richard
Posts: 11
Joined: Mon Nov 04, 2013 9:26 am

Re: SNMP Traps

Post by stratogen_richard »

I have highlighted the section of my previous response which covers this when you asked me to do it in your previous response. Is there a support system I can go through rather than going via the forum as the time difference means we are take a full day to get responses back and forth and it seems to be going nowhere.
stratogen_richard wrote:ps -ef | grep snmp
root 1528 923 0 09:32 pts/0 00:00:00 grep snmp
root 7244 1 0 Nov07 ? 00:00:06 /usr/bin/perl /usr/sbin/snmptt --daemon
root 13097 1 0 Oct23 ? 00:07:09 /usr/sbin/snmpd -LS0-6d -Lf /dev/null -p /var/run/snmpd.pid
root 31661 1 0 Nov07 ? 00:00:03 /usr/sbin/snmptrapd -Lsd -On -p /var/run/snmptrapd.pid

service snmptt stop
Stopping snmptt: [ OK ]

ps -ef | grep snmp
root 1724 923 0 09:32 pts/0 00:00:00 grep snmp
root 13097 1 0 Oct23 ? 00:07:09 /usr/sbin/snmpd -LS0-6d -Lf /dev/null -p /var/run/snmpd.pid
root 31661 1 0 Nov07 ? 00:00:03 /usr/sbin/snmptrapd -Lsd -On -p /var/run/snmptrapd.pid

killall snmptt
snmptt: no process killed

cat /var/run/snmptt.pid
cat: /var/run/snmptt.pid: No such file or directory

service snmptt start
Starting snmptt: [ OK ]


In the logs when a trap is received is the same:
SNMPTT v1.4beta2 started
There seems to be another SNMPTT process (pid 5057) running.
You may want to kill it and delete the .pid file (/var/run/snmptt.pid). Aborting...
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: SNMP Traps

Post by sreinhardt »

There is email support, however it is also 9-5 CST only, the same as our forum support hours. You are more than welcome to send an email to [email protected], however it is filtered via an email address whitelist, you should have registered one with sales at the time of purchase. If you do open a ticket, and would have time in our standard hours, I think we could setup a remote session and see about resolving that way if you would like.

As for continuing the troubleshooting here, when you start the snmptt process, is it the same PID as the one listed in the /var/run/snmptt.pid file? Also just to verify, did you make the changes to snmptt.ini that I suggested previously?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
stratogen_richard
Posts: 11
Joined: Mon Nov 04, 2013 9:26 am

Re: SNMP Traps

Post by stratogen_richard »

Hi,

Yeah the PID's match and I did change from standalone to daemon and removed the UID.

The PID issue i am getting only appeared when I made the changes you suggested.

Thanks,

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

Re: SNMP Traps

Post by scottwilkerson »

Can you also show the last 20 lines of /etc/snmp/snmptt.ini

Code: Select all

tail -20 /etc/snmp/snmptt.ini
I want to make sure you have the /etc/snmp/snmptt.conf trap file...

I also noticed that you have turned on debugging (because of the files existence), can you send the following

Code: Select all

tail -100 /var/log/snmptt/snmptthandler.debug
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
stratogen_richard
Posts: 11
Joined: Mon Nov 04, 2013 9:26 am

Re: SNMP Traps

Post by stratogen_richard »

I did actually disable debugging right after raising the ticket, however, I have enabled it and sent some test traps.

tail -20 /etc/snmp/snmptt.ini
DEBUGGING = 2

# Debugging file - SNMPTT
# Location of debugging output file. Leave blank to default to STDOUT (good for
# standalone mode, or daemon mode without forking)
# DEBUGGING_FILE =
DEBUGGING_FILE = /var/log/snmptt/snmptt.debug

# Debugging file - SNMPTTHANDLER
# Location of debugging output file. Leave blank to default to STDOUT
# DEBUGGING_FILE_HANDLER =
DEBUGGING_FILE_HANDLER = /var/log/snmptt/snmptthandler.debug

[TrapFiles]
# A list of snmptt.conf files (this is NOT the snmptrapd.conf file). The COMPLETE path
# and filename. Ex: '/etc/snmp/snmptt.conf'
snmptt_conf_files = <<END
/etc/snmp/snmptt.conf
END

Unfortunately the snmptthandler.debug file doesn't exist

tail -100 /var/log/snmptt/snmptthandler.debug
tail: cannot open `/var/log/snmptt/snmptthandler.debug' for reading: No such file or directory
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: SNMP Traps

Post by sreinhardt »

I didn't catch this before, but if you updated to snmptt 1.4, it removes several binaries, and moves some things around from where the 1.3 configs expect. Let's verify that those changes have been made, and get that corrected. (not having the snmptthandler.debug tipped me off that your traps are probably halting before they are processed correctly)

Code: Select all

grep -Ri 'snmp\|addmib' /usr/local/bin/
grep -Ri 'snmp\|addmib' /usr/local/sbin/
grep -Ri 'snmp\|addmib' /usr/sbin/
cat /etc/snmp/snmptrapd.conf
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
stratogen_richard
Posts: 11
Joined: Mon Nov 04, 2013 9:26 am

Re: SNMP Traps

Post by stratogen_richard »

I've attached the output of those commands as a file.
You do not have the required permissions to view the files attached to this post.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: SNMP Traps

Post by sreinhardt »

Locked, moving to ticket system.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked