POE::Component::Client::NRPE is a POE component that implements version 1 and version 2 of the nrpe (Nagios Remote Plugin Executor) client, check_nrpe. It also supports SSL encryption using Net::SSLeay and a hacked version of POE::Component::SSLify.

'host', the hostname or IP address to connect to, mandatory;
'event', the event handler in your session where the result should be sent, mandatory;
'session', optional if the poco is spawned from within another session;
'port', the port to connect to, default is 5666;
'version', the NRPE protocol version to use, default is 2;
'usessl', set this to 0 to disable SSL support with NRPE Version 2, default is 1;
'command', the command to run remotely, default is '_NRPE_CHECK';
'args', any arguments to be passed along with the 'command';
'context', anything you like that'll fit in a scalar, a ref for instance;
'timeout', number of seconds to wait for socket timeouts, default is 10;
'unknown', set this to true to make the poco return socket timeouts as UNKNOWN instead of CRITICAL;

The 'session' parameter is only required if you wish the output event to go to a different session than the calling session, or if you have spawned the poco outside of a session.

The poco does it's work and will return the output event with the result.

This is generated by the poco. ARG0 will be a hash reference with the following keys:

'version', the NRPE protocol version;
'host', the hostname given;
'command', the command that was run;
'context', anything that you specified;
'result', the Nagios result code, can be 0,1,2 or 3;
'data', what the NRPEd gave us by way of output;