hi!
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.
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;
In the modules site at cpan there is some reference to return_result but I am not aware how to use it.
Maybe someone can give me a quick advise?
I would like to return a value not equal to 0.
thanks a lot!
cheers,
chris