Ad Widget

Collapse

monitoring in the router

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • perompak_bank
    Junior Member
    • Sep 2009
    • 1

    #1

    monitoring in the router

    i have some question,
    can zabbix do monitoring within the router, i mean, can zabbix be customized to login to the router and monitor the interface in the router (e.g extended ping to the interface). i'm currently searching for any monitoring solution that can do something like this. right now i'm just monitoring my servers using zabbix and my boss ask me whether zabbix can do like that. Anyone?
  • Kerrygeek
    Senior Member
    • Dec 2008
    • 115

    #2
    There may be a way to run a script to do what you're talking about, but what are you really trying to monitor? If you just want the status of an interface on a router, you can do it with snmp. Do an snmpwalk of a router and you can see the status of each interface, and I believe you can also get errors on each (but walk it to make sure, I don't remember).

    If you want ping times between a specific router and another device it would be more difficult but if you can live with the ping time between Zabbix and that device, that's very simple. I'm not sure exactly what you're looking for with a script to do pings. I'm not saying you're wrong, just that I'm too stupid to understand it! ;-) There's a lot of information about the router interfaces in snmp, you can probably get what you want there and it's much simpler than trying to write an external script to report to Zabbix. I'm not a software guy...

    Kerry

    Comment

    • surrytel
      Junior Member
      • Sep 2009
      • 1

      #3
      Check into expect

      You might want to look into expect. There are a few things I like to do that cannot be done via SNMP. For example, I have about 1500 cable modems off a Cisco UBR and I want to monitor how many are offline at any given time. So I wrote a little expect script and piped it through awk (expect could have done it all, but awk was easier for me because I'm not a tcl expert). It reports the sum of the modems offline to Zabbix which monitors and notifies me if the number of modems offline exceeds a certain number. I'm pretty happy with it so far.

      The one thing you have to be careful of, from what I have read, is slowing Zabbix down with external scripts like that. So what I did was set up a cron job that runs my expect/shell script and writes the modem count to a file every 10 minutes. Then I set a custom parameter up in zabbix agentd up to simply cat that file every 10 minutes. That way Zabbix doesn't have to wait on the router to respond, etc.

      Here's the expect homepage: http://expect.nist.gov/

      You might also want to check into the book "Exploring Expect"...it's very helpful. O'Reilly publishing has it in their Safari collection.

      Expect is really useful for other things too. If you have a bunch of routers/switches/whatever that you need to make the same changes to across your network, you can write expect scripts to do it all and save a lot of time, and more importantly errors.

      Hope this helps,
      Ben

      --
      Ben Logan
      Network Technician
      Surry Telephone Membership Corporation

      Comment

      • troffasky
        Senior Member
        • Jul 2008
        • 567

        #4
        Before you go reinventing the wheel with expect scripts to log into your router, have a look at RANCID:

        Solaris, SunOS, NetBSD, FreeBSD, Linux, Fedora, Redhat, OSPF, BGP, ATM, Juniper, Cisco.


        You don't actually have to use it for putting your router configs into a VCS, you can just use the clogin script to send commands to a router, eg

        'clogin -c "show ip int brie | in up" routername'

        In answer to your original question, you can create an ip sla object on the router to ping [or however you want to monitor] something from the router's point of view, and then poll the router for the results of the ping with SNMP. Effectively this gives you limited visibility into a customer's network without actually needing a Zabbix proxy or host inside the target network!

        Comment

        Working...