Forum Discussion

Dave_McCauley_3's avatar
Dave_McCauley_3
Icon for Cirrostratus rankCirrostratus
Feb 07, 2019

Get Active/Standby Device in iRule

Is there a simple way to determine if a device is standby in an iRule? I have a unique requirement with a virtual that has to be in the local-only traffic group, but also need to determine if the device is active.

 

  • Sorry, I am not giving you a straightforward answer but have you tried looking into watch command, script run or iCall

     

    Maybe if you can explain why you need to find the device status, someone might be able to provide an alternate solution to using iRule.

     

  • A few points on this:

    1. iRules run within TMM as a traffic event process and have no direct access to the underlying F5 system, only get the data provided from pre-defined commands and events.

    2. If you assign a Virtual Server to the

      local-only
      traffic group it will always, as long as TMM is running, be seen as active as each traffic group holds its own HA state. Also if the
      traffic-group
      was not in an
      active
      state it wouldn't process traffic and so you iRule would never be executed.

    Like Vijay said maybe give a little more info on what you are trying to accomplish and see if someone on here can help.