How to poll a script once a day and graph the result

Templates, scripts for templates, scripts and requests for templates.

Moderators: Moderators, Developers

Post Reply
Author
Message
ArcThemaster
Posts: 34
Joined: Wed Dec 11, 2013 12:00 pm
Location: France

How to poll a script once a day and graph the result

#1 Post by ArcThemaster » Wed Dec 11, 2013 3:25 pm

Hello everybody,

I'm trying to poll a script only once a day and to graph the result. Why only one poll per day? The device I poll is able to give me a usable result only at 6 a.m otherwise, this device is calculating the result.

I read several topics and the cacti documentation about the subject as well. Nonetheless, I can't see how to procede to do what I want. I can add that i'm not at ease with heartbeat or steps concept however these notions are needed to reach my objective (I guess). Is it possible to give me more information about my goal and explain the steps to do?

Thanks for your help.

ArcThemaster
ArcThemaster

User avatar
BSOD2600
Cacti Moderator
Posts: 12160
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: How to poll a script once a day and graph the result

#2 Post by BSOD2600 » Wed Dec 11, 2013 7:16 pm

Start with http://www.vandenbogaerdt.nl/rrdtool/after_the_fact.php

You're going to have to custom script the entire thing if you want to try and fake the historical 5 min time intervals. Otherwise the data template in Cacti could be configured with the proper rows/steps for once a day data update.

ArcThemaster
Posts: 34
Joined: Wed Dec 11, 2013 12:00 pm
Location: France

Re: How to poll a script once a day and graph the result

#3 Post by ArcThemaster » Thu Dec 12, 2013 5:45 pm

Thank you for your reply.

I followed your link and I tried to do the same thing but for a week. In fact, I have to poll only one time so it's not the best way to graph one day. After graphing weeks, I would like to graph months and years (normal use case). I did that but it's not functional :

Code: Select all

rrdtool create test1.rrd --start 1386547200 --step 86400 DS:test1:GAUGE:604800:0:U RRA:AVERAGE:0.5:6:700

rrdtool update test1.rrd 1386547201:05.00
rrdtool update test1.rrd 1386633601:09.00
rrdtool update test1.rrd 1386720001:15.00
rrdtool update test1.rrd 1386806401:30.00
rrdtool update test1.rrd 1386892801:24.00
rrdtool update test1.rrd 1386979201:36.00
rrdtool update test1.rrd 1387065601:18.00

rrdtool graph test1.png \
--title test1 \
--start 1386546200 \
--end start+7d \
--height 160 \
--upper-limit 40 \
--lower-limit 0 \
--y-grid 5:2 \
--x-grid HOUR:8:DAY:1:DAY:1:86400:%A \
DEF:test1=test1.rrd:test1:AVERAGE \
AREA:test1#6DC8FEFF
The graph for my code contains grids without anything graphed as below :
test1.png
test1.png (8.46 KiB) Viewed 1009 times
I don't understand well what I have to set for x-grid argument and also for RRA:AVERAGE. Is it possible to explain more about this?

Finally, what do you mean exactly with "custom script the entire thing if you want to try and fake the historical 5 min time intervals" and "data template in Cacti could be configured with the proper rows/steps for once a day data update".
Ideally, the best for me would be to do my poll an my graph automatically without the need to create manually the graph or add values to the rrd. I tried to configure with the admin interface a data Template with proper rows/steps but it failed all the time.

ArcThemaster
ArcThemaster

Post Reply