Forum Discussion

eblair84_141985's avatar
eblair84_141985
Icon for Nimbostratus rankNimbostratus
May 14, 2014

Native method to manually change the state of a monitor

Is there a native way to manually monitor and possibly change the state of a pool member, without having to use the iControl interface? I want to get approval to use a Java or Pel iControl library but have to exhaust my alternatives therein first.

 

  • http://support.f5.com/kb/en-us/solutions/public/7000/400/sol7444.html?sr=37369745

     

    You can add logging statements to your external monitor to view the variable output. /var/log/ltm is a good target.

     

    Once I know the variables, I play with the script from the shell until it behaves like I expect.

     

    Make sure you have handling to gracefully exit the process included in the script. These monitors fire off at the interval you specify, usually seconds, and they can stack up quite quickly and cause memory contention issues.

     

  • Brent_West_7733's avatar
    Brent_West_7733
    Historic F5 Account

    You can see the state of a pool member through TMSH on the CLI or through the GUI.

     

    CLI: tmsh show ltm pool [pool name] members { [node]:[port] } | grep Availability

     

    GUI: Local Traffic > Pools > Members

     

    Setting the status is a matter of disabling through CLI or GUI

     

    CLI: modify ltm pool [pool name] members modify { [node]:[port] { state user-down } }

     

    In the GUI, simply click the checkbox next to the pool member, click disable

     

    • eblair84_141985's avatar
      eblair84_141985
      Icon for Nimbostratus rankNimbostratus
      So, I'm working on a project to create custom monitors for our various back-end servers. The first monitor is to send a query off to a wsdl which requires a certificate to authenticate. It returns an xml string as a response. I want to parse the xml string for a given value and show the accompanying resource as up or down accordingly. I can do all of this from a bash script easily enough. The fun part comes when I try to integrate the mechanism into becoming a heartbeat monitor for the resource. I tried configuring an external monitor for it from the bash script but it seems to always mark the resource down. I'm also unsure how the system internally treats the variables setting within the external monitor. Thanks again, Chris
  • Brent_West_7733's avatar
    Brent_West_7733
    Historic F5 Account

    http://support.f5.com/kb/en-us/solutions/public/7000/400/sol7444.html?sr=37369745

     

    You can add logging statements to your external monitor to view the variable output. /var/log/ltm is a good target.

     

    Once I know the variables, I play with the script from the shell until it behaves like I expect.

     

    Make sure you have handling to gracefully exit the process included in the script. These monitors fire off at the interval you specify, usually seconds, and they can stack up quite quickly and cause memory contention issues.

     

    • eblair84_141985's avatar
      eblair84_141985
      Icon for Nimbostratus rankNimbostratus
      So, then the last question I have is what part does the "variables" play in the external monitor? The "arguments" parameter makes sense in an argv[] sense.
  • Brent_West_7733's avatar
    Brent_West_7733
    Historic F5 Account

    If your external monitor was going to use curl, for example, the variables you create in the external monitor definition would become the arguments for curl.

     

    -u $username -p $password, etc.

     

    • eblair84_141985's avatar
      eblair84_141985
      Icon for Nimbostratus rankNimbostratus
      Hey, thanks a lot for all your help! I made some great forward progress on the project and now have a much better idea of how to leverage these parts of Big-IP in the future.