SNMPTT don't make log

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.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: SNMPTT don't make log

Post by sreinhardt »

First thing, I honestly would suggest using the packaged version of snmptt. That at least will get us on the same page of what files you should have and what permissions they should have. Otherwise your snmptt.ini looks fine, however if you are not getting items logged in /var/log/snmptt/snmpttdebug.log then you are more likely having an issue with snmptrapd not starting properly or not being started. My guess would be the latter, since you did not show it in your ps command.

Code: Select all

service snmptrapd start
ps -ef | grep snmp
run some snmp traps, and check your logs from here.
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.
Ravil
Posts: 43
Joined: Thu Feb 20, 2014 9:30 pm

Re: SNMPTT don't make log

Post by Ravil »

It' working! :D :D I tryed make script snmptthandler, but saw mistake:

Code: Select all

[root@localhost ~]# /usr/sbin/snmptthandler
Can't locate Time/HiRes.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/sbin/snmptthandler line 53.
BEGIN failed--compilation aborted at /usr/sbin/snmptthandler line 53.
After install perl-Time-HiRes snmptt began work!


Oh....but I have something confuses. I receive trap from IBM x3650 when someone tryes to log. Nagios show me it on web-interface (trap service show it). But snmpttdebug.log show me:

Code: Select all

Processing file: #snmptt-trap-1393551040817194
Reading trap.  Current time: Fri Feb 28 11:29:10 2014
  Invalid trap file.  Expected a serial time on the first line but got nothing
  Error processing trap file #snmptt-trap-1393551040817194.  Skipping...
Sleeping for 5 seconds
Is it normally? snmptt is working. I see all traps on nagios, which come to server, but this message confuses me in snmpttdebug.log
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: SNMPTT don't make log

Post by sreinhardt »

Generally, unless there is a crash causing failure, snmptt will continue to process even if data it expects is not available, so this is somewhat expected. Especially considering the trap still forwarded to the core interface, I think this is just overly verbose output from snmptt.
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