Cablemodem template & perl script
Moderators: Developers, Moderators
Apparently his exported template is corrupt (mismatched hash values). wazoqaz needs to email his cacti database to the devs so they can take a look what is going on.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Does anyone know why this script would be DOSing my cable modem config page? The script will run fine for about a week, and stop working thanks to a dead admin page on the Motorola 5100. I can't even get to it using a web browser. The only solution is to power cycle the modem. Is anyone else having this problem and how often is the script running anyways?
Oh, the internet continues to work fine, by the way.
Oh, the internet continues to work fine, by the way.
Possibly buggy web software on the cable modem. Cacti fetching a webpage every 5 minutes probably has exposed some sort of memory leak, etc which kills the modem. I've experienced something similar with a ZyXEL router and using telnet.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Well, for now I'm using X-10 to powercycle the modem, but for some reason, the script isn't working within cacti. Executing it from the shell works fine though.
I'm wondering if it could be timing out or something, it sits there for probably 15 seconds before it power cycles.
Code: Select all
#!/usr/bin/perl
use warnings;
use strict;
use LWP::Simple;
my %data;
my %trash;
my @keys = qw(DownFreq DownSNR DownPower UpFreq UpPower);
my $content = LWP::Simple::get("http://192.168.100.1/signaldata.html");
if (defined $content) {}
else {
system("heyu foff A16");
sleep 5;
system("heyu fon A16");
die "couldn't get it";
}
$content =~ s/\ //g;
# regex in html source order
if ($content =~ /(<td>Frequency<\/td>)/gi) { $trash{a} = $1};
#if ($content =~ /<td>(-?\d+)\sHz\s*<\/td>/gi) { $data{DownFreq} = $1; }
{ $data{DownFreq} = 77; }
if ($content =~ /(<td>Signal To Noise Ratio<\/td>)/gi){ $trash{a} = $1};
if ($content =~ /<td>(-?\d+)\sdB\s*/gi) { $data{DownSNR} = $1; }
if ($content =~ /(<td>Power Level<\/td>)/gi) { $trash{a} = $1};
if ($content =~ /<td>(-?\d+)\sdB\s*/gi) { $data{DownPower} = $1; }
if ($content =~ /(<td>Frequency<\/td>)/gi) { $trash{a} = $1};
#if ($content =~ /<td>*(-?\d+)\sHz\s*<\/td>/gi) { $data{UpFreq} = $1; }
{ $data{UpFreq} = 50; }
if ($content =~ /(<td>Power Level<\/td>)/gi) { $trash{a} = $1};
if ($content =~ /<td>(-?\d+)\sdBmV\s*/gi) { $data{UpPower} = $1; }
for (@keys) {
print "$_:" . $data{$_} . " ";
}
print "\n";
-
- Posts: 1
- Joined: Mon Sep 10, 2007 9:11 pm
Scientific Atlantica WebSTAR DPX2100 Series Cable Modem
Here is my modem info for comcast on the East Coast:
Scientific Atlanta
Name WebSTAR DPX2100 Series Cable Modem
Cable Modem Serial Number 101737630
Cable Modem MAC Address 00:0a:73:60:d2:80
Hardware Version 1.1
Software Version 2.0.1r1131-0304 (dpx2100-v201r1131-0304a.p7b)
it is a Comcast branded rental unit so it is likely alot of people use it. I hacked the original posted script to pull out the Down Power, SNR and Up Power. You can use the original xml file to import and then change script name to this one.
This uses the authentication information that I got here:
http://www.dslreports.com/faq/7363
For the Scientific Atlantica modem from comcast. I poll the page:
http://192.168.100.1/DpxSystem.asp
to retrieve the info I need and parse out the html.
Jeremy
Scientific Atlanta
Name WebSTAR DPX2100 Series Cable Modem
Cable Modem Serial Number 101737630
Cable Modem MAC Address 00:0a:73:60:d2:80
Hardware Version 1.1
Software Version 2.0.1r1131-0304 (dpx2100-v201r1131-0304a.p7b)
it is a Comcast branded rental unit so it is likely alot of people use it. I hacked the original posted script to pull out the Down Power, SNR and Up Power. You can use the original xml file to import and then change script name to this one.
This uses the authentication information that I got here:
http://www.dslreports.com/faq/7363
For the Scientific Atlantica modem from comcast. I poll the page:
http://192.168.100.1/DpxSystem.asp
to retrieve the info I need and parse out the html.
Jeremy
- Attachments
-
- sciatl_cable_modem.pl
- (634 Bytes) Downloaded 490 times
- xtremebassist
- Posts: 7
- Joined: Sat Feb 17, 2007 2:42 pm
- Contact:
Motorola SB5120
I modified the perl script and template for a Motorola SB5120 cable modem. The template was created in Cacti 0.8.7b.
The files are also available here
The files are also available here
- Attachments
-
- Motorola_SB5120.tar.gz
- Cable Modem Power and Frequency level template and script for Motorola SB5120 Cable Modem
- (4.27 KiB) Downloaded 474 times
No graphs from the 5101 template/script
I can run the script manually, and it outputs the values in the proper format.
However, no graph (blank or otherwise) is created, even though it appears to be configured correctly. When I turn debugging on, I don't see any errors or warnings.
What do I need to do to troubleshoot this?
However, no graph (blank or otherwise) is created, even though it appears to be configured correctly. When I turn debugging on, I don't see any errors or warnings.
What do I need to do to troubleshoot this?
I've gone over all the files, scripts and templates.
I can't find an error anywhere.
I'm new to Cacti (I've used MRTG for years, and toyed with Zenoss). I managed to get a couple of other graphs that were not working fixed on my install (namely the HTTPresponse time script).
I'm ready to pull my hair out....
I can't find an error anywhere.
I'm new to Cacti (I've used MRTG for years, and toyed with Zenoss). I managed to get a couple of other graphs that were not working fixed on my install (namely the HTTPresponse time script).
I'm ready to pull my hair out....
Attached is an updated script for an RCA 415. Most important feature is the use of a 10 second timeout. This prevents the default 3 minute timeout for LWP::simple from causing the cacti poller from running too long.
rca_dcm425.pl
rca_dcm425.pl
Code: Select all
#!/usr/bin/perl
# Programmed by BSOD2600
use LWP::Simple qw(get $ua);
my %data;
my $content;
$ua->agent('My agent/1.0');
$ua->timeout(10); # time out after 10 seconds
$content .= get("http://192.168.100.1/t2" . $_ . ".asp") or die $! for 2..6;
$content =~ s/\ |\n//g;
# regex in html source order
if ($content =~ /Acquired at (-?\d+\.\d+) MHz/) { $data{DownFreq} = $1; }
if ($content =~ /SNR: (-?[0-9.]+) dB/) { $data{DownSNR} = $1; }
if ($content =~ /Frequency: (-?[0-9.]+) MHz/) { $data{UpFreq} = $1; }
if ($content =~ /Received Signal Strength: (-?[0-9.]+) dBmV/) { $data{DownPower} = $1; }
if ($content =~ /Power Level: (-?[0-9.]+) dBmV/) { $data{UpPower} = $1; }
if ($content =~ /Error Rate: (-?[0-9.]+) %/) { $data{ErrorRate} = $1; }
if ($content =~ /Channel ID: (-?[0-9.]+)/) { $data{Channel} = $1; }
@data{qw(DownQAM UpQAM)} = ($content =~ /Modulation: (-?[0-9.]+) QAM/g);
for (keys %data) {
printf "%s:%s ", $_, $data{$_};
}
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
-
- Posts: 21
- Joined: Mon May 25, 2009 11:52 pm
- Location: Seattle, WA
Comcast Business Gateway aka SMC8014
Hello!
My work just got the Comcast 50/10 option. None of the scripts seem to work. I've figured out the url, but the parsing is beyond me. I've attached the html from our modem. SNMP is not available.
The initial modem/router page does require a login, but directly accessing it seems to work fine.
All assistance is appreciated!!
TalkingToes
The Comcast 100/100 might be an option by Christmas in Seattle.
My work just got the Comcast 50/10 option. None of the scripts seem to work. I've figured out the url, but the parsing is beyond me. I've attached the html from our modem. SNMP is not available.
The initial modem/router page does require a login, but directly accessing it seems to work fine.
All assistance is appreciated!!
TalkingToes
The Comcast 100/100 might be an option by Christmas in Seattle.
- Attachments
-
- Comcast Business Modem.txt
- (13.36 KiB) Downloaded 347 times
talkingtoes: Whats the modem brand/model? Also, that html page you posted doesn't seem to contain any real output of the modem's data values.
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
-
- Posts: 21
- Joined: Mon May 25, 2009 11:52 pm
- Location: Seattle, WA
As per my previous post's subject, it is a "Comcast Business Gateway", which is the official model name, but per the many forums, it's evidently a " SMC8014 " that was crippled. one login for comcast (root) and one for customers ( cusadmin / highspeed ).
I'll post the two screen shots, but the important data seems to be in the "var" statements at the top of the HTML.
<rant> My HUGE issue with this little box, if it HARD resets, I cannot do anything to fix it. The transparent bridge is turned OFF, NAT is turned ON, and the internal DHCP server is turned ON. All 13 exposed IP addresses are blocked. Why would you default the DHCP server to ON in a Business environment? (which happens to overlap our actual DHCP licenses) I have to call the Comcast Business 800-391-3000 number and their (Really nice guys in Kent, WA) techs remotely reconfigure it for me. </rant>
Thanks!!
TalkingToes
I'll post the two screen shots, but the important data seems to be in the "var" statements at the top of the HTML.
<rant> My HUGE issue with this little box, if it HARD resets, I cannot do anything to fix it. The transparent bridge is turned OFF, NAT is turned ON, and the internal DHCP server is turned ON. All 13 exposed IP addresses are blocked. Why would you default the DHCP server to ON in a Business environment? (which happens to overlap our actual DHCP licenses) I have to call the Comcast Business 800-391-3000 number and their (Really nice guys in Kent, WA) techs remotely reconfigure it for me. </rant>
Thanks!!
TalkingToes
- Attachments
-
- Downstream.GIF (69.62 KiB) Viewed 19728 times
-
- Upstream.GIF (66.33 KiB) Viewed 19728 times
-
- feat-gateway-modem.txt
- (13.36 KiB) Downloaded 434 times
-
- Posts: 4
- Joined: Mon Nov 15, 2010 4:04 am
Re: Cablemodem template & perl script
Updated host template for SB5101... Working with 0.8.7g
- Attachments
-
- cacti_host_template_cablemodem.xml
- (26.49 KiB) Downloaded 329 times
Re: Cablemodem template & perl script
Has anyone got this to work?
I am also getting the 'no graphs' issue.
No errors in logfile, even under DEV settings.
Running the script manually gives the correct results.
Ubuntu 10.04 server
Cacti 8.7e
SB5101 modem
Edit: does it have anything to do with this (when loading the XML)
Import Results
...
Graph Template
[success] Cablemodem - Power Levels [update]
+ Found Dependency: (Data Template Item) cable_uppower
+ Found Dependency: (GPRINT Preset) Normal
+ Found Dependency: (Data Template Item) cable_downpower
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
Too bad the log files dont tell me what dependency wasnt met...
I am also getting the 'no graphs' issue.
No errors in logfile, even under DEV settings.
Running the script manually gives the correct results.
Ubuntu 10.04 server
Cacti 8.7e
SB5101 modem
Edit: does it have anything to do with this (when loading the XML)
Import Results
...
Graph Template
[success] Cablemodem - Power Levels [update]
+ Found Dependency: (Data Template Item) cable_uppower
+ Found Dependency: (GPRINT Preset) Normal
+ Found Dependency: (Data Template Item) cable_downpower
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
+ Unmet Dependency: (Data Template Item)
Too bad the log files dont tell me what dependency wasnt met...
Who is online
Users browsing this forum: No registered users and 4 guests