Xymon::Plugin::Server::Status - Xymon status reporter
use Xymon::Plugin::Server::Status qw(:colors); my $status = Xymon::Plugin::Server::Status->new("myhostname", "test"); $status->add_status(GREEN, "this entry is OK"); $status->add_status(RED, "this entry is NOT OK"); $status->add_message("Hello! world"); $status->add_devmon($devmon); # see Xymon::Plugin::Server::Devmon $status->add_graph("disk"); $status->report; # send status to Xymon server
Color names
GREEN YELLOW RED CLEAR PURPLE BLUE
are exported with tag ':colors'
Create status object for hostname and testname.
attr is optional hashref to change actions of object. Currently, following parameter is defined.
Make no change to message.
Some characters (<, >, &) are replaced to '_'.
'<', '>, '&' are replaced to '<', '>', '&' respectively.
Add status and its short message.
Add message shown in Xymon status page.
Add devmon data. See Xymon::Plugin::Server::Devmon
Add graph shown in Xymon status page. "test" name must be defined in graph definition file. (named hobbitgraph.cfg in Xymon 4.2, graphs.cfg in Xymon 4.3)
Report current status to Xymon server.
To install Xymon::Plugin::Server, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Xymon::Plugin::Server
CPAN shell
perl -MCPAN -e shell install Xymon::Plugin::Server
For more information on module installation, please visit the detailed CPAN module installation guide.