RE: Network Management Tools

From: Przemyslaw Karwasiecki (karwas@ifxcorp.com)
Date: Mon Aug 20 2001 - 15:17:30 EDT


Use rping MIB from cisco.

I have written some small script doing this,
but instead using mrtg I use RRD library.
General idea is shown in relevant script
fragments attached below.

If you are interested drop me a note and
I will send complete script to you.

Przemek

# set up an rping probe

    foreach $rping_target (@rping_targets) {
      my $to = $$rping_target{ip_address};
      next if $from eq $to;

      my $row = 1 + int(rand(2147483647)); # ugly way to say: MAX_LONG_INT

      # remember the row number to retrive rping results later
      # also used to destroy row after statistics are retrived
      $$rping_probe{targets}{$to}{rping_row} = $row;

      my $addr = pack("C*",split /\./, $to);

      $$rping_probe{session}->set([
        ["ciscoPingEntryStatus", $row, 6, "INTEGER"], # destroy(6)
        ["ciscoPingEntryStatus", $row, 5, "INTEGER"], # createAndWait(5)
        ["ciscoPingEntryOwner", $row, "PK NMS", "OCTETSTR"], #
        ["ciscoPingProtocol", $row, 1, "INTEGER"], # ip(1)
        ["ciscoPingPacketCount", $row, 10, "INTEGER"], #
        ["ciscoPingPacketSize", $row, 150, "INTEGER"], #
        ["ciscoPingAddress", $row, $addr, "OCTETSTR"] #
      ]);

      $$rping_probe{session}->set([
        ["ciscoPingEntryStatus", $row, 1, "INTEGER"] # active(1)
      ]);

      print " Rping initialized for target $to\n" if $debug;

    }

And actual data collection:

    foreach $target (keys %{$$rping_probe{targets}}) {

      my $from = $$rping_probe{ip_address};
      my $to = $target;
      my $row = $$rping_probe{targets}{$to}{rping_row};

      my ($rtt_min, $rtt_avg, $rtt_max, $pkt_sent, $pkt_rcvd, $completed) =
      $$rping_probe{session}->get([
        ["ciscoPingMinRtt", $row],
        ["ciscoPingAvgRtt", $row],
        ["ciscoPingMaxRtt", $row],
        ["ciscoPingSentPackets", $row],
        ["ciscoPingReceivedPackets", $row],
        ["ciscoPingCompleted", $row]
      ]);
     
      print " Rping stats collected for target $to\n" if $debug;
      
      $$rping_probe{targets}{$target}{rtt_min} = $rtt_min;
      $$rping_probe{targets}{$target}{rtt_avg} = $rtt_avg;
      $$rping_probe{targets}{$target}{rtt_max} = $rtt_max;
      $$rping_probe{targets}{$target}{pkt_sent} = $pkt_sent;
      $$rping_probe{targets}{$target}{pkt_rcvd} = $pkt_rcvd;
      $$rping_probe{targets}{$target}{completed} = $completed;

      $$rping_probe{session}->set([
        ["ciscoPingEntryStatus", $row, 6, "INTEGER"] # destroy(6)
      ]);

      print " Instance of Rping probe $row destroyed\n" if $debug;

      if($debug) {
        print time(), ",",
              "$from,$to,$rtt_min,$rtt_avg,$rtt_max,$pkt_sent,$pkt_rcvd,$completed\n";
      }
    }

-----Original Message-----
From: Andy E [mailto:cosworth@dircon.co.uk]
Sent: Monday, August 20, 2001 2:57 PM
To: cisco-nsp@puck.nether.net
Subject: Network Management Tools

Hi all,

I'm trying to find a tool which can measure and report latency from a
customer router through our network to the internet.

At present all our tools, sit on dmz's off the core network.
They measure latency etc from the core to the internet, and from the core to
the customer routers.

What I need to be able to do is work out latency and availability from the
customer router through the core to the internet.

e.g.

customer router-----circuit-----CORE Router-----circuit-----Internet
                                   MRTG etc
I need MRTG to some how send a packet from the customer router to the
internet via the core and record it.

Anybody got any ideas ?

Best Regards

Andy.



This archive was generated by hypermail 2b29 : Sun Aug 04 2002 - 04:12:50 EDT