AnyEvent::Graphite::SNMPAgent - An SNMP agent which does non-blocking streaming of data from an SNMP server
my $agent = AnyEvent::Graphite::SNMPAgent->new( host => '127.0.0.1', port => '2003', interval => 60, timeout => 5, ); 'host' and 'port' are for the graphite server 'interval' is how many seconds should elapse between each time we try to fire off the queries. If you need multiple intervals create one AE::Graphite::SNMPAgent instance per set of metrics $agent->add_snmp(host => $host, oid => $oid, community => $community, graphite_key => $key, filter => sub { ... }); print "Running forever. CTRL-C to interrupt\n"; AnyEvent->condvar->recv;
Joshua Barratt, <josh at mediatemple.net>
<josh at mediatemple.net>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install AnyEvent::Graphite, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AnyEvent::Graphite
CPAN shell
perl -MCPAN -e shell install AnyEvent::Graphite
For more information on module installation, please visit the detailed CPAN module installation guide.