[Xymon] rrddefinitons.cfg - how to modify the default step in RRA

Nico nicolas at lienard.name
Fri Feb 8 14:57:29 CET 2013


Hi

Thanks for answer.

I updated the rrddefinitons.cfg with your recommandations :


[httpd_threads/15]
        -s 5
        RRA:AVERAGE:0.5:60:576
        RRA:AVERAGE:0.5:360:576
        RRA:AVERAGE:0.5:1440:576
        RRA:AVERAGE:0.5:17280:576

Then i restarted xymon server (it is needed ? in doubt i did it).

I also deleted the previous RRD file to see how is created a fresh one after the modification:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rrd SYSTEM "http://oss.oetiker.ch/rrdtool/rrdtool.dtd">
<!-- Round Robin Database Dump -->
<rrd>
        <version>0003</version>
        <step>300</step> <!-- Seconds -->
        <lastupdate>1360331300</lastupdate> <!-- 2013-02-08 14:48:20 CET -->

        <ds>
                <name> threads </name>
                <type> GAUGE </type>
                <minimal_heartbeat>5</minimal_heartbeat>
                <min>NaN</min>
                <max>NaN</max>

                <!-- PDP Status -->
                <last_ds>32</last_ds>
                <value>3.1000000000e+03</value>
                <unknown_sec> 105 </unknown_sec>
        </ds>


Unfortunately, it is still a step of 300.

What did i miss ?

Thanks again.


Cheers
Nico


Le 8 févr. 2013 à 14:19, Michael Beatty <Michael.Beatty at sherwin.com> a écrit :

> The 5 in your DS is your heartbeat, not step.
> 
> Put a -s parameter in rrddefinitions.cfg  ie:
> 
> [httpd_treads/5]
>     -s 5
>     RRA:AVERAGE:0.5:60:576
>        RRA:AVERAGE:0.5:360:576
>        RRA:AVERAGE:0.5:1440:576
>        RRA:AVERAGE:0.5:17280:576
> 
> 
> This will change your step to 5 seconds.  Note, that you will probably want to change your heartbeat to a value greater than your step.  By setting your heartbeat = step, you are running a probable scenario of missing data.  Your heartbeat should be greater than your step, I'd recommend double, if not triple.
> 
> Both step and heartbeat are set when the rrd file is created, you cannot change them on the fly.  If you do not wish to lose existing data, you will need to run "rrdtool tune -h threads:10" to change your heartbeat.   Then, you will need to dump your rrd to a file, edit the xml step with a text editor, then restore your rrd from the edited xml,
> 
> rrdtool dump httpd_threads.rrd > threads.xml
> edit the threads.xml setting step to 5
> rrdtool restore threads.xml httpd_threads.rrd
> 
> If you plan on doing this on several hosts, or plan on doing it frequently, I suggest you write a script and utilize the xymon grep utility.... it will make your life considerably easier.
> 
> 
> 
>  Michael Beatty
> Sherwin-Williams
> IT Analyst/Developer
> michael.beatty at sherwin.com
> 216-515-7374
> On 02/07/2013 02:59 PM, Nico wrote:
>> Hi
>> 
>> I need to do a temporarily graph with a very low frequency : 5 seconds instead of the regular 300 seconds.
>> 
>> 1/ On client side, the external script is simple:
>> 
>> [ buda ext]# cat httpd_threads.sh 
>> #!/bin/bash
>> THREADS_HTTP=`ps -ef | grep -c [h]ttpd`
>> LINE="data $MACHINE.trends
>> [httpd_threads.rrd]
>> DS:threads:GAUGE:5:U:U $THREADS_HTTP"
>> $BB $BBDISP "$LINE"
>> 
>> So, as you can see, the step is 5 in the DS.
>> 
>> clientlaunch.cfg has "INTERVAL 5s".
>> 
>> 2/ On Xymon server side : 
>> 
>> rrddefinitions.cfg  :
>> 
>> # step = 5 seconds
>> [httpd_threads/5]
>>         # 576 * 60 * 5 sec = 48 h soit 2 jours sans perte
>>         RRA:AVERAGE:0.5:60:576
>>         RRA:AVERAGE:0.5:360:576
>>         RRA:AVERAGE:0.5:1440:576
>>         RRA:AVERAGE:0.5:17280:576
>> 
>> 
>> # This one is the default setup. You can change it, if you like.
>> []
>>         # 576 datapoints w/ 5 minute interval = 48 hours @ 5 min avg.
>>         RRA:AVERAGE:0.5:1:576
>>         # 576 datapoints w/ 6*5 minute averaged = 12 days @ 30 min avg.
>>         RRA:AVERAGE:0.5:6:576
>>         # 576 datapoints w/ 24*5 minute averaged = 48 days @ 2 hour avg.
>>         RRA:AVERAGE:0.5:24:576
>>         # 576 datapoints w/ 288*5 minute averaged = 576 days @ 1 day avg.
>>         RRA:AVERAGE:0.5:288:576
>> 
>> 
>> 
>> 3/ RRD created:
>> 
>> here the issue, the step is still 300. The minimal_heartbeat is 5.
>> 
>> rrdtool dump httpd_threads.rrd
>> 
>> 
>> <?xml version="1.0" encoding="utf-8"?>
>> <!DOCTYPE rrd SYSTEM "http://oss.oetiker.ch/rrdtool/rrdtool.dtd">
>> <!-- Round Robin Database Dump -->
>> <rrd>
>>         <version>0003</version>
>>         <step>300</step> <!-- Seconds -->
>>         <lastupdate>1360264485</lastupdate> <!-- 2013-02-07 20:14:45 CET -->
>> 
>>         <ds>
>>                 <name> threads </name>
>>                 <type> GAUGE </type>
>>                 <minimal_heartbeat>5</minimal_heartbeat
>> 
>> --- snip ---
>> 
>> 
>> How can i change the step to 5 instead of 300 ?
>> 
>> Thanks for your help.
>> 
>> 
>> Cheers
>> Nico
>> 
>> 
>> 
>> _______________________________________________
>> Xymon mailing list
>> Xymon at xymon.com
>> http://lists.xymon.com/mailman/listinfo/xymon
> 
> 
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20130208/2407e953/attachment.html>


More information about the Xymon mailing list