[xymon] RE: graph a sum from different graphs

SEGLARD, Thomas tseglard at wat.tv
Wed Dec 22 12:15:03 CET 2010


Hi Bill, Hi all,

 

Do i need a Xymon version > 4.2 to be able to use SPLITNCV ? I have only on my production environment the 4.2.3 version deployed. Next question is do you have any doc about the use of this module ? Thanks.

Sincerly,

 

ThomaS 

 

De : Bill Richardson [mailto:wrichardson at llbean.com] 
Envoyé : lundi 20 décembre 2010 17:21
À : xymon at xymon.com
Objet : RE: [xymon] RE: graph a sum from different graphs

 

I have found using SPLITNCV is the best way to go on custom graphing. With SPLITNCV you have a separate rrd for each DS so at least you don't loose all your graphing just the one DS that may have changed. Even if you have one that changed at least you can still look at the old rrd and have history to look at. So in your case you have a new DS and like magic a new rrd is created. 

 

________________________________

From: SEGLARD, Thomas [mailto:tseglard at wat.tv] 
Sent: Friday, December 17, 2010 9:47 AM
To: xymon at xymon.com
Subject: RE: [xymon] RE: graph a sum from different graphs

Hello to every people on the list,

 

And thanks very much Bill ! I will try very soon and keep you in touch with this. In a more general way do you (the list) think that, in the future, it will be possible to easily add or remove DS definition inside rrds ? Actually, i's a pain to add new DS definition inside rrd without do a rm xxx.rrd and let Xymon to recreate it. If you have a clue...

Sincerly,

 

ThomaS

 

De : Bill Richardson [mailto:wrichardson at llbean.com] 
Envoyé : mercredi 15 décembre 2010 16:22
À : xymon at xymon.com
Objet : [xymon] RE: graph a sum from different graphs

 

Thomas,

 

Here is what I'm doing to sum data from multiply rrd's and display on one graph "all data combined and sum'd in one line". I have not done this with bandwidth data but its the same basic thing. Its really easy to do. The trick is knowing that the graph will show up under the trends column and you must create a blank rrd file that matches your graph definition.

 

 

First use the rrdtool command to find out what your DS values are. In my example I'm using lambda. In your bandwidth rrd you will have 2 ds's one for in bits and one for out bits.

 

cd to your $xymon_home/data/rrd/host1

 

rrdtool dump your.rrd|more

 

My example:

rrdtool dump msu,grp.rrd |more

<!-- Round Robin Database Dump --><rrd> <version> 0003 </version>
        <step> 300 </step> <!-- Seconds -->
        <lastupdate> 1292424133 </lastupdate> <!-- 2010-12-15 09:42:13 EST -->

 

        <ds>
                <name> lambda </name>
                <type> GAUGE </type>
                <minimal_heartbeat> 600 </minimal_heartbeat>
                <min> NaN </min>
                <max> NaN </max>

 

                <!-- PDP Status -->
                <last_ds> 317 </last_ds>
                <value> 4.2161000000e+04 </value>
                <unknown_sec> 0 </unknown_sec>
        </ds>

 

Based on the above data you are ready to build your graph definition in $xymon_home/server/etc/hobbitgraph.cfg. Since you will be looking at bandwidth in your CDEF you may want to add some more math "8,*" to get the right numbers. You could even add another CDEF line like CDEF:avg_total2=avg_total,8,* just to keep it simple

 

 

[combined]
        TITLE Combined Example

        -h 140
        -w 592
        YAXIS 
        DEF:cf1_avg_sum=/home/xymon/data/rrd/host1/msu,avg.rrd:lambda:AVERAGE
        DEF:cf2_avg_sum=/home/xymon/data/rrd/host2/msu,avg.rrd:lambda:AVERAGE
        DEF:cf3_avg_sum=/home/xymon/data/rrd/host2/msu,avg.rrd:lambda:AVERAGE
        CDEF:avg_total=cf1_avg_sum,cf2_avg_sum,+,cf3_avg_sum,+
        AREA:avg_total#aaaaaa:Combined Example
        COMMENT:\n
        GPRINT:avg_total:LAST:AVG \: %5.1lf%s (cur)
        GPRINT:avg_total:MAX: \: %5.1lf%s (max)
        GPRINT:avg_total:MIN: \: %5.1lf%s (min)
        GPRINT:avg_total:AVERAGE: \: %5.1lf%s (avg)

 

Now edit $xymon_home/server/etc/hobbitserver.cfg look for "GRAPHS=" "this is the one to have it show up on the trends column" add your graph definition name to the end of this line. in this example you would add ",combined""

 

The last step the "Trick" is to create a blank "dummy" rrd file that matches your graph definition under what ever host/device you want this data to show up under. So in this case if I wanted to see this graph under host1 I would do the following:

 

cd $xymon_home/data/rrd/host1

"Create a dummy rrd file"

touch combined.rrd

 

Now you should see a new "combined graph" under the trends column of host1. 

 

Troubleshooting is simple...

1.) When you look under the trends column and see a red X not graphing data then your graph definition is wrong go back and fix this in hobbitgraph,cfg

2.) If you see no red X and no graph at all you didn't add the graph definition name to the hobbitserver.cfg or you didn't add the dummy rrd file to $zymon_home/data/rrd/$host. Check spelling and case.


        

 

 

________________________________

From: SEGLARD, Thomas [mailto:tseglard at wat.tv] 
Sent: Tuesday, December 14, 2010 8:58 AM
To: xymon at xymon.com
Subject: [xymon] graph a sum from different graphs

Hello,

 

I'm sorry for asking you this question again but I really can't figure how to graph a sum of values coming from other graphes. Basically I want to make a graph of the total bandwidth consumed by a pool of servers. For this I would like to use the values coming from the ifstat graph of each server. What will be the best solution ?

 

As I said I asked this question before and got answer from two people but I was not able to have the proposed solution working. So if you have other ideas you're very welcome !

 

I thank you very much for your answers.

Sincerly,

 

ThomaS

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20101222/26da8b51/attachment.html>


More information about the Xymon mailing list