ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-ZabbixSender/ZabbixSender.pm
(Generate patch)

Comparing AnyEvent-ZabbixSender/ZabbixSender.pm (file contents):
Revision 1.4 by root, Thu Jan 18 16:37:44 2018 UTC vs.
Revision 1.5 by root, Sat Sep 14 19:42:52 2019 UTC

29 29
30use AnyEvent (); 30use AnyEvent ();
31use AnyEvent::Socket (); 31use AnyEvent::Socket ();
32use AnyEvent::Handle (); 32use AnyEvent::Handle ();
33 33
34our $VERSION = '1.0'; 34our $VERSION = '1.1';
35 35
36=item $zbx = new AnyEvent::ZabbixSender [key => value...] 36=item $zbx = new AnyEvent::ZabbixSender [key => value...]
37 37
38Creates a (virtual) connection to a zabbix server. Since each submission 38Creates a (virtual) connection to a zabbix server. Since each submission
39requires a new TCP connection, creating the connection object does not 39requires a new TCP connection, creating the connection object does not
114 retry_min => 30, 114 retry_min => 30,
115 retry_max => 300, 115 retry_max => 300,
116 queue_time => 3600, 116 queue_time => 3600,
117 on_response => $NOP, 117 on_response => $NOP,
118 on_error => sub { 118 on_error => sub {
119 AE::log 4 => "$_[0]{zhost}:$_[0]{zport}: $_[1]"; # error 119 AE::log 4 => "$_[0]{zhost}:$_[0]{zport}: $_[2]"; # error
120 }, 120 },
121 on_loss => sub { 121 on_loss => sub {
122 my $nitems = @{ $_[1] }; 122 my $nitems = @{ $_[1] };
123 AE::log 5 => "$_[0]{zhost}:$_[0]{zport}: $nitems items lost"; # warn 123 AE::log 5 => "$_[0]{zhost}:$_[0]{zport}: $nitems items lost"; # warn
124 }, 124 },

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines