Forum Discussion

zentropy_128313's avatar
zentropy_128313
Icon for Nimbostratus rankNimbostratus
Feb 04, 2005

Accessing a Pool's Common.Statistic properties from within an IRule

I'm writing an iRule that redirects traffic based on the value of STATISTIC_SERVER_SIDE_CURRENT_CONNECTIONS for a particular pool. Does anyone know if there is a way to access this value?

6 Replies

  • Loc_Pham_101863's avatar
    Loc_Pham_101863
    Historic F5 Account
    Unfortunately, currently there's no way to access statistics from within an iRule.

     

    Loc
  • unRuleY_95363's avatar
    unRuleY_95363
    Historic F5 Account
    We do already have an enhancement request for accessing such stats tracked as CR33356.

     

    It will likely be scheduled for implementation in our upcoming release later this spring.
  • Thanks.

     

     

    In the alternative, I was thinking that maybe I can create a cron job that uses the iControl SDK to periodically (e.g every 10 secs) poll the F5 for these statistics, and then insert them into the header of a request to a server managed by the F5.

     

     

    I would then write an iRule to look for this header variable, and if found, it would set a tcl global variable to this value. Then any other request needing this statistic would be able to access it via the global variable.

     

     

    Would this work?

     

     

    Regards
  • unRuleY_95363's avatar
    unRuleY_95363
    Historic F5 Account
    Yep, that would probably be a good way to work around it for now.

     

     

    You could even remove the stats header with "HTTP::header remove" so your clients don't even see it.

     

  • Was this functionality ever added to the iRule interfaces? I would like to use it to affect pool member status (pool member gets too slow, it is marked down by an iRule).
  • It would be very helpful to be able to get statistics for the virtual server and pool from an iRule. Unfortunately, this hasn't been added yet. You could open a case with F5 Support and ask them to provide status on CR33356 and to attach your request to the enhancement request.

     

     

    Aaron