WeatherBug script & templates version 2.0
Moderators: Developers, Moderators
- Diggit2001
- Cacti User
- Posts: 195
- Joined: Tue May 03, 2005 4:29 pm
- Location: MD, US
Perl/Linux Noob
I am having some difficulty getting this all to work, presumably because of the LWP::Simple module, or the lack thereof. When I run the weatherbug.pl script from the command line, I get this: Can't locate LWP/Simple.pm in @INC...... I am assuming that I do not have this module installed, and I have no idea how to get it installed. Can anyone maybe point me in the right direction?
Here's my info:
-Chris
Here's my info:
ThanksCacti Version - 0.8.6j
Plugin Architecture - 1.1
Poller Type - Cactid v0.8.6i
Server Info - Linux 2.6.9-55.0.2.ELsmp
Web Server - Apache/2.0.52 (CentOS)
PHP - 4.3.9
PHP Extensions - yp, xml, wddx, tokenizer, sysvshm, sysvsem, standard, sockets, shmop, session, pspell, posix, pcre, overload, mime_magic, iconv, gmp, gettext, ftp, exif, dio, dbx, dba, curl, ctype, calendar, bz2, bcmath, zlib, openssl, apache2handler, gd, mysql, snmp, eAccelerator
MySQL - 4.1.20
RRDTool - 1.2.15
SNMP - 5.1.2
Plugins
- PHP Network Weathermap (weathermap - v0.92)
Thresholds (thold - v0.3.4)
Device Monitoring (monitor - v0.7)
Network Tools (tools - v0.2)
Syslog Monitoring (haloe - v0.4)
RRD Cleaner (rrdclean - v1.1)
NTop Viewer (ntop - v0.1)
Update Checker (update - v0.3)
Host Info (hostinfo - v0.1)
Uptime (uptime - v0.3)
PHP Network Managing (manage - v0.5.1)
-Chris
- Diggit2001
- Cacti User
- Posts: 195
- Joined: Tue May 03, 2005 4:29 pm
- Location: MD, US
I'm still having some troubles and I'm hoping someone out there can help me out. I was having problems making this work because of the LWP::Simple module, but I found a different script that was supposed to make it all work without needing that. This is the script I am now using:
Thanks
-Chris
If I run /usr/bin/perl weatherbug.pl 21104 from a command line, it returns results but looking at my log in Cacti, with it only set to "Low", I see this:#!/usr/bin/perl
$output = `/bin/bash -c 'wget --quiet -O - \"http:\/\/wisapidata.weatherbug.com\/WxDataISAPI\/WxDataISAPI.dll?Magic=10991&RegNum=3647055&ZipCode=21104&StationID=MARIT&Units=0&Version=2.7&Fore=1&t=1015084854\/"'`;
$output =~ s/[^-0-9|\|.]*//gi;
@weather = split(/\|/, $output);
# docs
# [0] - ID?
# [1] - Current Time
# [2] - Current Date
# [3] - Current Temperature
# [5] - Wind Speed (MPH)
# [7] - Gust Wind Speed (MPH)
# [10] - Barometer (Moisture)
# [11] - Humidity (%)
# [12] - High Tempurature
# [13] - Low Temperature
# [14] - Dew Point
# [15] - Wind Chill
print " Temp:" . $weather[3] . " Wind:" . $weather[5] . " Pressure:" . $weather[10] . " Humidity:" .
$weather[11] . " high_temp:" . $weather[12] . " low_temp:" . $weather[13] . " DewPoint:" .
$weather[14] . " FeelsLike:" . $weather[15];
If I set the log to debug, I see this:09/13/2007 10:41:20 AM - CACTID: Poller[0] Host[81] DS[1985] WARNING: Result from SCRIPT not valid. Partial Result: Temp:75 Wind:5 Pres...
09/13/2007 10:41:20 AM - CACTID: Poller[0] Host[81] DS[1984] WARNING: Result from SCRIPT not valid. Partial Result: Temp:75 Wind:5 Pres...
09/13/2007 10:41:20 AM - CACTID: Poller[0] Host[81] DS[1983] WARNING: Result from SCRIPT not valid. Partial Result: Temp:75 Wind:5 Pres...
09/13/2007 10:41:20 AM - CACTID: Poller[0] Host[81] DS[1982] WARNING: Result from SCRIPT not valid. Partial Result: Temp:75 Wind:5 Pres...
09/13/2007 10:41:20 AM - CACTID: Poller[0] Host[81] DS[1981] WARNING: Result from SCRIPT not valid. Partial Result: Temp:75 Wind:5 Pres...
09/13/2007 10:41:20 AM - CACTID: Poller[0] Host[81] DS[1980] WARNING: Result from SCRIPT not valid. Partial Result: Temp:75 Wind:5 Pres...
I appreciate any insight.09/13/2007 10:21:19 AM - CACTID: Poller[0] Host[81] DS[1980] WARNING: Result from SCRIPT not valid. Partial Result: Temp:73 Wind:3 Pres...
09/13/2007 10:21:19 AM - CACTID: Poller[0] Host[81] DS[1980] SCRIPT: /usr/bin/perl /var/www/html/scripts/weatherbug.pl 21104, output: U
09/13/2007 10:21:20 AM - CACTID: Poller[0] Host[81] DS[1981] WARNING: Result from SCRIPT not valid. Partial Result: Temp:73 Wind:3 Pres...
09/13/2007 10:21:20 AM - CACTID: Poller[0] Host[81] DS[1981] SCRIPT: /usr/bin/perl /var/www/html/scripts/weatherbug.pl 21104, output: U
09/13/2007 10:21:20 AM - CACTID: Poller[0] Host[81] DEBUG: The POPEN returned the following File Descriptor 22
09/13/2007 10:21:20 AM - CACTID: Poller[0] Host[81] DS[1982] WARNING: Result from SCRIPT not valid. Partial Result: Temp:73 Wind:3 Pres...
09/13/2007 10:21:20 AM - CACTID: Poller[0] Host[81] DS[1982] SCRIPT: /usr/bin/perl /var/www/html/scripts/weatherbug.pl 21104, output: U
09/13/2007 10:21:20 AM - CACTID: Poller[0] Host[81] DS[1983] WARNING: Result from SCRIPT not valid. Partial Result: Temp:73 Wind:3 Pres...
09/13/2007 10:21:20 AM - CACTID: Poller[0] Host[81] DS[1983] SCRIPT: /usr/bin/perl /var/www/html/scripts/weatherbug.pl 21104, output: U
09/13/2007 10:21:20 AM - CACTID: Poller[0] Host[81] DS[1984] SCRIPT: /usr/bin/perl /var/www/html/scripts/weatherbug.pl 21104, output: U
09/13/2007 10:21:20 AM - CACTID: Poller[0] Host[81] DS[1985] WARNING: Result from SCRIPT not valid. Partial Result: Temp:73 Wind:3 Pres...
09/13/2007 10:21:20 AM - CACTID: Poller[0] Host[81] DS[1985] SCRIPT: /usr/bin/perl /var/www/html/scripts/weatherbug.pl 21104, output: U"
09/13/2007 10:21:20 AM - CACTID: Poller[0] DEBUG: MySQL Insert ID '420': 'INSERT INTO poller_output (local_data_id, rrd_name, time, output) VALUES (1980,'','2007-09-13 10:21:19','U'),(1981,'','2007-09-13 10:21:19','U'),(1982,'','2007-09-13 10:21:19','U'),(1983,'','2007-09-13 10:21:19','U'),(1984,'','2007-09-13 10:21:19','U'),(1985,'','2007-09-13 10:21:19','U')'
09/13/2007 10:21:26 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/rra/weather_tries_1985.rrd --template 1189693279:U
09/13/2007 10:21:26 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/rra/weather_tries_1984.rrd --template 1189693279:U
09/13/2007 10:21:26 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/rra/weather_tries_1983.rrd --template 1189693279:U
09/13/2007 10:21:26 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/rra/weather_tries_1982.rrd --template 1189693279:U
09/13/2007 10:21:26 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/rra/weather_tries_1981.rrd --template 1189693279:U
09/13/2007 10:21:26 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/html/rra/weather_tries_1980.rrd --template 1189693279:U
Thanks
-Chris
-
- Cacti User
- Posts: 87
- Joined: Fri Mar 09, 2007 12:35 pm
blocky
My graphs on this are all blocky, as though AWS possibly isn't updating real often? Anyone else have this problem?
- Diggit2001
- Cacti User
- Posts: 195
- Joined: Tue May 03, 2005 4:29 pm
- Location: MD, US
Yeah, the dude that provided this script to me is not responding to the posts I have sent him so I'm kind of stuck.
When I run this script from the command line, I get results, with no errors so I'm not sure what's going on. I have set up a couple new templates to work with this script, but the graphs are just blank.
I guess if I could could the LWP::Simple module installed/working I would be in good shape with your script but I have so far been unsuccessful with figuring out that part. Could you perhaps point me in the right direction?
Thanks very much for the response.
-Chris
When I run this script from the command line, I get results, with no errors so I'm not sure what's going on. I have set up a couple new templates to work with this script, but the graphs are just blank.
I guess if I could could the LWP::Simple module installed/working I would be in good shape with your script but I have so far been unsuccessful with figuring out that part. Could you perhaps point me in the right direction?
Thanks very much for the response.
-Chris
- Diggit2001
- Cacti User
- Posts: 195
- Joined: Tue May 03, 2005 4:29 pm
- Location: MD, US
-
- Cacti User
- Posts: 87
- Joined: Fri Mar 09, 2007 12:35 pm
Can't locate LWP/Simple.pm
I'm having an issue when I try to run the script from my cact box. I'm not a Perl guy so If someone can give me a quick heads up about this it would be great.
Can't locate LWP/Simple.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.7 /usr/local/share/perl/5.8.7 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at WeatherBug.pl line 4.
BEGIN failed--compilation aborted at WeatherBug.pl line 4.
Can't locate LWP/Simple.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.7 /usr/local/share/perl/5.8.7 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at WeatherBug.pl line 4.
BEGIN failed--compilation aborted at WeatherBug.pl line 4.
Found the problem
If anyone else has the problem as described above, I was missing a couple modules that don't come with ubuntu by default, and I had to specify where the modules were in the script itself. Just email me at roy@hgracing.net if you need more information. Thanks guys! These forums are a life saver at times.
Who is online
Users browsing this forum: No registered users and 2 guests