
POE::Component::Client::BigBrother - a POE Component for sending Big Brother commands

Version 0.01

use strict;
use POE qw< Component::Client::BigBrother >;
POE::Session->create(
inline_states => {
_start => sub {
POE::Component::Client::BigBrother->send(
host => $bbhost,
event => "_result",
command_type => "status",
command_fields => {
host => "front01.domain.net",
service => "cpu",
color => "red",
message => "load average is 105.45",
},
);
},
_result => sub {
my $result = $_[ARG0];
},
},
);

POE::Component::Client::BigBrother is a POE component which can be used to send commands to a Big Brother server.
This module tries to follow POE::Component::Client::NSCA API whenever possible.

Parameters
(mandatory) Big Brother server name
(optional) Big Brother server port, default 1984
(optional) number of seconds to wait for socket timeouts, default is 10
(optional) number of times to retry connecting after an error, default is 2
(mandatory) the event handler in your session where the result should be sent
(optional) your session name, in case this component is from from within another session
(mandatory) command type, must be one of status, page, enable, disable, event
(mandatory) command fields, must be a hash reference, with the appropriate fields; see "COMMANDS"

status and page commands(mandatory) the host name this command applies to
(mandatory) the service name this command applies to
(mandatory) the color (result) of this command, must be one of: green, yellow, red
(mandatory) the message body of this command
(optional) the offset of this command
disable command(mandatory) the host name this command applies to
(mandatory) the service name this command applies to
(mandatory) the message body of this command
(mandatory) the period of time during which the service is to be disabled
(optional) the offset of this command
enable command(mandatory) the host name this command applies to
(mandatory) the service name this command applies to
(mandatory) the message body of this command
(optional) the offset of this command
event command(mandatory) the host name this command applies to
(mandatory) the service name this command applies to
(mandatory) the event message ID; should be unique
(optional) the activation time as a Unix timestamp; defaults to the current time
(optional) the expiration time as a Unix timestamp
(optional) the escalation time as a Unix timestamp
(mandatory) the color of this event message

This event is generated by the component. ARG0 will be a hash reference with the following keys:
the hostname given
the message that was sent
anything that you specified
indicates that the check was successfully sent to the NSCA daemon
only exists if something went wrong

(E) The caller did not provide the indicated field for the given command.
(E) The caller did not provide the indicated parameter to the component.
(E) The value of the given session parameter could not be resolved to a running POE session.
(E) An illegal value was given for the command_type parameter.

Sébastien Aperghis-Tramoni, <sebastien at aperghis.net>

Please report any bugs or feature requests to bug-poe-component-client-bigbrother at rt.cpan.org, or through the web interface at https://rt.cpan.org/Public/Dist/Display.html?Name=POE-Component-Client-BigBrother. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

You can find documentation for this module with the perldoc command.
perldoc POE::Component::Client::BigBrother
You can also look for information at:
https://rt.cpan.org/Public/Dist/Display.html?Name=POE-Component-Client-BigBrother
http://cpanratings.perl.org/d/POE-Component-Client-BigBrother
http://search.cpan.org/dist/POE-Component-Client-BigBrother/

Copyright 2010 Sébastien Aperghis-Tramoni.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.