Cable Modem Stats
- type:
- user_template_data
- usertemplate:
- generic
- 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
| Version | File |
|---|---|
| 0.8.7d | cable_modem_templates.zip |
Modem Script
| File | Make | Supported Models |
|---|---|---|
| 3com_cable_modem.zip | 3com | unknown |
| moto_surfboard_sb5100.zip | Motorola | SB5100 |
| moto_surfboard_sb5101.zip | Motorola | SB5101 |
| moto_surfboard_sb5120.zip | Motorola | SB5120 |
| rca_dcm315.zip | RCA | DCM315 |
| rca_dcm425.zip | RCA | DCM425 |
| sciatl_cable_modem.zip | Scientific Atlanta | WebSTAR 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.
- Import the templates in Cacti
- Modify the 'Cablemodem - Diagnostics Page' Data Input Method so it uses the correct script in the Input String.
- Copy the perl script to your \cacti\scripts\ folder.
- Add a new device in Cacti, using NO host template.
- 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.
- Click on Data Sources.
- Click on Add select the Cable modem device. Select the 'Cablemodem - Frequencies' data template. Click create. Repeat for the 'Cablemodem - Power Levels' template too.
- Click on Graph Management. Add the graphs for 'Cablemodem - Frequency' and 'Cablemodem - Power Levels'.
- In each graph you just created, select the proper fields in the Graph Item Fields section.
Screenshots
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.








