Cacti (home)ForumsDocumentation

Cable Modem Stats

type:
user_template_data
usertemplate:
generic
author:
bsod2600
version:
1.0
script:
Perl Script
description:
Cable modem statistics (Non-SNMP enabled)
Cacti:
0.8.7d
date:
2009-04-23
includes:
yes
templates:
DOCS-IF MIB,
docsis,
cable modem,
snr

Download

Template

VersionFile
0.8.7dcable_modem_templates.zip

Modem Script

FileMakeSupported Models
3com_cable_modem.zip3comunknown
moto_surfboard_sb5100.zipMotorolaSB5100
moto_surfboard_sb5101.zipMotorolaSB5101
moto_surfboard_sb5120.zipMotorolaSB5120
rca_dcm315.zipRCADCM315
rca_dcm425.zipRCADCM425
sciatl_cable_modem.zipScientific AtlantaWebSTAR DPX2100

Requirements

  • Cable modem is NOT accessible via SNMP. Attempt to SNMPWALK .1.3.6.1.2.1.10.127.1.2.2.1 to verify. Many ISP's block users from accessing the modem with SNMP.
  • If the modem IS accessible via SNMP, you should use the DOCSIS Modem Stats script instead.
  • Perl installed on the Cacti server.

Installation

There are two parts to this:
A) The generic Data Input Method, Data Template and Graph templates.
B) The Perl script which collects the information from the web enabled cable modem diagnostic pages.

The generic templates you shouldn't need to modify, unless you want to add additional fields not present. However, you will need to find the correct Perl Cable modem script that works with your modem. Many users have created them for the vast majority of the modems in use today. You should manually run the script against the cable modem to verify it functions, before attempting to use it with Cacti.

  1. Import the templates in Cacti
  2. Modify the 'Cablemodem - Diagnostics Page' Data Input Method so it uses the correct script in the Input String.
  3. Copy the perl script to your \cacti\scripts\ folder.
  4. Add a new device in Cacti, using NO host template.
  5. Change the down detection method to Ping and use UDP (or try ICMP). Top left corner of Cacti, the device should respond to pings. Also change the 'SNMP Version' field to Not In Use.
  6. Click on Data Sources.
  7. Click on Add select the Cable modem device. Select the 'Cablemodem - Frequencies' data template. Click create. Repeat for the 'Cablemodem - Power Levels' template too.
  8. Click on Graph Management. Add the graphs for 'Cablemodem - Frequency' and 'Cablemodem - Power Levels'.
  9. In each graph you just created, select the proper fields in the Graph Item Fields section.

Screenshots

Sample frequency

Sample frequency

Sample power levels

Sample power levels

Notes

A note to those writing (or re-writing) scripts for this template. Make sure you include some sort of logic that will timeout after a few seconds on a request. Otherwise, the script will hang while it attempts to contact the cable modem. This will then also cause a Cacti poller to hang, increasing the polling time significantly. The majority of the scripts use the Perl library LWP::Simple. The problem is that its default timeout for a request is 3 minutes!

Sample partial script that implements a short timeout:

use LWP::Simple qw(get $ua); 
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;

Support

The majority of the Perl scripts came from this forum post.






Personal Tools