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 michael.beatty at sherwin.com 216-515-7374
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]ttpdLINE="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 <Michael.Beatty at sherwin.com <mailto:Michael.Beatty at sherwin.com>> 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 michael.beatty at sherwin.com 216-515-7374 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 <nicolas at lienard.name <mailto:nicolas at lienard.name>> 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 <Michael.Beatty at sherwin.com <mailto: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]ttpdLINE="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 <mailto:Xymon at xymon.com> http://lists.xymon.com/mailman/listinfo/xymon
Xymon mailing list Xymon at xymon.com <mailto:Xymon at xymon.com> http://lists.xymon.com/mailman/listinfo/xymon