[Nagiosplug-help] check_citrix ?

Stanley Hopcroft Stanley.Hopcroft at IPAustralia.Gov.AU
Tue May 13 01:44:18 CEST 2003


Dear Sir,

I am writing to thank you for your letter about this matter and say that
the failure of cehck_citrix to find utils.pm (unless they are colocated
in the same path) is nothing more than the effect of the usual Perl
module search mechanism.

Any module you want used by a Perl program (utils.pm used by _all_ the
standard Perl plugins as well as check_citrix) needs to be where Perl
expects it to be namely,

1 The current working directory - so sticking utils.pm it in 
<path_to_Nag>/libexec will work

2 The architecture independent module search paths ie

2.1 The site specific path

2.2 The site independent path

for a 5.005_03 system these are (perl -V | tail)

2.1 /usr/local/lib/perl5/site_perl/5.005
2.2 /usr/libdata/perl/5.00503

In my case, utils.pm sits in /usr/local/lib/perl5/site_perl/5.005 along 
with all the other modules this sites plugins depend upon (HTML::Parser, 
Net::SMTP, LWP, Netsaint::Web_trx, Net::Smb etc)

I suppose the ideal thing would be for someone to either

1. publish utils.pm on CPAN and people would have to download and
install it in order to use Perl plugins

  Obviously an unattractive solution since the Perl plugins are thereby
  hobbled.

2. package utils.pm as an installable Perl module (this is trivial) and 
have the Nag plugin installation install it.

  Not much better.

3. have contrib Perl programs _fail_ with a note saying that unless you 
add the correct use lib pragma to the plugin it is not going to work.

  Probably the only feasable although disgusting solution for 
  Contributed Perl plugins.

4. The curent option in that contributed plugins are not on the same 
level as standard Plugins.

This means that you and you (and that means you hiding in the back row)  
must do some _work_ to install them and get them going.

This really means inspecting the plugin text and correcting it for

. incorrect paths (eg to smbclient or rpcclient)
. ensuring that required modules are installed 
. checking things that are likely to be stumbling blocks (eg unsafe 
coding for embedded Perl)

Why is this ?

Because the contrib plugins are not

. installed by the Nag installer and lack the system awareness that the 
standard install process acquires (with blood, sweat and tears)

. tested

. have not the same user base as the standard plugins

With the contrib plugins, the assumption is that you have downloaded 
some code from somewhere and you have to port it. Let me assure you that 
much less is required in porting a Perl plugin than a C plugin.

However, from a Nag point of view, sooner or later you will find 
yourself confronted with the plugin that fails with 'No output!'.

The only way of dealing with this is to 

. be aware of how Nag can be compiled with DEBUG options to deal with 
this situation

 or

. running Nag in the foreground (no -d) so that any despairing wails 
from the Perl runtime or the plugin are visible

 or

. Plugin surgery (probably in conjunction with the last option) to 
log more output about where it's up to

 eg litter the plugin text with print STDERR, "8 bells and all's well\n" 
;
            .. time and program counter passes ..

                                print STDERR "9 bells and all's well\n" 
;

Yours sincerely. 


-- 
------------------------------------------------------------------------
Stanley Hopcroft
------------------------------------------------------------------------

'...No man is an island, entire of itself; every man is a piece of the
continent, a part of the main. If a clod be washed away by the sea,
Europe is the less, as well as if a promontory were, as well as if a
manor of thy friend's or of thine own were. Any man's death diminishes
me, because I am involved in mankind; and therefore never send to know
for whom the bell tolls; it tolls for thee...'

from Meditation 17, J Donne.


-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.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