Forum Discussion

Bret_McGinnis_1's avatar
Bret_McGinnis_1
Icon for Nimbostratus rankNimbostratus
Dec 28, 2005

Displaying Statistics

Hi,

 

 

I have several statistic that I collect in iRule array variables. I would like to view them through a web page.

 

 

Currently I have set up an internal VIP and pool with a stats iRule. The stats iRule writes the Stats to Syslog. I would like view the iRules stats I've collected through a web browser when I go the the stats internet VIP.

 

 

Can I do this through an iRule?

 

Should I do this in an iRule?

 

 

If I can and should do this in an iRule, how? Can you give me some guidlines and code examples?

 

 

 

Regards,

 

 

Bret

 

 

4 Replies

  • bl0ndie_127134's avatar
    bl0ndie_127134
    Historic F5 Account
    You may also want to considering sending the response in a more structured format such as an XML document instead of HTML.

     

     

    If you are using v9.2 or later version of BigIP, I would recommend that you use user defined statistics instead.

     

    In v9.2 you can create and populate statics all from rules. The nice things about these stats is that they are available to both the GUI and iControl. This means that you can write a SOAP client that can retreive these values. Don't forget that these request are correctly authenticated via iControl or the GUI.

     

     

    I think there should be examples in the forum on how to use these user-defined stats.
  • bl0ndie_127134's avatar
    bl0ndie_127134
    Historic F5 Account
    One clarification. When I say that you can 'create statistics' I am not talking about adding a new TCL variable that can be updated from your rule. Instead, you are creating stats fields much like the other stats BigIP collects and displays internally/externally via GUI and iControl.

     

     

    Of course these fields are available to rules but the subtle diference is that they are plummed to the framework much like rest of the stats.
  • Here's an example I posted a while ago while testing the stats profile functionality. It's not incredibly useful as is, but it demonstrates what I think your goal is.

     

     

     

    http://devcentral.f5.com/Default.aspx?tabid=28&view=topic&forumid=5&postid=4925

     

  • It works very well. Thanks you all for the quick response. After I finish the development I will ask my managment if they will allow me to post code

     

     

    Regards,

     

     

    Bret