Xymon Mailing List Archive search

hobbitgraph.cfg definition for graphing total # httpd servers

3 messages in this thread

list Tom Georgoulias · Fri, 14 Oct 2005 15:43:58 -0400 ·
A problem came up which required us to monitor the total number of apache servers running on our webservers, and I solved it by adding adding a CDEF to apache1 hobbitgraph.cfg definition.  The attached patch uses sum of the idle & busy workers data values to create a third value, total workers, for hobbit to graph.  It also allowed me to use data I was already collecting with my apache tests instead of creating a new test or addon script, which is always good in my mind.

Since it did the trick and we were able to monitor httpd more closely, I thought I'd throw the patch out to the list for others to use, if they needed something like this.  If so, I hope it helps you.

Tom
list Arnoud Post · Sat, 22 Oct 2005 00:44:00 +0200 ·
There are a few errors in your rrd definitions (some misplaced "IW" and "TW"), this setup will work to get the totals into the same graph.

Good luck,
Arnoud Post

[apache]
        TITLE Apache Workers
        YAXIS # Worker Threads/Processes
        DEF:BW=apache.rrd:BW:AVERAGE
        DEF:IW=apache.rrd:IW:AVERAGE
        CDEF:TW=BW,IW,+
        AREA:TW#70FF70:TW Total Workers
        LINE2:BW#00CC00:BW Busy Workers
        LINE2:IW#007A00:IW Idle Workers
        COMMENT:\n
        GPRINT:BW:LAST:BW   \: %5.1lf%s (cur)
        GPRINT:BW:MAX: \: %5.1lf%s (max)
        GPRINT:BW:MIN: \: %5.1lf%s (min)
        GPRINT:BW:AVERAGE: \: %5.1lf%s (avg)\n
        GPRINT:IW:LAST:IW   \: %5.1lf%s (cur)
        GPRINT:IW:MAX: \: %5.1lf%s (max)
        GPRINT:IW:MIN: \: %5.1lf%s (min)
        GPRINT:IW:AVERAGE: \: %5.1lf%s (avg)\n
        GPRINT:TW:LAST:TW   \: %5.1lf%s (cur)
        GPRINT:TW:MAX: \: %5.1lf%s (max)
        GPRINT:TW:MIN: \: %5.1lf%s (min)
        GPRINT:TW:AVERAGE: \: %5.1lf%s (avg)\n     
quoted from Tom Georgoulias
Tom Georgoulias wrote:
A problem came up which required us to monitor the total number of apache servers running on our webservers, and I solved it by adding adding a CDEF to apache1 hobbitgraph.cfg definition.  The attached patch uses sum of the idle & busy workers data values to create a third value, total workers, for hobbit to graph.  It also allowed me to use data I was already collecting with my apache tests instead of creating a new test or addon script, which is always good in my mind.

Since it did the trick and we were able to monitor httpd more closely, I thought I'd throw the patch out to the list for others to use, if they needed something like this.  If so, I hope it helps you.

Tom


--- hobbitd/etcfiles/hobbitgraph.cfg.orig	2005-10-14 15:29:31.000000000 -0400
+++ hobbitd/etc/files/hobbitgraph.cfg	2005-10-14 15:33:36.000000000 -0400
@@ -710,10 +710,12 @@
	#DEF:IS=apache.rrd:IS:AVERAGE
	DEF:BW=apache.rrd:BW:AVERAGE
	DEF:IW=apache.rrd:IW:AVERAGE
+	CDEF:TW=BW,TW,+
	#LINE2:BS#00CC00:BS
	#LINE2:IS#FF00FF:IS
	LINE2:BW#555555:BW Busy Workers
	LINE2:IW#880000:IW Idle Workers
+	LINE2:IW#FF0000:TW Total Workers
	COMMENT:\n
	GPRINT:BW:LAST:BW   \: %5.1lf%s (cur)
	GPRINT:BW:MAX: \: %5.1lf%s (max)
@@ -723,6 +725,10 @@
	GPRINT:IW:MAX: \: %5.1lf%s (max)
	GPRINT:IW:MIN: \: %5.1lf%s (min)
	GPRINT:IW:AVERAGE: \: %5.1lf%s (avg)\n
+	GPRINT:TW:LAST:TW   \: %5.1lf%s (cur)
+	GPRINT:TW:MAX: \: %5.1lf%s (max)
+	GPRINT:TW:MIN: \: %5.1lf%s (min)
+	GPRINT:TW:AVERAGE: \: %5.1lf%s (avg)\n

[apache2]
	TITLE Apache CPU Utilization

 
list Tom Georgoulias · Mon, 24 Oct 2005 09:13:36 -0400 ·
quoted from Arnoud Post
Arnoud Post wrote:
There are a few errors in your rrd definitions (some misplaced "IW" and "TW"), this setup will work to get the totals into the same graph.
Thanks.  The patch I attached was a modified version of the one I'm actually using in production, so the typos were introduced by accident. (the variables & titles I use are more descrptive than those in the default hobbit file, to make it easier for other depts. to understand all of the data in Hobbit).

Tom