]> git.sesse.net Git - nms/commitdiff
Fetch load data for the 6509 matrix as well.
authorSteinar H. Gunderson <sesse@samfundet.no>
Sun, 2 Apr 2006 19:55:01 +0000 (19:55 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Sun, 2 Apr 2006 19:55:01 +0000 (19:55 +0000)
clients/snmpfetch.pl

index b02f02112ecad3f4632d4778dc8ec867b4ea4f68..2798413fe3e9486389f1f3eb5275d5ee61f1f01d 100755 (executable)
@@ -143,6 +143,7 @@ while (1) {
                        $qtemppoll->execute($switch->{'switch'},
                                        $avgtemp) or die "Could not exec qtemppoll";
                 } elsif ($switch->{'switchtype'} eq 'cisco6509') {
+                       # fetch load data for the entities
                        for my $i (1..5) {
                                # find the ID
                                my $oid = BER::encode_oid(1, 3, 6, 1, 4, 1, 9, 9, 109, 1, 1, 1, 1, 2, $i);
@@ -157,6 +158,23 @@ while (1) {
                                $qcpupoll->execute($switch->{'switch'}, $entity, $value)
                                        or die "Could not exec qcpupoll";
                        }
+                       
+                       # fetch load data for the matrix
+                       for my $i ([1,0], [1,1], [2,0], [2,1], [4,0], [5,0], [6,0]) {
+                               # in
+                               my $oid = BER::encode_oid(1, 3, 6, 1, 4, 1, 9, 9, 217, 1, 3, 1, 1, 6, $i->[0], $i->[1]);
+                               my $in_util = fetch_snmp($session, $oid);
+
+                               $qcpupoll->execute($switch->{'switch'}, 100000 + $i->[0] * 10 + $i->[1], $in_util)
+                                       or die "Could not exec qcpupoll";
+                               
+                               # ou
+                               $oid = BER::encode_oid(1, 3, 6, 1, 4, 1, 9, 9, 217, 1, 3, 1, 1, 7, $i->[0], $i->[1]);
+                               my $out_util = fetch_snmp($session, $oid);
+
+                               $qcpupoll->execute($switch->{'switch'}, 200000 + $i->[0] * 10 + $i->[1], $out_util)
+                                       or die "Could not exec qcpupoll";
+                       }
                }
                $session->close;
        };