Enhancing visibility through iRules and RSS

The business folks in your organization like to have visibility into every aspect of the business, including the disparate pieces of infrastructure that deliver the applications crucial to the company's bottom line. There are a number of ways in which you can provide visiblity into the delivery of those applications via BIG-IP.

Yes, you could export logs and create charts in Excel, but that's not very real-time. You could also use the administrative domain features in v9.4 to give business owners view-only access to your BIG-IP so they can view the statistics themselves.

Another possibility (and much cooler in my opinion) is to provide an RSS feed via an iRule. Yes, I'm saying you can syndicate the performance of your BIG-IP. This provides an easy mechanism through which business and management stakeholders can monitor the performance and delivery statistics of their mission critical applications without you generating reports or requiring the stakeholders to bother IT for their credentials yet again.

How to Set up an RSS Feed for your BIG-IP

First, find an appropriate URI that is unique that can return the RSS feed on your virtual server. For example, I chose "/rss". Then collect the appropriate statistics from the stats profile and craft your RSS response. If you aren't familiar with RSS there are number of sites that provide good examples for the most popular RSS format specifications (0.9, 0.91, 2.0). I like 2.0, but that's a matter of (sometimes hotly debated) opinion.

Here's a simple example of an RSS 2.0 feed:

 
   
       
         BIG-IP Statistics 
         http://myvirtualip.com/ 
         Statistics for My Virtual Server 
          
            Current Connections 
            12345 
          
          
            Total Requests 
            456781919 
          
       
   

You'll of course want to modify the titles, and if you really get crazy RSS 2.0 includes the ability to embed images as well. You can use iRules to gather virtual server specific information such as its name, active members, etc... as well, so you can really customize the heck out of the feed.

You can put whatever statistics you think are relevant from the statistics profile, and just because we like flexibility you can even create custom statistics profiles and report on more application specific statistics. Joe wrote a great tech tip on retreiving statistics from your BIG-IP using iRules that is a great place to start checking out the possibilities. His examples include the ability to reset the statistics, and outputs in HTML, but the concept is the same.

This iRule itself is pretty simple, Joe's includes the ability to process several reporting-specific URIs so you could modify his example to support multiple syndication formats based on the URI.  

when HTTP_REQUEST {
   set uri [HTTP::uri]
   if { $uri starts_with "/rss"} {
       # get the statistics you want to report 
       HTTP::respond 200 " ** output the RSS format of choice with the statistics ** "
   }
}

Go on, syndicate your BIG-IP. Your enterprise stakeholders will thank you for it.

Imbibing: Mountain Dew