WeatherBug script & templates
Moderators: Developers, Moderators
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
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
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.
- Diggit2001
- Cacti User
- Posts: 195
- Joined: Tue May 03, 2005 4:29 pm
- Location: MD, US
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.
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.
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
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
Reinhard
So locate this Data Input Method and provide the full path for perl derived from
Code: Select all
which perl
- Diggit2001
- Cacti User
- Posts: 195
- Joined: Tue May 03, 2005 4:29 pm
- Location: MD, US
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.
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.
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:
To:
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.
Fortunately there's a simple fix.
Change this line in WeatherBug.pl:
Code: Select all
use LWP::Simple;
Code: Select all
use LWP::Simple qw(get $ua);
$ua->timeout(90);
When i run the weatherbug.pl on cmd my output looks like this:
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?
Code: Select all
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
How can i make this working with nice graphical data to show?
- kwabbernoot
- Cacti User
- Posts: 99
- Joined: Mon Oct 13, 2003 4:11 am
- Location: Zottegem, Belgium
Increase the SNMP timeout in the configuration of device within Cacti.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.
WeatherBug API
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/
Check it out at http://api.weatherbug.com/
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
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
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
http://adds.aviationweather.gov/metars/stations.txt
Check the list you will find your weather station code easly
Who is online
Users browsing this forum: No registered users and 1 guest