Nagios 3.0b5 - ePN and perl caching [SEC=UNCLASSIFIED]
Stanley.Hopcroft at Dest.gov.au
Stanley.Hopcroft at Dest.gov.au
Fri Oct 12 06:26:37 CEST 2007
Dear Larry,
There are debugging hooks in p1.pl that would be useful to enable.
If you are interested in helping deal with this problem please would you
1 Back up your original copy of p1.pl (path is specified in nagios.cfg
IIRC)
2 Change the DEBUG_LEVEL to
use constant DEBUG_LEVEL => LEAVE_MSG | CACHE_DUMP ;
3 Change the DEBUG_LOG_PATH to something appropriate for your system eg
use constant DEBUG_LOG_PATH => '/tmp/' ;
4 Make p1.pl still compiles (perl -c p1.pl should be nag free; $? == 0)
5 Restart Nagios
(IIRC, all this is documented in POD format in p1.pl, so perldoc p1.pl
should show
... blah blah
Extra logging is given by setting DEBUG_LEVEL to include
LEAVE_MSG
1 opens an extra output stream in the path given by the value of
DEBUG_LOG_PATH
2 logs messages describing the success or otherwise of the plugin
com-
pilation and the result of the plugin run.
An example of such messages are
Fri Apr 22 11:54:21 2005 eval_file: successfully compiled
"/usr/local/nagios/libexec/check_bass ".
Fri Apr 22 11:54:21 2005 run_package:
"/usr/local/nagios/libexec/check_bass " returning ("0", "BASS
Transaction completed Ok.
").
Fri Apr 22 11:55:02 2005 eval_file: successfully compiled
"/usr/local/nagios/libexec/check_ad -D production.prod -S".
Fri Apr 22 11:55:02 2005 run_package:
"/usr/local/nagios/libexec/check_ad -D foo.dom -S" returning ("0", "Ok.
Expected 2 domain controllers [foo1 foo2] for "foo.dom.prod" domain from
"1.1.2.3" DNS, found 8 [foo1 foo2 ..]
").
.. blah blah
)
In my case I see
[root at acisp057 bin]# perl -c p1.pl
p1.pl syntax OK
[root at acisp057 bin]# diff -c p1.pl.orig p1.pl
*** p1.pl.orig 2007-10-12 14:09:24.000000000 +1000
--- p1.pl 2007-10-12 14:09:56.000000000 +1000
***************
*** 10,22 ****
use constant CACHE_DUMP => 2 ;
use constant PLUGIN_DUMP => 4 ;
! use constant DEBUG_LEVEL => 0 ;
# use constant DEBUG_LEVEL => CACHE_DUMP ;
# use constant DEBUG_LEVEL => LEAVE_MSG ;
! # use constant DEBUG_LEVEL => LEAVE_MSG |
CACHE_DUMP ;
# use constant DEBUG_LEVEL => LEAVE_MSG |
CACHE_DUMP | PLUGIN_DUMP ;
! use constant DEBUG_LOG_PATH => '/usr/local/nagios/var/' ;
# use constant DEBUG_LOG_PATH => './' ;
use constant LEAVE_MSG_STREAM => DEBUG_LOG_PATH .
'epn_leave-msgs.log' ;
use constant CACHE_DUMP_STREAM => DEBUG_LOG_PATH .
'epn_cache-dump.log' ;
--- 10,22 ----
use constant CACHE_DUMP => 2 ;
use constant PLUGIN_DUMP => 4 ;
! # use constant DEBUG_LEVEL => 0 ;
# use constant DEBUG_LEVEL => CACHE_DUMP ;
# use constant DEBUG_LEVEL => LEAVE_MSG ;
! use constant DEBUG_LEVEL => LEAVE_MSG | CACHE_DUMP ;
# use constant DEBUG_LEVEL => LEAVE_MSG |
CACHE_DUMP | PLUGIN_DUMP ;
! use constant DEBUG_LOG_PATH => '/tmp/' ;
# use constant DEBUG_LOG_PATH => './' ;
use constant LEAVE_MSG_STREAM => DEBUG_LOG_PATH .
'epn_leave-msgs.log' ;
use constant CACHE_DUMP_STREAM => DEBUG_LOG_PATH .
'epn_cache-dump.log' ;
and
[root at acisp057 nagios]# more /tmp/epn_leave-msgs.log
Fri Oct 12 14:17:08 2007 eval_file: successfully compiled
"/usr/lib/nagios/plugins/check_sysUpTime -R 10.208.1.254".
Fri Oct 12 14:17:08 2007 run_package:
"/usr/lib/nagios/plugins/check_sysUpTime -R 10.208.1.254" returning (0,
"sysUpTime of router 1
0.208.1.254 is 231 days, 18:14:31.55").
Fri Oct 12 14:17:17 2007 eval_file:
/usr/lib/nagios/plugins/check_sysUpTime already successfully compiled
and file has not changed;
skipping compilation.
Fri Oct 12 14:17:17 2007 run_package:
"/usr/lib/nagios/plugins/check_sysUpTime -R 10.36.103.254" returning (0,
"sysUpTime of router
10.36.103.254 is 269 days, 00:03:26.48").
Fri Oct 12 14:17:22 2007 eval_file: successfully compiled
"/usr/lib/nagios/plugins/check_backuplinks -N "BRUSW200"".
Fri Oct 12 14:17:22 2007 run_package:
"/usr/lib/nagios/plugins/check_backuplinks -N "BRUSW200"" returning (0,
"Ok. All links from br
usw200/10.0.254.167 to mtasw200 via Etherchannel _are_ in "up"
operational status. Redundant topology Ok.").
[root at acisp057 nagios]#
Unfortch, although the log stream should be unbuffered, it wasn't being
flushed while Nag was running. I had to restart Nag again to
get the messages flushed (when I changed the path for the log messages).
You prob should ensure that the problem plugin is scheduled frequently
(eg each 5 mins) and let it run for about 5 check periods.
Please post the results to the list.
Thank you,
Yours sincerely.
Stanley Hopcroft
Data Communications
02 6211 6110
0412 766 832
Classification: UNCLASSIFIED
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list