Gathering massive amounts of data with SNMP

Anton Berezin <>

Sofia, August 2014

The task

Problem: scalability

Solution: multiplexing

Problem: real world

Solution: know your network

Problem: several pollers

All of a sudden, your knowledge of the network cannot be applied

Solution: a single poller

Enter SQE




my $sqe = Net::SNMP::QueryEngine::AnyEvent->new;

for my $ip (@hosts) {
  $sqe->gettable($ip, 161, '', # 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

Leaky abstraction

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.

Some parameters



Thank you! ☺