Re: Citrix plugin

Stanley Hopcroft <[email protected]>
Newsgroups gmane.network.netsaint.user
Message-ID <[email protected]>
Dear Jens,

(Konqueror looks pretty sharp.)

Please would you let me know if you are using the embedded Perl Netsaint
[1]

If you are, I think that may be the root of the problem [2].

Really, this is a problem that should be fixed in Netsaint/Nagios: the
plugin argument handling in the driver for the embedded Perl interpreter
needs revision. (this is the program named p1.pl)

There is only one work around that I am aware of: wrap the plugin in a
C wrapper so that Netsaint doesn't see it as a Perl program [3]

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.


Notes



1 You can find out with (as root) <path_to_Netsaint>/bin/netsaint -m

eg 

tsitc# /usr/local/netsaint/bin/netsaint -m

NetSaint 0.0.7
Copyright (c) 1999-2002 Ethan Galstad ([email protected])
Last Modified: 03-01-2002
License: GPL

External Data Modules
---------------------
Object Data:    DEFAULT
Status Data:    DEFAULT
Retention Data: DEFAULT
Comment Data:   DEFAULT

Options
-------
* Embedded Perl compiler (With caching)


tsitc# 



2 Running the embedded Perl interpreter simulator with a Perl program
that echos its arguments.

pc09011> ./c52
Enter file name: ap5 'In the beginning was the word' 'and the word'
embedded perl plugin return code and output was: 0 & '$ARGV[1]: 'In
$ARGV[2]: the $ARGV[3]: beginning $ARGV[4]: was $ARGV[5]: the
$ARGV[6]: word' $ARGV[7]: 'and $ARGV[8]: the $ARGV[9]: word' '

Enter file name: ap5 ''In the beginning'' ''was the word''             
embedded perl plugin return code and output was: 0 & '$ARGV[1]: ''In
$ARGV[2]: the $ARGV[3]: beginning'' $ARGV[4]: ''was $ARGV[5]: the
$ARGV[6]: word'' '
Enter file name: ^C
pc09011> 

3 C wrapper for Perl plugins that won't run with an embedded Perl
interpreter.

It's a good idea to rename your Perl program with a .pl suffix so you
can use the unsuffixed name for the executable name.


int
main(int argc, char *argv) {
  execv("/usr/local/netsaint/libexec/<your_perl_program>.pl", argv) ;
}

gcc -o <check_name> wrapper.c




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.