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  Next
 
Post new topic   This topic is locked: you cannot edit posts or make replies.    Cacti Forum Index -> Scripts and Templates
Author Message
qwertz
Cacti User


Joined: 16 Feb 2006
Posts: 98

PostPosted: Fri May 19, 2006 1:37 am    Post subject: Reply with quote

Hello,
The script is working well for me BUT,

I had to remove it because the perl session stayed ESTABLISHED. it means i had a growing number of TCP ESTABLISHED session, and of course the number of my processes were growing permanently.

Do you know why the TCP sessions kept ESTABLISHED?

REgards

Qwertz
Back to top
Diceman
Cacti User


Joined: 25 Oct 2005
Posts: 139

PostPosted: Mon May 22, 2006 7:54 am    Post subject: Reply with quote

my graphs are working but i get quite a few gaps. at first my internet connection was dying so i thought it was because the internet died all the time. the connection is working fine now but i am still getting random gaps in the graph. perhaps it is bandwidth related, or that the AWS site times out. anyone else experiencing these problems? i have tried two different weatherstations in my area, one for the international airport and one for a local tv weather station. i find it hard to believe that their weather equipment doesnt respond but im at a loss as to why the gaps are still showing up.
Back to top
Diggit2001
Cacti User


Joined: 03 May 2005
Posts: 78
Location: MD, US

PostPosted: Fri May 26, 2006 10:21 am    Post subject: Reply with quote

I was using this script successfully on my Windows installation of Cacti, but I recently loaded a new server with CactiEZ and am making the move to the world of Linux. When I add this stuff to my CactiEZ install, the poller logs have this:


05/26/2006 11:15:09 AM - CACTID: Poller[0] Host[20] DS[535] WARNING: Result from SCRIPT not valid. Partial Result: ...
05/26/2006 11:15:09 AM - CACTID: Poller[0] Host[20] ERROR: Empty result [127.0.0.1]: 'perl /var/www/html/scripts/WeatherBug.pl MARIT'
05/26/2006 11:15:09 AM - CACTID: Poller[0] Host[20] DS[534] WARNING: Result from SCRIPT not valid. Partial Result: ...
05/26/2006 11:15:09 AM - CACTID: Poller[0] Host[20] ERROR: Empty result [127.0.0.1]: 'perl /var/www/html/scripts/WeatherBug.pl MARIT'
05/26/2006 11:15:09 AM - CACTID: Poller[0] Host[20] DS[533] WARNING: Result from SCRIPT not valid. Partial Result: ...
05/26/2006 11:15:09 AM - CACTID: Poller[0] Host[20] ERROR: Empty result [127.0.0.1]: 'perl /var/www/html/scripts/WeatherBug.pl MARIT'
05/26/2006 11:15:09 AM - CACTID: Poller[0] Host[20] DS[532] WARNING: Result from SCRIPT not valid. Partial Result: ...
05/26/2006 11:15:09 AM - CACTID: Poller[0] Host[20] ERROR: Empty result [127.0.0.1]: 'perl /var/www/html/scripts/WeatherBug.pl MARIT'
05/26/2006 11:15:09 AM - CACTID: Poller[0] Host[20] DS[531] WARNING: Result from SCRIPT not valid. Partial Result: ...
05/26/2006 11:15:09 AM - CACTID: Poller[0] Host[20] ERROR: Empty result [127.0.0.1]: 'perl /var/www/html/scripts/WeatherBug.pl MARIT'

When I run this exact command from the terminal, I get successful results. Can anyone help out a Linux noob, or maybe point me in the right direction?

Thanks much.
Back to top
gandalf
Developer


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

PostPosted: Fri May 26, 2006 10:37 am    Post subject: Reply with quote

Starting with latest cactid, it is required to provide /full/path/to/perl when using it with Data Input Methods. This will of course affect all Templates posted prior to this change ...
So locate this Data Input Method and provide the full path for perl derived from
Code:
which perl

Reinhard
Back to top
Diggit2001
Cacti User


Joined: 03 May 2005
Posts: 78
Location: MD, US

PostPosted: Fri May 26, 2006 11:22 am    Post subject: Reply with quote

You da man. Worked like a champ and also got a few of my other scripts working.

Thanks very much.
Back to top
ahardman



Joined: 10 Apr 2006
Posts: 41

PostPosted: Tue May 30, 2006 11:16 am    Post subject: Reply with quote

Has anyone ever had this issue:

WARNING: SNMP timeout detected [500 ms], ignoring host

When i run the command at a prompt i get a result but it is very slow.

Any suggestions.

I would love to have this data. We have radio equipment that is affected by the weather.
Back to top
jpingle



