Weather via wxer.pl - Weather conditions
Moderators: Developers, Moderators
Tak 4 the reply, but don't I need a zip for "Eelde" instead?Wernicke wrote:Hi
"./wxer.pl eelde" should be correct for your place. i have compared the results from www.wunderground.com
But first I got to get to import the template(s) succesfully...
To adapt the RRDs to the harsh Dutch climate I've tuned them like this:
Right, so the temperature looks okay, but is the windchill supposed to look like this?
EDIT - It's getting better in the "Weekly" graph. See att.
Code: Select all
rrdtool tune <file>.rrd -i wx_windchill:-30
rrdtool tune <file>.rrd -i wx_temp:-20
EDIT - It's getting better in the "Weekly" graph. See att.
- Attachments
-
- Windchill hard to see
- graph_image.php.png (3.57 KiB) Viewed 11268 times
Last edited by hbokh on Sun Feb 27, 2005 12:21 pm, edited 2 times in total.
-
- Posts: 2
- Joined: Sun Mar 06, 2005 3:44 pm
Hi,his_royal_evilness wrote:how do i make it graph Hpa instead of Inches on the barometer graph?
I've done the following:
- modified the .pl script to take hPa for the pressue and km/h for the wind.
- Changed the Graph template to display "C°" for temperature and "hPA" for the pressure and line 2 to have a better view of the graphs.
This is not optimized but it works.
You can find all the modified scripts with the |site| instead of the <site> and with my own modifications here:
http://goodies.escapade.ch/cacti/cacti.zip
For the negative temp I used the rrdtool command shown earlier.
Last point, for pressure displayed is hPa values are like 1018 but the grap shows 1.2K. I would like to keep the value 1018 and up, how can I do that ?
edit: This last point is solved aswell. The zip file contains all the modifications.
Thanks.
Manuel
Last edited by manu67a on Thu May 05, 2005 5:28 am, edited 2 times in total.
Well I have several locations that do not show windchill.africanw wrote:Everything except windchill works.
perl wxer.pl Antigo
wx_temp_f:13 wx_wind_speed:13 wx_pressure:1024 wx_humidity:29 wx_wind_chill_f:
AW
But I know it's working cause I have one location that display it.
perl wxer.pl uooo
wx_temp_f:-12 wx_wind_speed:14 wx_pressure:1022 wx_humidity:79 wx_wind_chill_f:-2
I guess it is coming from the website itself.
The best test is to run the script with debug mode on and you will see that for your location there is no windchill.
Edit: I use my script for airport code like in europe where LFPG is for Paris - Charles de gaulles airport. I noticed that there is 2 values for the wind. the first in mph the second in km/h. If I ask the weather for the city of Paris, France I will only get the wind speed in km/h.
I'm not a perl guru, therefor it would be great if someone could modify this script to allow us the selection of mph or km/h.
Manuel
- Diggit2001
- Cacti User
- Posts: 195
- Joined: Tue May 03, 2005 4:29 pm
- Location: MD, US
OK, I'm a bit of a noob to all this stuff but I have a functional cacti system on Windows XP SP2 using IIS, cacti 0.8.6d, php 5.0.4, MySQL 4.1.11 and rrdtool 1.0.49. I have perl 5.8.6.811 still installed as part of my MRTG setup which I have stopped using since discovering cacti. Perl is still installed, however.
When I run "perl wxer.pl 21075" from a command line, I get results just fine. I just have no idea how to get this info into cacti. I have successfully imported the templates into cacti and the graphs are there, but they are not showing any data.
My understanding of all this is that php runs, gathers all the data via snmp or whatever and puts it all into the MySQL database, where cacti then retrieves it and populates all the pretty graphs. Is this correct? If so, then how does this perl script get the data to cacti? Do I somehow need to configure it to put the data into the MySQL database as well?
I apologize if this is a dumb question, but I'm really trying to understand how all of this stuff works. I appreciate any help that you guys can lend.
Thanks in advance.
When I run "perl wxer.pl 21075" from a command line, I get results just fine. I just have no idea how to get this info into cacti. I have successfully imported the templates into cacti and the graphs are there, but they are not showing any data.
My understanding of all this is that php runs, gathers all the data via snmp or whatever and puts it all into the MySQL database, where cacti then retrieves it and populates all the pretty graphs. Is this correct? If so, then how does this perl script get the data to cacti? Do I somehow need to configure it to put the data into the MySQL database as well?
I apologize if this is a dumb question, but I'm really trying to understand how all of this stuff works. I appreciate any help that you guys can lend.
Thanks in advance.
install problem
the pictures show
- Attachments
-
- p1
- 捕获_19.jpg (72.91 KiB) Viewed 12645 times
-
- p2
- 捕获_19.jpg (72.91 KiB) Viewed 12645 times
Re: install problem
According to another post in the same topic, you need the perl plug Weather::Underground
On a Unix box:
This is just a copy-paste from another message.
Sorry I don't know how to do that on a windows machine.
On a Unix box:
Code: Select all
linuxbox:~ # perl -MCPAN -e shell
cpan> install Weather::Underground
Sorry I don't know how to do that on a windows machine.
- Diggit2001
- Cacti User
- Posts: 195
- Joined: Tue May 03, 2005 4:29 pm
- Location: MD, US
OK, I have yet to make any progress, but I went through the logs, and this is what I have:
05/16/2005 01:41:31 PM - CMDPHP: Poller[0] Host[49] SNMP: Device does not require SNMP
05/16/2005 01:41:31 PM - CMDPHP: Poller[0] Host[49] No host availability check possible for 'Weather Information'.
05/16/2005 01:41:31 PM - CMDPHP: Poller[0] Host[49] WARNING: Result from CMD not valid. Partial Result:
05/16/2005 01:41:31 PM - CMDPHP: Poller[0] Host[49] CMD: perl C:\Inetpub\wwwroot\cacti-0.8.6c/scripts/wxer.pl 21075, output: U
Again, the graph is there but there is no data in it. I can run the command successfully from a command prompt but I get nothing when cacti runs it. Can anyone help?
Thanks!
05/16/2005 01:41:31 PM - CMDPHP: Poller[0] Host[49] SNMP: Device does not require SNMP
05/16/2005 01:41:31 PM - CMDPHP: Poller[0] Host[49] No host availability check possible for 'Weather Information'.
05/16/2005 01:41:31 PM - CMDPHP: Poller[0] Host[49] WARNING: Result from CMD not valid. Partial Result:
05/16/2005 01:41:31 PM - CMDPHP: Poller[0] Host[49] CMD: perl C:\Inetpub\wwwroot\cacti-0.8.6c/scripts/wxer.pl 21075, output: U
Again, the graph is there but there is no data in it. I can run the command successfully from a command prompt but I get nothing when cacti runs it. Can anyone help?
Thanks!
- Diggit2001
- Cacti User
- Posts: 195
- Joined: Tue May 03, 2005 4:29 pm
- Location: MD, US
- Diggit2001
- Cacti User
- Posts: 195
- Joined: Tue May 03, 2005 4:29 pm
- Location: MD, US
Never mind. After running the script EXACTLY as it specifies in the Data Input Method Input String, I got an error that pointed me in the right direction. Once I put the underground.pm file into my perl\lib directory, everything worked fine. I had previously had it in my cacti\scripts directory.
I hate when I do that.
I hate when I do that.
Who is online
Users browsing this forum: No registered users and 2 guests