iRules Heat Map - US Only

Code is community submitted, community supported, and recognized as ‘Use At Your Own Risk’.

Short Description

This iRule is an update to the original by Colin Walker. It takes source IPs and does a geolocation lookup on them and if within a US State, adds that as a counter against that state in the session table memory. A request to /heatmap on the applicable virtual server will display a US map with request counts from each state utilizing Google's GeoCharts.

Problem solved by this Code Snippet

This is not solving a problem, but is providing enhanced view of data traversing the BIG-IP.

How to use this Code Snippet

  1. Apply the iRule to your application's virtual server
  2. To view the map, use the URI /heatmap
  3. To clear the data from memory, use the URI /resetmap

Code Snippet Meta Information

  1. Version: Tested on TMOS version 16.1.3, but should work as is on any version 12.1.x forward.
  2. Coding Language: iRules, HTML, and Javascript.

Full Code Snippet

Code is accessible in this gist on GitHub.

Published Nov 18, 2022
Version 1.0

Was this article helpful?

No CommentsBe the first to comment