[Nagiosplug-help] EPN Newbie question

Tal Cohen nagios at cohen123.com
Thu Sep 6 18:48:05 CEST 2007


Hi Folks,

 

I am new to developing Perl based plugins with Nagios EPN, so please be
gentle - and let me know if this is the right list to send these types of
questions to (I tried posting this to nagios-devel at lists.sourceforge.net but
I think it is the wrong list).

 

I am trying to do something that I thought would be simple but is starting
to drive me crazy. 

I want to create a plug-in that will retain data in memory across multiple
executions. 

As an initial test, I created a counter plug-in:

 

use lib "/usr/local/nagios/libexec";

use utils qw(%ERRORS);

use strict;

use vars qw($counter);

$counter++;

print "The counter is ".$counter;

exit $ERRORS{'OK'};

 

So far, so good. 

When I test this in mini_epn, it works as expected incrementing each time I
invoke it.

However, when I add this as a check into the Nagios configuration file and
launch Nagios, the value does not increment across multiple executions.

 

What am I missing?

 

Thanks,

Tal

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20070906/964ce457/attachment.html>


More information about the Help mailing list