Embedded Perl and check_disk_smb stopped working

Stanley.Hopcroft at Dest.gov.au Stanley.Hopcroft at Dest.gov.au
Tue Feb 7 23:31:59 CET 2006


Dear Folks,

I am writing to thank you for your letter and say,

>-----Original Message-----

>Message: 19
>Date: Tue, 7 Feb 2006 08:32:52 -0500
>From: "Chad Osmond" <chad.osmond at holburn.com>
>Subject: [Nagios-users] Embedded Perl and check_disk_smb 
>stopped working
>
>I just upgraded to 2.0rc2 and it seems that my 
>check_disk_smb.pl doesn't work any more. Any one have a 
>suggestion? I've verified that utils.pm does exist in the 
>/usr/lib/nagios/plugins directory and tried copying it to one 
>of the @INC directories 
>(/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi ) but 
>it still doesn't seem to work.
>
>Here is the error message:
>
>**ePN failed to compile 
>/usr/lib/nagios/plugins/check_disk_smb: "Can't locate utils.pm 
>in @INC (@INC contains: nagios/plugins 
>/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi
>/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi
>/usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi
>/usr/lib/perl5/site_perl/5.8.3" at /usr/sbin/p1.pl line
>

When using ePN you must remember that the Perl plugin is compiled 
_once_. 

(This is the benefit of embedding Perl: there is no need to recompile
plugins [that typically don't change] each time they are run. There is
also
no need to fork a new process and exec Perl. The tradeoff is more memory
and hard to
understand behaviour such as this).

The Perl plugin was compiled when

1 Nagios schedules the plugin for the first time.

2 The plugin text changes (the modification time is checked each time
  the plugin is scheduled).

What you have seen is that the ePN doesn't recompile the plugin
after you relocated utils.pm.

Your options are

1 Restart Nagios - there's no way to restart the embedded Perl component
  independently of Nagios

2 Make a trivail modification to the plugin text eg

  2.1 add a use lib qw(/path/to/utils.pm) ;

  2.2 add a no-op (No-op, No-op the CPUs sang) such
as a comment or a 1 == 1;

  2.3 I can't remember if touching the text works. If it does
this is the best way.

>Thanks,
>
>Chad=20
>

Yours sincerely.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
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