[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] "virtual hosts" for combined graphs?
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] "virtual hosts" for combined graphs?
- From: Ralph Mitchell <ralphmitchell (at) gmail.com>
- Date: Sun, 4 Jul 2010 11:30:17 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=c7VJBwOtRC+kIIHSM0CdEulM9iyrxfMAT8G3XIMb5lo=; b=Zo/mIRG0ZFFwoWLp1Wq/Tb2bb4r/6E5p7Q4go6HAltIKsOX4tkkK/HV8BwaQgTh5tB F+tP76SL9oqOIu4wCyVJPTXc5TGfjaBJtY3PKrN1GkzNLPOlkJnoWK2sCYAbTXiABIyF lWb53WRHVt9QcuU1dc2SwFSKyXIc03GVnHmqw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=p8QsLNGjgEG12qY2l3GCewYOX4IoBR2q+jsnXNn+AxPY/ZewlgGTK4MJx28Thubcdl 1DEQBs30NgFvzd1+XWgmowd2w5pNh2vj555uehge2SM6F3q1somdi0nfiJdW8yI9Ueji GALGbPcryHZ7oIDY54NkTjL4wU5eKza2SJOc0=
- References: <2056.145.74.204.11.1277906407.squirrel (at) general-failure.com>
I think you should be able to put the graph definition into
server/etc/hobbitgraph.cfg with a suitable name, then put that name into
both the "TEST2RRD" & "GRAPHS" environment variables in
server/etc/hobbitserver.cfg. Then send a suitable status message to xymon
and the graph shows up.
I've just tried this on my laptop: mash two existing graph definitions
together (cpu freq and battery capacity) into one called "batfreq". Add
"batfreq" to "TEST2RRD" & "GRAPHS". Send test message:
server/bin/bb localhost "status lorien.batfreq green `date`"
A short time later a new column shows up called batfreq. Clicking through
thre green dot shows a single graph containing both battery capacity and 2
cpu frequency lines (dual-core cpu).
In your case, I think you might be able to get the combined graph to show up
for each server by sending multiple status messages:
server/bin/bb localhost "status server1.xxx green `date`"
server/bin/bb localhost "status server2.xxx green `date`"
etc...
all from one script. Or just define a new server name in bb-hosts and send
one message. Either way, you'll probably want to have a regular status
message going to Xymon so that the new column doesn't go purple.
Ralph Mitchell
On Wed, Jun 30, 2010 at 10:00 AM, Walter van Loon <
hobbit (at) general-failure.com> wrote:
> I created a small script that scrapes info from several hosts/rrd's
> (connections to a particular IIS site) and puts it in a combined graph
> (see attached sample). I'm curious if it's possible to somehow create a
> "virtual host" in hobbit and use the hobbitgraph.cgi functions to create
> the graphs so I can also have the zoom & history functions.
>
> This is the script that created the attached graph:
>
> #!/bin/bash
>
> timestamp=COMMENT:Updated\\:`date|sed 's/:/\\\\:/g'`
>
> rrdtool graph combined.png \
> --imgformat=PNG \
> --title="Connections to xxxxxx.xxx.xx Last 48 Hours" \
> --base=1000 \
> --height=120 \
> --width=576 \
> -s e-48h \
> --slope-mode \
> --lower-limit=0 \
> --vertical-label="# connections" \
> --step 576 \
>
> 'DEF:a=/var/lib/hobbit/rrd/server1/iisinfo.online.han.nl.rrd:realmempct:AVERAGE'
> \
> 'AREA:a#0000CC:server1\t' \
> 'GPRINT:a:AVERAGE:Avg\: %7.0lf %s\t' \
> 'GPRINT:a:MAX:Max\: %7.0lf %s\j' \
>
> 'DEF:b=/var/lib/hobbit/rrd/server2/iisinfo.online.han.nl.rrd:realmempct:AVERAGE'
> \
> 'STACK:b#0000FF:server2\t' \
> 'GPRINT:b:AVERAGE:Avg\: %7.0lf %s\t' \
> 'GPRINT:b:MAX:Max\: %7.0lf %s\j' \
>
> 'DEF:c=/var/lib/hobbit/rrd/server3/iisinfo.online.han.nl.rrd:realmempct:AVERAGE'
> \
> 'STACK:c#3333FF:server3\t' \
> 'GPRINT:c:AVERAGE:Avg\: %7.0lf %s\t' \
> 'GPRINT:c:MAX:Max\: %7.0lf %s\j' \
>
> 'DEF:d=/var/lib/hobbit/rrd/server4/iisinfo.online.han.nl.rrd:realmempct:AVERAGE'
> \
> 'STACK:d#6666FF:server4\t' \
> 'GPRINT:d:AVERAGE:Avg\: %7.0lf %s\t' \
> 'GPRINT:d:MAX:Max\: %7.0lf %s\j' \
>
> 'DEF:e=/var/lib/hobbit/rrd/server5/iisinfo.online.han.nl.rrd:realmempct:AVERAGE'
> \
> 'STACK:e#9999FF:server5\t' \
> 'GPRINT:e:AVERAGE:Avg\: %7.0lf %s\t' \
> 'GPRINT:e:MAX:Max\: %7.0lf %s\j' \
>
> 'DEF:f=/var/lib/hobbit/rrd/server6/iisinfo.online.han.nl.rrd:realmempct:AVERAGE'
> \
> 'STACK:f#CCCCFF:server6\t' \
> 'GPRINT:f:AVERAGE:Avg\: %7.0lf %s\t' \
> 'GPRINT:f:MAX:Max\: %7.0lf %s\j' \
> 'CDEF:total=a,b,+,c,+,d,+,e,+,f,+' \
> 'LINE1:total#FF0000:Total\t' \
> 'GPRINT:total:AVERAGE:Avg\: %7.0lf %s\t' \
> 'GPRINT:total:MAX:Max\: %7.0lf %s\j' \
> "$timestamp"
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe (at) hswn.dk
>
>