Forum Discussion

Fred_Kwong_1047's avatar
Fred_Kwong_1047
Icon for Nimbostratus rankNimbostratus
Mar 24, 2008

Using SNMP to take a pool member down.

I'm trying to find a method for using an SNMP script to take a pool member down. The reason to do so is we are migrating from a system that is already doing this for an older load balance device, and I would like to minimize the work that is neede to make the conversion happen. Has anyone had any luck doing this?
  • Custome Monitors

     

     

    Have you looked at the following:

     

    http://devcentral.f5.com/Wiki/default.aspx/AdvDesignConfig/SNMPDynamicRatioMonitor.html

     

     

    Perhaps there is a way to modify the script to your liking

     

     

    /CB

     

     

     

     

  • CB, I appreciate the help, but I don't think that's what I'm trying to do here. I think that script is more for the F5 to monitor pool members and have up down status based on making a snmp poll. I'm looking to do a snmp push to the F5 device to force pool members to go down.
  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    I don't believe you can influence the running configuration that way.

     

     

    Your best bet would be to use a simple iControl script to send the request via the LTM API. You can search the iControl forum & probably find a code snip you can use: Click here

     

     

    HTH

     

    /deb
  • SNMP does provide for the ability to set values and it looks as if there is certainly ability on the F5 to do this for pool members.

     

     

    I am looking to do the same as we use SNMP for other things and don't need a specific F5-icontrol solution if we can use what we already know and use.

     

     

    The pool member can be set from Enabled to Disabled with the ltmPoolMemberNewSessionEnable, which is a readwrite access parameter.

     

     

    if true it is enabled (All traffic allowed).

     

    if false it is disabled (Only persistent or active connections allowed)

     

     

    However, there seems to be a better parameter to work with that also allows values to be set:

     

     

    ltmPoolMemberMonitorState

     

     

    The name "monitor" doesn't seem to describe what I have observed it allowing me to set for a pool member:

     

     

    7 sets it to forceddown - which is Forced Offline (Only active connections allowed).

     

     

    other values are:

     

    0 - unchecked (no monitoring is set for this member)

     

    1 - checking

     

    2 up

     

    6 down

     

    9 disabled

     

     

    note that some of these appear to conflict with whatever service checking has been configured for the node. If you mark it as up (2), for example, it ddoesn't appear to bring monitoring up if there isn't any service checking.

     

     

    so for the most part, I think i'd use this one only to set a forced offline and return it back again. Returning it would be to put it back to the same value it was before you set it to offline (7).