rrddefinitons.cfg - how to modify the default step in RRA
list Nicolas Lienard
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
list Michael Beatty
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
user-4aea7c115850@xymon.invalid
XXX-XXX-XXXX
▸
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
list Nicolas Lienard
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 <user-4aea7c115850@xymon.invalid> 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 user-4aea7c115850@xymon.invalid XXX-XXX-XXXX 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
list Nicolas Lienard
Hi,
i tried "-s" trick and i also checked the man of rrdcreation which made a reference of your suggestion:
--step|-s step (default: 300 seconds)
Specifies the base interval in seconds with which data will be fed into the RRD.
i tried to add both in rrddefinitions.cfg :
[httpd_threads/15]
--step 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
or
[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
But it doesn't change anything, the RRD file is still created with 300.
What s wrong ?
▸
Cheers
Nico
Le 8 févr. 2013 à 14:57, Nico <user-4f1d872b9031@xymon.invalid> a écrit :
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 <user-4aea7c115850@xymon.invalid> 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 user-4aea7c115850@xymon.invalid XXX-XXX-XXXX 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
list Nicolas Lienard
in shell, i tried to create a rrd with a different step: rrdtool create /tmp/test.rdd -s 5 DS:test:GAUGE:15:U:U RRA:AVERAGE:0.5:2:20160
▸
<?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>5</step> <!-- Seconds -->
<lastupdate>1360332233</lastupdate> <!-- 2013-02-08 15:03:53 CET -->
<ds>
<name> test </name>
<type> GAUGE </type>
<minimal_heartbeat>15</minimal_heartbeat>
<min>NaN</min>
<max>NaN</max>
<!-- PDP Status -->
<last_ds>U</last_ds>
<value>0.0000000000e+00</value>
<unknown_sec> 3 </unknown_sec>
</ds>
the step is with the correct value.
why rrddefinitons.cfg is not taking care of "-s" ? Did i miss something ?
▸
Cheers
NIco
Le 8 févr. 2013 à 15:06, Nico <user-4f1d872b9031@xymon.invalid> a écrit :
Hi, i tried "-s" trick and i also checked the man of rrdcreation which made a reference of your suggestion: --step|-s step (default: 300 seconds) Specifies the base interval in seconds with which data will be fed into the RRD. i tried to add both in rrddefinitions.cfg : [httpd_threads/15] --step 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 or [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 But it doesn't change anything, the RRD file is still created with 300. What s wrong ? Cheers Nico Le 8 févr. 2013 à 14:57, Nico <user-4f1d872b9031@xymon.invalid> a écrit :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 <user-4aea7c115850@xymon.invalid> 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 user-4aea7c115850@xymon.invalid XXX-XXX-XXXX 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
list Michael Beatty
in your rrdef.cfg file, Is your key correct? Is the column you are reporting really [httpd_threads/15]? This key is what it matches against your column. If your key is [httpd_threads/15] but the column is "httpd_threads" (without the "/15"), then the rrd will be created with the default "[]" definition.
▸
Michael Beatty
Sherwin-Williams
IT Analyst/Developer
user-4aea7c115850@xymon.invalid
XXX-XXX-XXXX
On 02/08/2013 09:06 AM, Nico wrote:Hi, i tried "-s" trick and i also checked the man of rrdcreation which made a reference of your suggestion: --step|-s step (default: 300 seconds) Specifies the base interval in seconds with which data will be fed into the RRD. i tried to add both in rrddefinitions.cfg : [httpd_threads/15] --step 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 or [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 But it doesn't change anything, the RRD file is still created with 300. What s wrong ? Cheers Nico Le 8 févr. 2013 à 14:57, Nico <user-4f1d872b9031@xymon.invalid <mailto:user-4f1d872b9031@xymon.invalid>> a écrit :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 <user-4aea7c115850@xymon.invalid <mailto:user-4aea7c115850@xymon.invalid>> 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 user-4aea7c115850@xymon.invalid XXX-XXX-XXXX 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
list Nicolas Lienard
Hi
i modified also the name but no change.
[httpd_threads]
-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
There is no column, the script is only posting RRD data.
▸
[ 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"
Is it the issue ?
▸
Cheers
NIco
Le 8 févr. 2013 à 15:22, Michael Beatty <user-4aea7c115850@xymon.invalid> a écrit :
in your rrdef.cfg file, Is your key correct? Is the column you are reporting really [httpd_threads/15]? This key is what it matches against your column. If your key is [httpd_threads/15] but the column is "httpd_threads" (without the "/15"), then the rrd will be created with the default "[]" definition. Michael Beatty Sherwin-Williams IT Analyst/Developer user-4aea7c115850@xymon.invalid XXX-XXX-XXXX On 02/08/2013 09:06 AM, Nico wrote:Hi, i tried "-s" trick and i also checked the man of rrdcreation which made a reference of your suggestion: --step|-s step (default: 300 seconds) Specifies the base interval in seconds with which data will be fed into the RRD. i tried to add both in rrddefinitions.cfg : [httpd_threads/15] --step 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 or [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 But it doesn't change anything, the RRD file is still created with 300. What s wrong ? Cheers Nico Le 8 févr. 2013 à 14:57, Nico <user-4f1d872b9031@xymon.invalid> a écrit :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 <user-4aea7c115850@xymon.invalid> 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 user-4aea7c115850@xymon.invalid XXX-XXX-XXXX 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
list Michael Beatty
From the rrddef.cfg comments: # Each section key is the column- or data-name reported from your # client test. Typically this is "cpu", "memory", "tcp", or some # custom test you have created. In your original script:
▸
[ 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"
it appears that your data name is "trends". This is what xymon is trying to match in rrddef.cvf. The key you should be using in rrddef.cfg.
[trends]
-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
With that said, "trends" is already a column heading... I'm not sure that using it for your rrd key won't cause other problems in xymon. Maybe change it to "httpd_threads"?
If that doesn't work, try putting the -s in the default section "[]", and see if that works. You shouldn't leave it there as it will set all future graphs to a 5 second step, but it works there, then you know your problem is with your data name and key.
▸
Michael Beatty
Sherwin-Williams
IT Analyst/Developer
user-4aea7c115850@xymon.invalid
XXX-XXX-XXXX
On 02/08/2013 09:47 AM, Nico wrote:Hi i modified also the name but no change. [httpd_threads] -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 There is no column, the script is only posting RRD data.[ 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"Is it the issue ? Cheers NIco Le 8 févr. 2013 à 15:22, Michael Beatty <user-4aea7c115850@xymon.invalid <mailto:user-4aea7c115850@xymon.invalid>> a écrit :in your rrdef.cfg file, Is your key correct? Is the column you are reporting really [httpd_threads/15]? This key is what it matches against your column. If your key is [httpd_threads/15] but the column is "httpd_threads" (without the "/15"), then the rrd will be created with the default "[]" definition. Michael Beatty Sherwin-Williams IT Analyst/Developer user-4aea7c115850@xymon.invalid XXX-XXX-XXXX On 02/08/2013 09:06 AM, Nico wrote:Hi, i tried "-s" trick and i also checked the man of rrdcreation which made a reference of your suggestion: --step|-s step (default: 300 seconds) Specifies the base interval in seconds with which data will be fed into the RRD. i tried to add both in rrddefinitions.cfg : [httpd_threads/15] --step 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 or [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 But it doesn't change anything, the RRD file is still created with 300. What s wrong ? Cheers Nico Le 8 févr. 2013 à 14:57, Nico <user-4f1d872b9031@xymon.invalid <mailto:user-4f1d872b9031@xymon.invalid>> a écrit :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 <user-4aea7c115850@xymon.invalid <mailto:user-4aea7c115850@xymon.invalid>> 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 user-4aea7c115850@xymon.invalid XXX-XXX-XXXX 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
list Michael Beatty
From the rrddef.cfg comments:
*# Each section key is the column- or data-name reported from your
# client test.* Typically this is "cpu", "memory", "tcp", or some
# custom test you have created.
In your original script:
[ 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"
it appears that your data name is "trends". This is what xymon is trying to match in rrddef.cvf. The key you should be using in rrddef.cfg.
[trends]
-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
With that said, "trends" is already a column heading... I'm not sure that using it for your rrd key won't cause other problems in xymon. Maybe change it to "httpd_threads"?
If that doesn't work, try putting the -s in the default section "[]", and see if that works. You shouldn't leave it there as it will set all future graphs to a 5 second step, but it works there, then you know your problem is with your data name and key.list Nicolas Lienard
Hi I think you are right, issue is my graph are created with data/trends without any column. I hope Henrik will provide a patch to handle this case :) I found a thread on ML where Henrik replied about the step: http://lists.xymon.com/archive/2011-November/033057.html The default for RRD-files generated by Xymon is to get updates in 5 minute intervals. To fix this you should define the RRD in the "rrddefinitions.cfg" file and specify a different update interval. If you update it once every 15 minutes = 900 seconds, then you can copy most of the default setup in that file, and just change the interval. Like this: [sfap/900] RRA:AVERAGE:0.5:1:576 RRA:AVERAGE:0.5:6:576 RRA:AVERAGE:0.5:24:576 RRA:AVERAGE:0.5:288:576 So, it seems that the -s is replaced by [column/step] at the end. Going to try with NCV method... Thanks again. Cheers Nico
▸
Le 08/02/2013 à 15:55, Michael Beatty <user-4aea7c115850@xymon.invalid> a écrit :
From the rrddef.cfg comments: # Each section key is the column- or data-name reported from your # client test. Typically this is "cpu", "memory", "tcp", or some # custom test you have created. In your original script: [ 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" it appears that your data name is "trends". This is what xymon is trying to match in rrddef.cvf. The key you should be using in rrddef.cfg. [trends] -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 With that said, "trends" is already a column heading... I'm not sure that using it for your rrd key won't cause other problems in xymon. Maybe change it to "httpd_threads"? If that doesn't work, try putting the -s in the default section "[]", and see if that works. You shouldn't leave it there as it will set all future graphs to a 5 second step, but it works there, then you know your problem is with your data name and key.
list Mark Deiss
Below is a simple stanza entry that can be added to the xymon server's task.cfg file for executing the MAPE update process. Can thus do away with the cron entry in the MAPE installation notes and have MAPE updates tied directly with Xymon operation.
Just edit the "<path to xymon>" for your particular environment. May also want to consider changing the update interval from 1 minute to 5 minutes or whatever is being used for the xymon web updates.
This is for MAPE 1.4 - may not be correct for 1.4+.
[mape]
ENVFILE <path to xymon>/client/etc/xymonclient.cfg
NEEDS xymond
CMD <path to xymon>/server/www/MAPE/bin/parse-config.pl
LOGFILE $XYMONSERVERLOGS/mape.log
INTERVAL 1m