The snmptt has HIT the FAN!

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
niebais
Posts: 349
Joined: Tue Apr 13, 2010 2:15 pm

Re: The snmptt has HIT the FAN!

Post by niebais »

Make sure the three daemons: snmpd, snmptrapd, and snmptt are running.

Second, for unknown traps, make sure that log unknown traps is set to 1.

Lastly, check permissions on /var/spool/snmptt and /var/log/snmptt. Ensure that both are owned by snmptt.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: The snmptt has HIT the FAN!

Post by sreinhardt »

I think we covered most if not all those in the last thread, but it never hurts to reiterate good practices! Got your configs, and am taking a look now.
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.
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: The snmptt has HIT the FAN!

Post by benhank »

"covered?" man we did an in depth investigation! lol
Thanks for the assist niebais, nagios crew FTW!
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: The snmptt has HIT the FAN!

Post by sreinhardt »

Man, everything looks dead on, aside from the obvious issues of it not working. SO.... Let's enable debugging and see if we can't get some more information. Make the changes to match as I show them below. Also just to verify, you are NOT looking to use nsti presently, as mysql logging is off?

/etc/snmp/snmptt.ini (end of file)

Code: Select all

DEBUGGING = 2
DEBUGGING_FILE = /tmp/snmptt.debug
as always, restart all three services. Let it run for a little while and see what we get. The one thing I will note, is even your current logs are clearly showing traps coming in, are you certain that you should have unknown traps with as many mibs as you have?
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.
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: The snmptt has HIT the FAN!

Post by benhank »

no nsti is nstgone =D
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: The snmptt has HIT the FAN!

Post by benhank »

the thing Is i am getting no logging for the known and unknown stuff. I would not care that much, but I cant figure out why nagios is not showing the trap results in the gui



So i went into nagios to

Code: Select all

admin\System Extensions\manage mibs
and tried to upload a mib. I checked "process traps", and got an error instructing me to run these commands:

Code: Select all

[root@LkennagiosT01 src]# chown root.nagios /etc/snmp/snmptt.ini /etc/snmp
[root@LkennagiosT01 src]# chmod g+w /etc/snmp/snmptt.ini /etc/snmp
which I did, and then i tried to upload the mib again and get this:

Code: Select all

MIB could not be installed - directory permissions may be incorrect.

the debugging results:

Code: Select all

[root@LkennagiosT01 src]# vi /tmp/snmptt.debug
********** SNMPTT v1.3 started: Tue Sep 17 16:38:20 2013 **********

********** Net-SNMP version 5.0702 Perl module enabled **********

********** DNS enabled **********


        Loading /etc/snmp/snmptt.conf
        Finished loading 1330 lines from /etc/snmp/snmptt.conf

Finished loading configuration files

Processing memory copy of configuration files
79 EVENTs found
79 EVENTs found that contain at least the mandatory FORMAT line
Finished processing memory copy of configuration files

==========================================================
Printing out all the events in hash table:

Event: .1.3.6.1.4.1.232.111.0.10 => powerSupplyFail,Status Events,Normal,One or more sources of power to this agent has failed. $*,
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: The snmptt has HIT the FAN!

Post by sreinhardt »

Code: Select all

79 EVENTs found
79 EVENTs found that contain at least the mandatory FORMAT line
These two tell me at least that the traps you are currently getting seem to be correctly accounted for! However not sending to nagios is problematic. Is this still a separate box from the XI machine, or are they one in the same?
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.
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: The snmptt has HIT the FAN!

Post by benhank »

The host that is sending those traps is a windows server."sending.domain.org"
the receiving server, from which I am getting the info seen in my posts is a linux box running Nagios .
I keep restarting the services in order as well.
I even ran an "apply config".
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: The snmptt has HIT the FAN!

Post by sreinhardt »

Alrighty, what are the permissions on /usr/local/nagios/var/rw/nagios.cmd, and what groups are snmptt user in?

Code: Select all

ll /usr/local/nagios/var/rw/nagios.cmd
grep -i 'snmp' /etc/group
grep -i 'snmp' /etc/passwd
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.
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: The snmptt has HIT the FAN!

Post by benhank »

Code: Select all

[root@LkennagiosT01 ~]# ll /usr/local/nagios/var/rw/nagios.cmd
prw-rw---- 1 nagios nagcmd 0 Sep 17 16:54 /usr/local/nagios/var/rw/nagios.cmd
[root@LkennagiosT01 ~]# grep -i 'snmp' /etc/group
snmptt:x:497:
[root@LkennagiosT01 ~]# grep -i 'snmp' /etc/passwd
snmptt:x:496:497:SNMP Trap Translator:/var/spool/snmptt:/sbin/nologin
[root@LkennagiosT01 ~]#

Hey bro, I have a question.
here is a list of the docs I have read that describe how to set up snmptt:

Code: Select all

http://www.snmptt.org/docs/snmptt.shtml
and

Code: Select all

http://assets.nagios.com/downloads/nagiosti/documentation/index.html
and the nagios integration doc.

I have a question: lets say that I have a clean box, that never had snmp or snmptt installed on it and I have a kojack clean install of the latest xi build.
I install the snmp trap wiz.
Then I want to have nagios retrieve snmp traps.
Then I properly configure the sending server to send test traps to the nagios box.
What do I do next? if I follow the steps listed in the integration doc, are there any other steps am supposed to take, or should that doc alone get me up and runnin?
i know that you guys are working on NSTI, so if I install it will i be good to go for using the trap wiz?
Or do I do the steps listed on the snmptt link (for daemon mode) and then run do the nagios integration steps?
I am asking this because i know I am missing something, so I think I will slowly and carefully reinstall snmp and snmptt after creating a checklist.
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
Locked