check_citrix 'No output'.

Stanley Hopcroft Stanley.Hopcroft at IPAustralia.Gov.AU
Wed Feb 18 21:40:33 CET 2004


Dear Sir,

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

On Wed, Feb 18, 2004 at 10:16:50AM -0800, nagios-users-request at lists.sourceforge.net wrote:
> 
> Message: 18
> From: MEriksson at Interquad.com
> To: nagios-users at lists.sourceforge.net
> Subject: RE: [Nagios-users] check_citrix and no output
> Date: Wed, 18 Feb 2004 14:34:32 -0000
>

  .. snip ...
 
> I'm not sure if that is the 'right' fix either, but as long as it works I'm
> happy.
> 

It is one of the two or three right fixes.

check_citrix is a Perl plugin that depends on utils.pm (as all the
plugin coding standards conformant Perl plugins do).

Perl searches the the directories found in the Perl global @INC for
modules it requires.

(on this host it these directories are 

tsitc> perl -e '$,="\n"; print @INC, "\n"'
1 /usr/local/lib/perl5/site_perl/5.005/i386-freebsd
2 /usr/local/lib/perl5/site_perl/5.005
3 .
4 /usr/libdata/perl/5.00503/mach
5 /usr/libdata/perl/5.00503
tsitc> 

1 is site dependent arch dependent (in this case i386 for FreeBSD)
2 is site dependent arch independent (ie pure Perl modules)
4 is site independent arch dependendent (ie Perl exe)
5 is site independent arch independent (ie core Perl modules such as
  Data::Dumper)

utils.pm is a Perl modules that is site dependent so it goes into the 
2nd directory whatever path that is in your machine).

I chose to copy utils.pm into /usr/local/lib/perl5/site_perl/5.005; a
sym link would have had the same effect but been a little slower to
access.

You could also edit the plugin and add a

use lib '/path/to/utils.pm' ;

pragma. (perldoc lib). 'use lib' is probably the slowest of the 3
choices. (use lib is probably more appropriate for developing code that
depends on modules that haven't been installed, probasbly because the
module is still being hacked.).

'No output!' is Nagios telling you that the plugin wrote nothing to
STDOUT. For Perl plugins this _invariably_ means

1 a syntax error (trapped at compile time - like this one)

2 a run-time error

If you use ePN (embedded Perl Nagios), this behaviour has been changed
to log the Perl error in Nagios log (this ePN will be released with v2
or you can write me privately if you want to try it). The new behaviour
looks like

tsitc> grep ePN nagios.log | head -4
[1075784045] SERVICE ALERT: metaframe;ICA Master
Browser;UNKNOWN;SOFT;1;**ePN 'check_ica_browse' Use of uninitialized
value at (eval 36) line 163

[1075885276] SERVICE ALERT: sapintranet;Web interface to SAP
R3;UNKNOWN;HARD;2;**ePN 'check_sapintranet' Use of uninitialized value
at /usr/local/lib/perl5/site_perl/5.005/Dfa/MainframeSession.pm line
178, <F> chunk -7

[1076103121] SERVICE ALERT: firewall;Faults reported by AC Nielsen web
page checking service;UNKNOWN;SOFT;1;**ePN 'check_dmeasure' Use of
uninitialized value at (eval 19) line 219

[1076103421] SERVICE ALERT: firewall;Faults reported by AC Nielsen web
page checking service;UNKNOWN;SOFT;2;**ePN 'check_dmeasure' Use of
uninitialized value at (eval 19) line 214
tsitc> 

> Many thanks, Mike

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.


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
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