chris01 has asked for the wisdom of the Perl Monks concerning the following question:
My question is pretty specific but I am a bit desperate here since some time.
I am using POE and POE::Component::Server::NRPE to implement a Nagios NRPEd.
Its fine but I am not able to return the correct value in the command. but the text is ok.In the modules site at cpan there is some reference to return_result but I am not aware how to use it.use POE; use POE::Component::Server::NRPE; # test with: check_nrpe -H localhost -c test; echo $? my $nrped = POE::Component::Server::NRPE->spawn (port => 5666); $nrped->add_command (command => "test", program => sub { print STDOUT "test CRITICAL\n"; return 2; #### always 0??? }); $poe_kernel->run (); return 0;
Maybe someone can give me a quick advise? I would like to return a value not equal to 0.
thanks a lot! cheers, chris
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Return-code in POE::Compoent::Server::NRPE
by rcaputo (Chaplain) on Nov 08, 2012 at 18:14 UTC | |
by chris01 (Novice) on Nov 08, 2012 at 19:25 UTC | |
by rcaputo (Chaplain) on Nov 08, 2012 at 19:37 UTC | |
by chris01 (Novice) on Nov 08, 2012 at 19:57 UTC | |
by rcaputo (Chaplain) on Nov 08, 2012 at 22:46 UTC | |
by chris01 (Novice) on Nov 09, 2012 at 11:15 UTC | |
by chris01 (Novice) on Nov 08, 2012 at 19:02 UTC |