|
|
| Author |
Message |
meteo.quimper
Joined: 29 Mar 2008 Posts: 8
|
Posted: Sat Mar 29, 2008 6:39 am Post subject: I search script & template for weather graph |
|
|
Hi
i just finished to install cacti, the graphs work well (memory,network...), i search a script and a template who can make graphs from a .txt file, the data on the file are simple, for example weather.txt:
52,72,1080,15
52 is for temperature, 72 is for humidity, 1080 is for pressure...
the data are from a weather station, if someone can help me.
thanks
|
|
| Back to top |
|
 |
sigey
Joined: 14 Feb 2005 Posts: 25 Location: MV
|
Posted: Sat Mar 29, 2008 8:36 am Post subject: |
|
|
if on a linux box you can use a bash script and awk the file.
This bash script can be used as the data input method on cacti.
It is quite easy to create a data template and graphs from there onwards.
If you are looking into creating weather graphs why dont yu use the following:
I use this and lot of others are successfully using this.
http://forums.cacti.net/viewtopic.php?t=8820&highlight=AccuWeather
u can also modify the whole thing for u liking
|
|
| Back to top |
|
 |
meteo.quimper
Joined: 29 Mar 2008 Posts: 8
|
Posted: Sat Mar 29, 2008 2:37 pm Post subject: |
|
|
Thanks for your answer, but i have my own weather station (Davis Vantage Pro 2) that's why i just need to create graphs from the .txt file.
Another idea ?
|
|
| Back to top |
|
 |
sigey
Joined: 14 Feb 2005 Posts: 25 Location: MV
|
Posted: Sat Mar 29, 2008 11:12 pm Post subject: |
|
|
| can you post this script, i can then create a template for you and post it back
|
|
| Back to top |
|
 |
meteo.quimper
Joined: 29 Mar 2008 Posts: 8
|
Posted: Sun Mar 30, 2008 3:53 am Post subject: |
|
|
| you want the txt file with the weather data inside ?
|
|
| Back to top |
|
 |
meteo.quimper
Joined: 29 Mar 2008 Posts: 8
|
|
| Back to top |
|
 |
sigey
Joined: 14 Feb 2005 Posts: 25 Location: MV
|
Posted: Sun Mar 30, 2008 5:44 am Post subject: |
|
|
i had a look at ur data:
"15,10,72,1023,28,36,5,500,14"
do you want all these data to be present on the same graph or seperate ones?
I think you should put them on separate graphs to look it nice, also you can put them on the same graph later on as well.
I can create some templates for this. i am assuming that the data file will be updated via another *external* script.
|
|
| Back to top |
|
 |
meteo.quimper
Joined: 29 Mar 2008 Posts: 8
|
Posted: Sun Mar 30, 2008 6:01 am Post subject: |
|
|
Thanks for your help:
the data should be on separate graphs
the data on the .txt fils are updated every 5 minutes
|
|
| Back to top |
|
 |
sigey
Joined: 14 Feb 2005 Posts: 25 Location: MV
|
Posted: Sun Mar 30, 2008 9:00 am Post subject: |
|
|
ok here it is.
I am posting the weather_scripts.rar file.
Import the XML files using the import feature of cacti.
modify the bash script "print.sh" - with the exact path of ur cacti installation.
and put that script into the scripts dir of cacti.
Also i am attaching sample graphs as well .... Enjoy with a glass of champagne
| Description: |
|
| Filesize: |
18.75 KB |
| Viewed: |
1377 Time(s) |

|
| Description: |
|
| Filesize: |
17.56 KB |
| Viewed: |
1377 Time(s) |

|
| Description: |
|
 Download |
| Filename: |
weather_scripts.rar |
| Filesize: |
26.44 KB |
| Downloaded: |
42 Time(s) |
|
|
| Back to top |
|
 |
meteo.quimper
Joined: 29 Mar 2008 Posts: 8
|
Posted: Sun Mar 30, 2008 9:10 am Post subject: |
|
|
| thanks for your work, i imported the templates in cacti, i saw there is a file print.sh how i can configure cacti to call the script and to build the graphs ?
|
|
| Back to top |
|
 |
sigey
Joined: 14 Feb 2005 Posts: 25 Location: MV
|
Posted: Sun Mar 30, 2008 9:17 am Post subject: |
|
|
just put that bash script in ur cact's scripts dir provide proper perms.
As per my above post make sure u have the correctly..
|
|
| Back to top |
|
 |
meteo.quimper
Joined: 29 Mar 2008 Posts: 8
|
Posted: Sun Mar 30, 2008 11:36 am Post subject: |
|
|
| Everything seem to working well, but the humidity graph template is mising, it' wasen't in the zip file, can resend it to me ?
|
|
| Back to top |
|
 |
sigey
Joined: 14 Feb 2005 Posts: 25 Location: MV
|
Posted: Mon Mar 31, 2008 12:05 am Post subject: |
|
|
ah!!! .. i almost forgot this part, you need to add the data input methods as follows in the screen shot:
just follow the screen shot and add them as it is exactly and you are good to go.
| Description: |
|
| Filesize: |
39.72 KB |
| Viewed: |
1303 Time(s) |

|
|
|
| Back to top |
|
 |
meteo.quimper
Joined: 29 Mar 2008 Posts: 8
|
Posted: Mon Mar 31, 2008 2:27 pm Post subject: |
|
|
hi
everything work well, i have a question, the barometer graph display:
pression: relevé: 1.03k mini: 1.03k maxi: 1.03k
but i need to display for example:
pression: relevé: 1025.58 mini: 1025.58 maxi: 1025.58
how i can do that ?
| Description: |
|
| Filesize: |
29.31 KB |
| Viewed: |
1256 Time(s) |

|
|
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12604 Location: Muenster, Germany
|
Posted: Tue Apr 01, 2008 12:56 pm Post subject: |
|
|
Select a different GPRINT Preset for the GPRINTs of that Graph Template
Reinhard
|
|
| Back to top |
|
 |
|