Anton Berezin <tobez@tobez.org>
Sofia, August 2014
Solution: multiplexing
Solution: know your network
All of a sudden, your knowledge of the network cannot be applied
Solution: a single poller
snmp-query-engine
https://github.com/tobez/snmp-query-engine
Net::SNMP::QueryEngine::AnyEvent
my $sqe = Net::SNMP::QueryEngine::AnyEvent->new;
for my $ip (@hosts) {
$sqe->gettable($ip, 161, '1.3.6.1.2.1.31.1.1.1.6', # ifHCInOctets
sub {
my ($h, $ok, $r) = @_;
for my $t (@$r) {
# OID in $t->[0]
# value in $t->[1]
}
});
}
$sqe->wait; # or do other AnyEvent stuff
Tries to asbtract away a lot.
But you still have to know your network.
Lots of parameters that can be configured
The defaults are generally sensible.