|
|
| Author |
Message |
Frances Cacti User
Joined: 10 Apr 2005 Posts: 60 Location: west coast
|
Posted: Thu Sep 15, 2005 12:48 pm Post subject: |
|
|
| Codegrinder is using RRDtool 1.2.x, whereas it looks like you're using 1.0.x. 1.2.x is a bit slower, but much more attractive. Also, Oetiker managed some speed improvements in 1.2.10 which help with performance when the graphs are being drawn. The difference you see is the combination of additional options (font specification, for example) and anti-aliasing. FYI; RRD's touched by 1.2.x are not backwards compatible, so it's wise to back up your RRD's before upgrading.
|
|
| Back to top |
|
 |
meson3902
Joined: 15 Sep 2005 Posts: 1
|
Posted: Thu Sep 15, 2005 7:40 pm Post subject: Script runs 5 times |
|
|
| I imported the script but it runs 5 times, one for each measurement. what did I do wrong?
|
|
| Back to top |
|
 |
cdombroski
Joined: 11 Nov 2005 Posts: 1
|
Posted: Fri Nov 11, 2005 9:58 pm Post subject: Re: Script runs 5 times |
|
|
| meson3902 wrote: | | I imported the script but it runs 5 times, one for each measurement. what did I do wrong? |
I had the same thing at first. What I did to fix was to delete graphs and data sources I had created. Then I created a datasource by hand (Management->Data Sources->Add), using WeatherBug for the data template and a host I already had defined as the host (apparently data sources don't work without hosts). Once you click create, it will allow you to input your weather code. Then I created the graphs by hand (Management->Graph Management->Add) using the appropriate templates and datasource. The graphs I choose not to associate with a host. Then I just added the graphs to the graph tree.
|
|
| Back to top |
|
 |
hbokh
Joined: 24 Feb 2005 Posts: 37 Location: Groningen, NL
|
Posted: Fri Nov 25, 2005 9:55 am Post subject: No negative degrees Celsius |
|
|
Now that we have a negative windchill here today, the script fails...
| Code: | # ./weatherbug.pl EHGG
DewPoint:0.0 Humidity:80.6 Temp:3.0 Wind:18.3 Pressure:94.82 Rain:0.00 HeatIndex:1.2 |
Whereas the site shows: WIND CHILL: -1.2 °C (wind chill and heat index are treated the same).
Is there a way to fix this in the script..?
|
|
| Back to top |
|
 |
proohu01
Joined: 20 Dec 2004 Posts: 25 Location: The Netherlands
|
Posted: Fri Nov 25, 2005 5:53 pm Post subject: Re: No negative degrees Celsius |
|
|
| hbokh wrote: | Now that we have a negative windchill here today, the script fails...
| Code: | # ./weatherbug.pl EHGG
DewPoint:0.0 Humidity:80.6 Temp:3.0 Wind:18.3 Pressure:94.82 Rain:0.00 HeatIndex:1.2 |
Whereas the site shows: WIND CHILL: -1.2 °C (wind chill and heat index are treated the same).
Is there a way to fix this in the script..? |
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?
|
|
| Back to top |
|
 |
hbokh
Joined: 24 Feb 2005 Posts: 37 Location: Groningen, NL
|
Posted: Sat Nov 26, 2005 10:11 am Post subject: Re: No negative degrees Celsius |
|
|
| 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.
BTW: I've delete my weather-data, since it's of no use when the temperature goes down and in the graph it goes up...
|
|
| Back to top |
|
 |
proohu01
Joined: 20 Dec 2004 Posts: 25 Location: The Netherlands
|
Posted: Sat Nov 26, 2005 10:28 am Post subject: thnx |
|
|
Simple! thnx.
EDIT:
My graph does go below "0". I changed the "Lower limit" in the graph template "Weatherbug - Temperature" to -40. And that seems to be workig as you can see below.
The weird thing is that only the temperature goes -1 and not the DewPoint....?? They should both be -1.
| Description: |
|
| Filesize: |
19.68 KB |
| Viewed: |
5687 Time(s) |

|
|
|
| Back to top |
|
 |
cpdans
Joined: 28 Oct 2002 Posts: 43
|
Posted: Mon Dec 05, 2005 9:46 pm Post subject: |
|
|
Okay, I have the same problem here...site is showing at temp of 1.4F and a wind chill of -20.4F. The graph doesn't show the same....it shows the wind chill/heat index correctly, just in the positives. Not sure what to do, I would appreciate any help with this.
Dan
| Description: |
|
| Filesize: |
35.93 KB |
| Viewed: |
5632 Time(s) |

|
|
|
| Back to top |
|
 |
Diceman Cacti User
Joined: 25 Oct 2005 Posts: 139
|
Posted: Tue Jan 17, 2006 8:33 pm Post subject: |
|
|
i have this script working i suppose, it gives me
01/17/2006 08:30:04 PM - CMDPHP: Poller[0] Host[1] DS[107] WARNING: Result from CMD not valid. Partial Result:
01/17/2006 08:30:04 PM - CMDPHP: Poller[0] Host[1] DS[108] WARNING: Result from CMD not valid. Partial Result:
in my logs. my graphs also show NaN and wont populate. any ideas?
|
|
| Back to top |
|
 |
hermatize Cacti User
Joined: 10 Aug 2005 Posts: 55
|
Posted: Tue Jan 24, 2006 1:12 pm Post subject: |
|
|
Im having an issue when i add a weatherbug map it never prompts me to put in the special code when i create the graphs on the device.
Anyone have any ideas i appreciate the help
Thanks in advance !!!!
|
|
| Back to top |
|
 |
paulbeard206 Cacti User
Joined: 30 Jul 2005 Posts: 106
|
Posted: Fri Feb 24, 2006 6:41 pm Post subject: Weatherbug script |
|
|
| Code: | CACTID: Host[11] DEBUG: The POPEN returned the following File Descriptor 9
CACTID: Host[11] ERROR: Empty result [red.paulbeard.org]: 'perl /usr/local/share/cacti/scripts/WeatherBug.pl'
CACTID: Host[11] DS[166] WARNING: Result from SCRIPT not valid. Partial Result: ...
CACTID: Host[11] DS[166] SCRIPT: perl /usr/local/share/cacti/scripts/WeatherBug.pl, output: U
|
doesn't work?
| Code: |
/usr/local/share/cacti/scripts/WeatherBug.pl
current_temp:44 wind_speed:3 barometer:30.33 humidity:40 high_temp:45 low_temp:28 dew_point_temp:21 wind_chill_temp:43 |
But I have no idea why.
|
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12604 Location: Muenster, Germany
|
Posted: Sat Feb 25, 2006 12:10 pm Post subject: |
|
|
Not sure on this, but cactid requires all output be done with one single print (cactid won't wait for another print that may occur). So please check the perl code for that.
Reinhard
|
|
| Back to top |
|
 |
paulbeard206 Cacti User
Joined: 30 Jul 2005 Posts: 106
|
Posted: Thu Mar 02, 2006 12:03 am Post subject: it is one print statement |
|
|
| lvm wrote: | Not sure on this, but cactid requires all output be done with one single print (cactid won't wait for another print that may occur). So please check the perl code for that.
Reinhard |
| Code: |
./WeatherBug.pl
current_temp:54 wind_speed:12 barometer:29.67 humidity:38 high_temp:59 low_temp:37 dew_point_temp:29 wind_chill_temp:50 |
| Code: |
print "current_temp:" . $weather[3] . " wind_speed:" . $weather[5] . " barometer:" . $weather[10] . " humidity:" .
$weather[11] . " high_temp:" . $weather[12] . " low_temp:" . $weather[13] . " dew_point_temp:" .
$weather[14] . " wind_chill_temp:" . $weather[15];
|
|
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12604 Location: Muenster, Germany
|
Posted: Thu Mar 02, 2006 2:28 pm Post subject: |
|
|
If you're running the latest cactid, it requires /full/path/to/perlbinary
Reinhard
|
|
| Back to top |
|
 |
ottomatic
Joined: 20 Mar 2006 Posts: 9
|
Posted: Tue Mar 21, 2006 1:55 pm Post subject: |
|
|
Ok... After much frustration I figured out how this works.
Step 1: Import the template and copy the perl script to the scripts directory
Step 2: Make sure that in your Settings > Poller > Downed Host Detection is set to "Ping and SNMP"
Step 3: Devices and create a new host by clicking Add.
Step 4: Enter your description. Then your hostname... you can add a host that is pingable or 127.0.0.1. Then change the host template to "WeatherBug." then click create.
Step 5: Click on "Create Graphs for this Host"
Step 6: Then click on the types of weather you want to graph. I just checked them all.
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.
Step 8: Now go to your Graph Trees and add the host (the description is what you should look for) that we created earlier in step 1. Then wait for the poller go get the weather.
|
|
| Back to top |
|
 |
|