Forum Discussion
Logan_Ramirez_5
Nimbostratus
Apr 01, 2010iControl web app to generate data for Cacti graphing
Ok, so I found this link the other day talking about how to use 'wget' instead of SNMP for Cacti graphing.
http://penguinman-techtalk.blogspot.com/2009/03/cacti-graphing-remote-service-...
Logan_Ramirez_5
Nimbostratus
Apr 09, 2010yea, this is good, enjoyable, low-level stuff.
the reason I started this conversation was because that 'use wget to populate cacti' article hit right at home with how I (anyone!) could use iControl to generate meaningful outputs that could be graphed in Cacti - but I could not get with SNMP (either because I didn't know how or because of Cacti limitations).
That is, using iControl in this manner (I think) is unique and maybe even 'the only way available' right now to generate this kind of data for graphing 'what is going on' inside your network. In other words, while SNMP may be leaner, it's impossible to use (at least with Cacti?) to generate the types of graphs I am generating now.
There were two graphs I was specifically interested in:
1. graph usage of pool members in a virtual server.
2. graph total connections to our website vs. total database connections from the web server to handle those website connections.
Regarding 1, the business question for us is how often is our primary web server up? How many connections does it handle? When are we failing over to the backup server? How many times does that happen? Why does this happen? Who takes it down? etc, etc...we all know how the questions cascade once they start going...
Well, we could answer that lots of ways, but nothing beats a historical graph showing the data, showing the peaks and valleys of the pool members' usage. I couldn't find how to graph all of the pool member usage via SNMP or (as Hamish pointed out) overcome the Cacti limitations to create that graph.
2, though, is the real gem. Like others, we're focused on application tuning, lean development and we recognize that we have a lot of 'clean up' to do in our code throughout the company (along with lots of legacy code to update!) and we ran into an issue several months ago where our web apps were not closing data base connections when they were done (sadly, we discovered this the hard way).
Well, since I know what virtual servers each connection comes into (1, the external conns coming to our websites and 2, the internal conns from the servers to our database), i built a graph that area/stacks all of the web connections (representing that total number of simultaneous external connections) and is overlaid with a line of the database connections (representing the total number of database connections).
So in one snap shot we can see how many X database connections are being used to handle Y external web connections and, therefore, we can see the trending and, in fact, this morning I noticed at one point the total number of database connections (X) was HIGHER than the total number of Y external web connections. This was not the norm, so I zoomed in an sent the screen shot to the web developer showcasing the exact time this happened (on the graph) so now they can go back and pull the web logs for that time period and see what apps were being accessed and determine if that was a result of poor code or normal behavior. Boom, right to the heart of a problem. "Sr Developer, yesterday morning, between 11:15 and 11:30 am, we had 110 server database connections open while servicing 96 external web connections. This behavior is abnormal to our normal operations, can you see why?" is way more effective than "Sr Developer, we think yesterday we had more connections to the backend database than the front end server sometime yesterday morning, can you see why? or worse, no email at all because we have no idea!!!
While there are probably several tools you could 'run' to assess and evaluate this these are already in our toolbag (and free) and very effective.
Again, maybe there is some way to make this second graph work with SNMP, but consider the next iteration I'll be working on:
3. Adding another database connection line from our second data center from an entirely different LTM cluster.
3. Adding another stack for external web connections from our second data center from an entirely different LTM cluster.
That is, my current graph shows the total external web requests and database connections in one data center, but we have another data center that serves the same web apps, with data base connections coming back to DC 1 on a different virtual. So 'the REAL' company picture of how many Y external web apps are running with X data base connections is the sum of data running in two data centers (therefore on two different LTMs)...but with this app, it doesn't matter. I can get all of the vritual server and pool members active connections from any active LTM anywhere in 1 query to my iControl app which can then be graphed in 1 data input method.
And I can repeat this over and over using the name of the virtual or the pool (as opposed to researching the MIBs for each particular virtual and or pool member and opposed to having to create multiple data input methods to go to multiple devices, then merge the graphs somehow).
One query, one data input method, one graph - almost unlimited combination of virtual and pool members from any LTM cluster.
When I 'got that' I just had to share it, but maybe I'm alone on the excitement of it! haha!!
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects