|
From: Mark K. <mk...@co...> - 2006-02-21 19:45:17
|
I've been playing around with weatherbug.pl that came with cacti version 0.8.6g and found a couple of bugs. It doesn't capture negative values properly from the weatherbug.com data. This was simple enough to fix, just by putting a - in the character matching group: < $output =~ s/[^0-9|\|]*//gi; --- > $output =~ s/[^-0-9|\|]*//gi; I think too many of you work in datacenters in a warmer climate. ;-) I also made some quick changes to the script so that it will take arguments for the station ID and zip code instead of having to modify the script to make those changes. And added the remaining values that it will process from the return data it gets from weatherbug.com, including: [4] - Wind Direction (Degrees) [6] - Gust direction (Degrees) [8] - Rain amount today [9] - Rain rate per hour [16] - Monthly rainfall As with the barometric pressure, you'd have to divide the value of rain fall by 100 to get the proper value. While some of this information may not seem useful, its good to have it available. Some people might be using the script for graphing direction or whatever. I've attached my version of the script. Maybe it can be included in the next version of cacti to fix these issues. There was also an issue with the time being specified in the URL for the wget. -- Mark S. Krenz System Administrator Cook Incorporated mk...@co... phone: (812)339-2235 ext.2239 |