Joined: 09 May 2005
Posts: 37

PostPosted: Fri Jul 14, 2006 2:46 pm    Post subject: Reply with quote

I have one big problem with the instructions, and that's if you add the graphs in separately, it makes 5 separate data sources and runs the script 5 separate times when it only needs to happen once (Not to mention taking 5 times the disk space that it needs!)

This might explain the gaps that some people are seeing -- It may be accessing their site too many times in a row and having problems.

Instead, I created a data source, entered the id for weatherbug, and then created the 5 graphs by clicking the 'add' button on the graph management screen, pointing each of them to the same data source and choosing the appropriate fields.

Now the script only runs once, and so far I haven't had any gaps or timeouts.
Back to top
jpingle



Joined: 09 May 2005
Posts: 37

PostPosted: Sat Jul 15, 2006 10:48 am    Post subject: Reply with quote

I was having an issue with the script timing out on occasion: perl and the poller were hanging until the script timed out (sometimes for an hour and a half!)

Fortunately there's a simple fix.

Change this line in WeatherBug.pl:
Code:
use LWP::Simple;


To:
Code:
use LWP::Simple qw(get $ua);
$ua->timeout(90);


That forces the script to timeout after 90 seconds so it won't hold up any other processes. Since I made this change, there were no more absurdly long script runs. There were still a couple gaps, but nothing like before.
Back to top
cmorford



Joined: 16 Aug 2006
Posts: 1

PostPosted: Wed Aug 16, 2006 7:42 am    Post subject: Reply with quote

I'm having the same problem as qwertz. My processes are increasing indefinitely.
Back to top
morgentau



Joined: 16 Jun 2006
Posts: 13
Location: Zurich, Switzerland

PostPosted: Fri Sep 01, 2006 4:31 am    Post subject: Reply with quote

When i run the weatherbug.pl on cmd my output looks like this:

Code:
diepen:/srv/www/htdocs/cacti/scripts # ./weatherbug.pl
Use of uninitialized value in concatenation (.) or string at ./weatherbug.pl line 9.
DewPoint:11.9 Humidity:78.8 Temp:15.5 Wind:13.4 Pressure:102.00 Rain:0.00 HeatIndex:14.9


So i get an error and results on cmd and my graphs are empty without any data showing only "nan".

How can i make this working with nice graphical data to show?
Back to top
kwabbernoot
Cacti User


Joined: 13 Oct 2003
Posts: 99
Location: Zottegem, Belgium

PostPosted: Fri Sep 01, 2006 8:00 am    Post subject: Reply with quote

ahardman wrote:
Has anyone ever had this issue:

WARNING: SNMP timeout detected [500 ms], ignoring host

When i run the command at a prompt i get a result but it is very slow.

Any suggestions.

I would love to have this data. We have radio equipment that is affected by the weather.


Increase the SNMP timeout in the configuration of device within Cacti.
Back to top
cdsloop



Joined: 16 Oct 2006
Posts: 1
Location: Germantown, MD

PostPosted: Mon Oct 16, 2006 7:18 am    Post subject: WeatherBug API Reply with quote

I saw this post and thougth it might be of interest to everyone that we now have an API available that you can sign up for.

Check it out at http://api.weatherbug.com/
Back to top
davibou



Joined: 05 Feb 2007
Posts: 4

PostPosted: Mon Feb 05, 2007 11:55 am    Post subject: Reply with quote

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 ??
Back to top
rsaeks



Joined: 06 Nov 2006
Posts: 33

PostPosted: Mon Feb 05, 2007 1:09 pm    Post subject: Reply with quote

I am trying to use this template to graph our weather stations since the kids will like having some historical data that they can use for their projects, however I can't seem to get any data out of this.

When I run the .pl script with sudo -u cacti /path/to/script, I return data. The data I get back is using our codes, but seems be dropping of the leading "-" on the temp for some reason.

When I try to use this through the poller and turn up the logging a bit, I see this output:

CMD: perl /Library/WebServer/Documents/cacti/scripts/WeatherBug.pl GLNVV, output: current_temp: wind_speed: barometer: humidity: high_temp: low_temp: dew_point_temp: wind_chill_temp:

If I copy the top line and run it manually, I am able to get data back.

Is there something that I need to do to have this run properly?

If you need some more info, let me know.

Thanks
Back to top
davibou



Joined: 05 Feb 2007
Posts: 4

PostPosted: Mon Feb 05, 2007 5:13 pm    Post subject: Reply with quote

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
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  Next
Page 5 of 6

 



Powered by phpBB © 2001, 2005 phpBB Group