Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


WeatherBug script & templates
Goto page Previous  1, 2, 3, 4, 5, 6
 
Post new topic   This topic is locked: you cannot edit posts or make replies.    Cacti Forum Index -> Scripts and Templates
Author Message
bltst2



Joined: 12 Sep 2006
Posts: 4

PostPosted: Fri Feb 09, 2007 9:33 am    Post subject: Reply with quote

cmorford wrote:
I'm having the same problem as qwertz. My processes are increasing indefinitely.



This has happened to me as well - any solution? I turned it off last night and the process numbers have flat lined. Certainly a problem with this script.



graph_image.php.png
 Description:
 Filesize:  17.71 KB
 Viewed:  3181 Time(s)

graph_image.php.png


Back to top
rsaeks



Joined: 06 Nov 2006
Posts: 33

PostPosted: Mon Feb 12, 2007 11:57 am    Post subject: Reply with quote

I really wouldn't mind using this script, but it doesn't seem to want to run from cacti. It runs fine manually as the Cacti user and sends the proper data.

Oh well ...
Back to top
michael.williams



Joined: 24 Oct 2006
Posts: 30

PostPosted: Tue Feb 20, 2007 4:40 pm    Post subject: Reply with quote

Ottomatic mentioned:

Step 7: Now... In all of the blanks that say... "get code from..." Go to that website and search for your code. Once have found the weather for your city. In the address bar there is a "?id=" and then there is a few letters... That is your code. Put that in all the blanks that say "get code from..." then click create at the bottom.

So, do I leave "?id" in the field before enterri ng the code? I'm getting null values for all.
Back to top
ToeBee



Joined: 15 Mar 2007
Posts: 1

PostPosted: Thu Mar 15, 2007 10:14 am    Post subject: Reply with quote

I'm getting horrible gaps! See attached image.

The problem might be on the server side though. When the gaps happen I can run the script by hand and it outputs the following:

DewPoint:1.2 HeatIndex:1.2

and thats all. Going to the URL that the perl script tries to parse I get an error message:

Code:
Site is Temporarily Unavailable

The most current observation for the site you requested is more than 4 hours old. The closest sites to the one you selected with data available are listed below:


And when I click in my city it just redisplays the same page. So I'm not sure what is going on here but somehow the script seems to be getting a value of 1.2 somewhere that it is spitting out when this happens. Perhaps it needs a little more tweaking when it comes to error handling



wind_gaps.png
 Description:
 Filesize:  13.66 KB
 Viewed:  2971 Time(s)

wind_gaps.png


Back to top
apperrault
Cacti User


Joined: 16 Feb 2007
Posts: 353
Location: Emeryville, CA

PostPosted: Tue Mar 20, 2007 12:25 pm    Post subject: Reply with quote

i am having a problem locating the correct code for a site i have in Canada. I even have the Longitude and Latitude of the site, and i cannot locate a code for them. I have the Z code from the Weatherbug page, but i don't think that will work, will it?

thanks

app
Back to top
evert



Joined: 21 Sep 2003
Posts: 27
Location: Sarpsborg, Norway

PostPosted: Mon Jun 11, 2007 2:47 am    Post subject: Reply with quote

davibou wrote:
Hi all i'm new here

This is a verry good script but a problem for me i leave in France Dijon and don't find any weatherstation code to use

Can someone help ??


LFSD is the correct one for you
Back to top
evert



Joined: 21 Sep 2003
Posts: 27
Location: Sarpsborg, Norway

PostPosted: Mon Jun 11, 2007 2:51 am    Post subject: Re: No negative degrees Celsius Reply with quote

hbokh wrote:
proohu01 wrote:
hbokh, how did you get the perl script to output in °C instead of F? I use weatherbug.pl EHRD (For Rotterdam Airport) but get Temp:33.8 (would be nice two but it should be much less )

Or did you make any changes to the templates? If so, can you post them here?


Use "Units=1" in the URL in the script:

Code:
my $httpaddr = "http://www.aws.com/aws_2001/asp/obsforecast.asp?Units=1&id=" . $ARGV[0];


Oh and don't forget to replace the F into C in the XML-template too.



Will that only fix the temperature? If yes, how to I change the windspeed from miles/hour to kms/hour?
Back to top
evert



Joined: 21 Sep 2003
Posts: 27
Location: Sarpsborg, Norway

PostPosted: Mon Jun 11, 2007 4:52 am    Post subject: Reply with quote

davibou wrote:
Ok finally found a list for the entire world this is the link )

http://adds.aviationweather.gov/metars/stations.txt

Check the list you will find your weather station code easly


Does not seem to be maintained. Use http://www.rap.ucar.edu/weather/surface/stations.txt instead
Back to top
evert



Joined: 21 Sep 2003
Posts: 27
Location: Sarpsborg, Norway

PostPosted: Mon Jun 11, 2007 5:46 am    Post subject: Reply with quote

Not all METAR-codes seem to work?

For example: NZSP is a valid METAR-code, but the WeatherBug script only returns 0's:
Code:
DewPoint:0.0 Humidity:0.0 Temp:0.0 Wind:0.0 Pressure:0.00 Rain:0.00 HeatIndex:0.0
Back to top
Alives
Cacti User


Joined: 11 Jul 2005
Posts: 103

PostPosted: Mon Aug 06, 2007 2:38 pm    Post subject: Reply with quote

Looks like you guys are in luck yet again.

I have been on cacti hiatus, but I am now back in the game. I started running this script again and got fed up with it.

The gaps are because of the aws site timing out. This causes the perl script to keep running, which explains why your processes keep going up. Run this to see:

Code:
ps aux | grep perl

you can kill them with:
Code:
killall perl


that will show you all your perl processes running trying to grab the data from that site. Cacti does a nasty job of cleaning up, and if it doesnt collect its data in a certain amount of time, it doesnt kill its child processes.

I have rewritten the script to use timeouts. The timeout is now user defined and will retry a set number of times if it is reached. I am graphing the # of tries now too to see if its something that happens at certain times during the day or if its just the certain weather code I chose.

I am not releasing this just yet, but it will be soon. I want to test it for a while first.

Any suggestions in the meantime?

BTW... no gaps in my graphs now!
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12295
Location: Muenster, Germany

PostPosted: Mon Aug 06, 2007 3:11 pm    Post subject: Reply with quote

Your effort is most appreciated
Reinhard
Back to top
apperrault
Cacti User


Joined: 16 Feb 2007
Posts: 353
Location: Emeryville, CA

PostPosted: Mon Aug 06, 2007 3:21 pm    Post subject: Reply with quote

I can't wait to see the new scripts!!!

Thanks

app
Back to top
evert



Joined: 21 Sep 2003
Posts: 27
Location: Sarpsborg, Norway

PostPosted: Tue Aug 07, 2007 6:01 am    Post subject: Reply with quote

Alives wrote:

I am not releasing this just yet, but it will be soon. I want to test it for a while first.

Any suggestions in the meantime?

BTW... no gaps in my graphs now!



May I volunteer as beta-tester?
Back to top
Alives
Cacti User


Joined: 11 Jul 2005
Posts: 103

PostPosted: Tue Aug 07, 2007 9:18 am    Post subject: Reply with quote

I'll post some time today. Its looking good so far.
Back to top
Alives
Cacti User


Joined: 11 Jul 2005
Posts: 103

PostPosted: Tue Aug 07, 2007 11:58 am    Post subject: Reply with quote

New thread is here:

http://forums.cacti.net/viewtopic.php?p=107684
Back to top
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4, 5, 6
Page 6 of 6

 



Powered by phpBB © 2001, 2005 phpBB Group