Forum Discussion

Brian_Gupta_115's avatar
Brian_Gupta_115
Icon for Nimbostratus rankNimbostratus
Oct 13, 2005

Nagios iControl plugin....

I was planning on doing this... Looks like someone beat me to the punch.

 

 

Click here

 

http://www.nagiosexchange.org/Networking.53.0.html?&tx_netnagext_pi1[p_view]=347

 

 

-Brian
  • Richard__Harlan's avatar
    Richard__Harlan
    Historic F5 Account
    That was me, we have been useing Nagios for awhile and during the 4.5 days most of our checks were SNMP. Now with the new release we went with iControl. I am working on writeing more, will post with more of the scripts are out there. If anyone wants to add something feel free. Thanks
  • Cool stuff hunter32! Please keep us in the loop when you create more of these so that we can share them with the community.

     

     

    If you see a benefit, we can create a section on the site for sharing things like this.

     

     

    -Joe
  • I modified the demo perl script. to list all pools and their nodestatuses... I haven't integrated it with Nagios yet... Not sure what the best way to go about that would be...

     

     

    A proposed approach:

     

     

    Each VIP translates to a nagios node?

     

    - Green for all nodes up.

     

    - Yellow for some nodes up.

     

    - Red for all nodes down.

     

     

    Thoughts?

     

     

    Thanks,

     

    Brian

     

     

    Script output....

     

    -------------------------------

     

    Pool: pst_rpt_fin_ssl

     

    Members:

     

    10.176.28.73:7024 - MONITOR_STATUS_DOWN

     

    10.176.28.73:7034 - MONITOR_STATUS_UP

     

    Pool: scrmrpt

     

    Members:

     

    10.176.28.73:21 - MONITOR_STATUS_UP

     

    Pool: shrdbftp

     

    Members:

     

    10.176.28.33:21 - MONITOR_STATUS_UP

     

    10.176.28.34:21 - MONITOR_STATUS_UP

     

    Pool: scrmdbftp

     

    Members:

     

    10.176.28.13:21 - MONITOR_STATUS_UP

     

    10.176.28.14:21 - MONITOR_STATUS_UP

     

    Pool: sfinrpt

     

    Members:

     

    10.176.28.73:21 - MONITOR_STATUS_UP

     

    Pool: shrrpt

     

    Members:

     

    10.176.28.73:21 - MONITOR_STATUS_UP

     

  • Richard__Harlan's avatar
    Richard__Harlan
    Historic F5 Account
    We kind of shyed away from doing somthing like this. What we do is have Nagios hit each site through the VIP and send out alerts for each site.

     

     

    Though what mite be nice is a go with the basic idea then before passing the output to nagios scan for the sites that are down and only pass those site as the output to nagios. That way is should be easy to see what is up and what is down.

     

     

    Also if you do a little regex and only pass back the pool name it will clean it up. Though it all depends on the people that are getting the alerts.

     

     

    For us it goes to our NOC and we use Nagios to pass alerts to HP oven view. The Nagios alerts have also been change to only pass the url of the site, since this is what the operators use to look up information on the application. But if you are the one getting the alerts then the format should be what you want. Though for wide use it mite be nice to do a reverse lookup on the IP address and return a Hostname as eather up or down, that should not add too much more over head if you only do it for nodes that are down.

     

     

    You could also add a little switch to alerts is all nodes are down not just one. That way you do not get alerts for load balance sites that are not totaly down. Just my two cents.

     

     

    As you were saying Joe, I think there could be a part of dev central for Monitor these guys, for most of us if these things go down there goes the network. I know you guys have MOM plugins, but it would be nice to have a place to upload monitoring scripts for other tools that some of us use.

     

     

    Thanks
  • Richard__Harlan's avatar
    Richard__Harlan
    Historic F5 Account
    Just updateing the list added a new check to check the status of a list of interfaces and alert if any do not report back MEDIA_STATUS_UP
  • Hunter, as I understand Nagios supports Green, Yellow and Red... I was thinking that a VIP could be marked as yellow if the following two conditions are met:

     

     

    1) At least one node in the VIP is marked down.

     

    2) There is only one active node in the rotation.

     

     

    What do you think?

     

     

    Thanks,

     

    Brian
  • Richard__Harlan's avatar
    Richard__Harlan
    Historic F5 Account
    That would be cool. To generate the yellow event in Nagios once you find only one Node is up is exit 2. That will cause Nagios to put the service in a Warning state. The hardest part would be adding all the services into Nagios. Though you could write a iControl script that would rip through the BigIP config and output a Nagios Services Config. If I get a little time I will play with that idea.