NAME

Zabbix::Sender - A pure-perl implementation of zabbix-sender.

VERSION

Version 0.02

SYNOPSIS

This code snippet shows how to send the value "OK" for the item "my.zabbix.item" to the zabbix server/proxy at "my.zabbix.server.example" on port "10055".

use Zabbix::Sender;

my $Sender = Zabbix::Sender->new({
	'server' => 'my.zabbix.server.example',
	'port' => 10055,
});
$Sender->send('my.zabbix.item','OK');

SUBROUTINES/METHODS

_init_json

Zabbix 1.8 uses a JSON encoded payload after a custom Zabbix header. So this initializes the JSON object.

_init_hostname

The hostname of the sending instance may be given in the constructor.

If not it is detected here.

zabbix_template_1_8

ZABBIX 1.8 TEMPLATE

a4 - ZBXD b - 0x01 c4 - Length of Request in Bytes (64-bit integer), aligned left, padded with 0x00 c4 - dito a* - JSON encoded request

This may be changed to a HashRef if future version of zabbix change the header template.

_encode_request

This method encodes the item and value as a json string and creates the required header acording to the template defined above.

_decode_answer

This method tries to decode the answer received from the server.

send

Send the given item with the given value to the server.

Takes two arguments: item and value. Both should be scalars.

AUTHOR

"Dominik Schulz", <"lkml at ds.gauner.org">

BUGS

Please report any bugs or feature requests to bug-zabbix-sender at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Zabbix-Sender. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Zabbix::Sender

You can also look for information at:

ACKNOWLEDGEMENTS

This code is based on the documentation and sample code found at:

http://www.zabbix.com/wiki/doc/tech/proto/zabbixsenderprotocol
http://www.zabbix.com/documentation/1.8/protocols

LICENSE AND COPYRIGHT

Copyright 2011 "Dominik Schulz".

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.