[hobbit] hobbitgraph.cfg definition for graphing total # httpd servers

Arnoud Post arnoud at koekiemonster.com
Sat Oct 22 00:44:00 CEST 2005


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     

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
>
>  
>
>------------------------------------------------------------------------
>
>To unsubscribe from the hobbit list, send an e-mail to
>hobbit-unsubscribe at hswn.dk
>  
>




More information about the Xymon mailing list