Weather via wxer.pl - Weather conditions

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

Moderators: Developers, Moderators

User avatar
Wernicke
Cacti User
Posts: 61
Joined: Tue Jun 08, 2004 3:07 am
Location: Bodø, Norway
Contact:

Post by Wernicke »

Hi

"./wxer.pl eelde" should be correct for your place. i have compared the results from www.wunderground.com

-Sigurd
User avatar
hbokh
Posts: 40
Joined: Thu Feb 24, 2005 4:29 pm
Location: Groningen, NL

Post by hbokh »

Wernicke wrote:Hi

"./wxer.pl eelde" should be correct for your place. i have compared the results from www.wunderground.com
Tak 4 the reply, but don't I need a zip for "Eelde" instead?

But first I got to get to import the template(s) succesfully...
User avatar
hbokh
Posts: 40
Joined: Thu Feb 24, 2005 4:29 pm
Location: Groningen, NL

Post by hbokh »

An upgrade (outside the ports - just overwritten most files) to cacti 0.8.6c worked! :D

Now I have to get it to display negative temp (C) and windchill :)
User avatar
hbokh
Posts: 40
Joined: Thu Feb 24, 2005 4:29 pm
Location: Groningen, NL

Post by hbokh »

To adapt the RRDs to the harsh Dutch climate :wink: I've tuned them like this:

Code: Select all

rrdtool tune <file>.rrd -i wx_windchill:-30
rrdtool tune <file>.rrd -i wx_temp:-20
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.
Attachments
Windchill hard to see
Windchill hard to see
graph_image.php.png (3.57 KiB) Viewed 11027 times
Last edited by hbokh on Sun Feb 27, 2005 12:21 pm, edited 2 times in total.
User avatar
Wernicke
Cacti User
Posts: 61
Joined: Tue Jun 08, 2004 3:07 am
Location: Bodø, Norway
Contact:

Post by Wernicke »

i think there's an minimum-limit in the template too.

-Sigurd
his_royal_evilness
Posts: 2
Joined: Sun Mar 06, 2005 3:44 pm

Post by his_royal_evilness »

how do i make it graph Hpa instead of Inches on the barometer graph?
manu67a
Posts: 3
Joined: Tue May 03, 2005 7:27 am
Location: Geneva (CH)
Contact:

Post by manu67a »

his_royal_evilness wrote:how do i make it graph Hpa instead of Inches on the barometer graph?
Hi,

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.
africanw
Cacti User
Posts: 130
Joined: Thu Mar 31, 2005 4:24 pm
Location: Sydney, Asutralia
Contact:

Post by africanw »

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:

No matter what I try it never brings it back.

Any ideas?

AW
manu67a
Posts: 3
Joined: Tue May 03, 2005 7:27 am
Location: Geneva (CH)
Contact:

Post by manu67a »

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
Well I have several locations that do not show windchill.

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
User avatar
Diggit2001
Cacti User
Posts: 195
Joined: Tue May 03, 2005 4:29 pm
Location: MD, US

Post by Diggit2001 »

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.
nethedy
Posts: 18
Joined: Tue Feb 08, 2005 9:32 am

install problem

Post by nethedy »

the pictures show
Attachments
p1
p1
&#25429;&#33719;_19.jpg (72.91 KiB) Viewed 12404 times
p2
p2
&#25429;&#33719;_19.jpg (72.91 KiB) Viewed 12404 times
manu67a
Posts: 3
Joined: Tue May 03, 2005 7:27 am
Location: Geneva (CH)
Contact:

Re: install problem

Post by manu67a »

According to another post in the same topic, you need the perl plug Weather::Underground

On a Unix box:

Code: Select all

linuxbox:~ # perl -MCPAN -e shell 
cpan> install Weather::Underground
This is just a copy-paste from another message.
Sorry I don't know how to do that on a windows machine. :-?
User avatar
Diggit2001
Cacti User
Posts: 195
Joined: Tue May 03, 2005 4:29 pm
Location: MD, US

Post by Diggit2001 »

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!
User avatar
Diggit2001
Cacti User
Posts: 195
Joined: Tue May 03, 2005 4:29 pm
Location: MD, US

Post by Diggit2001 »

Does anyone have any idea what the heck I am doing wrong here? I would appreciate any help that you guys could lend.

Thanks
User avatar
Diggit2001
Cacti User
Posts: 195
Joined: Tue May 03, 2005 4:29 pm
Location: MD, US

Post by Diggit2001 »

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.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests