DOCSIS Stats

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

You didn't run the script through the cacti script server

You'll also want to specify the various arguments the script wants. Look in your poller cache what Cacti already feeds it.
3AHO3A
Posts: 30
Joined: Wed Oct 04, 2006 9:20 am
Location: Somewhere in EU
Contact:

Post by 3AHO3A »

BSOD2600 wrote:You didn't run the script through the cacti script server
[root@localhost cacti]# php script_server.php
PHP Script Server has Started - Parent is cmd
/var/www/html/cacti/scripts/ss_docsis_stats.php ss_docsis_stats 192.168.124.232public1161500
docsIfDownChannelPower:NaN docsIfSigQSignalNoise:NaN docsIfSigQMicroreflections:NaN docsIfCmRangingTimeout:NaN docsIfCmStatusTxPower:NaN docsIfCmStatusResets:NaN docsIfCmStatusLostSyncs:NaN docsIfCmStatusT1Timeouts:NaN docsIfCmStatusT2Timeouts:NaN docsIfCmStatusT3Timeouts:NaN docsIfCmStatusT4Timeouts:NaN
quit
PHP Script Server Shutdown request received, exiting
Content-type: text/html
X-Powered-By: PHP/4.3.9
________________________

But, when i do this way, with spaces, it gives me an answer
[root@localhost cacti]# php script_server.php
PHP Script Server has Started - Parent is cmd
/var/www/html/cacti/scripts/ss_docsis_stats.php ss_docsis_stats 192.168.124.232 public 1 161 500
docsIfDownChannelPower:-59 docsIfSigQSignalNoise:345 docsIfSigQMicroreflections:26 docsIfCmRangingTimeout:20 docsIfCmStatusTxPower:592 docsIfCmStatusResets:136 docsIfCmStatusLostSyncs:609 docsIfCmStatusT1Timeouts:0 docsIfCmStatusT2Timeouts:1772 docsIfCmStatusT3Timeouts:30520 docsIfCmStatusT4Timeouts:98


BSOD2600 wrote:You'll also want to specify the various arguments the script wants. Look in your poller cache what Cacti already feeds it.
Data Source: modem - Traffic - 192.168.124.232 - cable0
RRD: /var/www/html/cacti/rra/modem_traffic_in_71.rrd
Action: 0, OID: .1.3.6.1.2.1.2.2.1.10.2 (Host: 192.168.124.232, Community: public)

Data Source: modem - DOCSIS Stats
RRD: /var/www/html/cacti/rra/modem_downchannelpower_104.rrd
Action: 2, Script: /var/www/html/cacti/scripts/ss_docsis_stats.php ss_docsis_stats 192.168.124.232public1161500

P.S. added spaces in input data method, waiting what will it show me
3AHO3A
Posts: 30
Joined: Wed Oct 04, 2006 9:20 am
Location: Somewhere in EU
Contact:

Post by 3AHO3A »

I did itt, graphs contains data now ;]
Thanx for support
Cacti Rulez
Ierlandfan
Posts: 4
Joined: Sun Jun 24, 2007 8:40 am

Post by Ierlandfan »

I am using Cacti 0.6I and having the same problem.

Using the cmd php script_server.php everything is ok.
SNMPwalk ok
But no graphs...

But the log keeps telling me:


06/24/2007 08:40:13 AM - THOLD: Poller[0] Checking Thresholds
06/24/2007 08:40:10 AM - SYSTEM STATS: Time:6.6728 Method:cmd.php Processes:1 Threads:N/A Hosts:4 HostsPerProcess:4 DataSources:20 RRDsProcessed:14
06/24/2007 08:40:09 AM - CMDPHP: Poller[0] Host[2] DS[22] WARNING: Result from SNMP not valid. Partial Result:


In the beginning the error was this:


06/24/2007 07:50:13 AM - THOLD: Poller[0] Checking Thresholds
06/24/2007 07:50:10 AM - SYSTEM STATS: Time:5.5184 Method:cactid Processes:1 Threads:1 Hosts:4 HostsPerProcess:4 DataSources:20 RRDsProcessed:14
06/24/2007 07:50:09 AM - CACTID: Poller[0] Host[2] DS[22] WARNING: Result from SNMP not valid. Partial Result: ...
06/24/2007 07:50:09 AM - CACTID: Poller[0] Host[2] ERROR: Problems parsing Multi SNMP OID! (oid: )





I changed a lot, imported it as xml, removed it, copy, paste script import, added spaces between the <brackets> in data input method, set catid to cm.php but it didn't do the trick.
By the way view poller cache? It is in SNMP cache?


Anyone know what to check? I am little lost here.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) DS[22] is this DOCSIS script?
2) snmpwalk .1.3.6.1.2.1.10.127.1 to verify your modem responds to DOCSIS related queries.
3) try using cmd.php instead and see if that makes a difference with the parsing Multi SNMP OID error.
Ierlandfan
Posts: 4
Joined: Sun Jun 24, 2007 8:40 am

Post by Ierlandfan »

1. DS is docsis script
2. SNMPwalk is ok. Lot of response
3.cmd.php gives me the following:

06/24/2007 12:05:13 PM - THOLD: Poller[0] Checking Thresholds
06/24/2007 12:05:09 PM - SYSTEM STATS: Time:5.7824 Method:cmd.php Processes:1 Threads:N/A Hosts:4 HostsPerProcess:4 DataSources:20 RRDsProcessed:14
06/24/2007 12:05:09 PM - CMDPHP: Poller[0] Host[2] DS[22] WARNING: Result from SNMP not valid. Partial Result:


(by the way, my scripts dir is under /var/www/html/scripts not under /var/www/html/cati/scripts)

script server cmd line: php script_server.php

/var/www/html/cacti/scripts/ss_docsis_stats.php ss_docsis_stats 192.168.100.1 public 1 161 500

docsIfDownChannelPower:36 docsIfSigQSignalNoise:376 docsIfSigQMicroreflections:39 docsIfCmRangingTimeout:5 docsIfCmStatusTxPower:438 docsIfCmStatusResets:0 docsIfCmStatusLostSyncs:0 docsIfCmStatusT1Timeouts:0 docsIfCmStatusT2Timeouts:0 docsIfCmStatusT3Timeouts:1 docsIfCmStatusT4Timeouts:0


maybe it was a permission thing, I got a permission denied, so I chmodded it, who knows..) testing as we speak.
Ierlandfan
Posts: 4
Joined: Sun Jun 24, 2007 8:40 am

Post by Ierlandfan »

Right, it works.

I deleted everything. (including host)
Uploaded everything again.
Made the host (without settings anything for example *not* setting generic-snmp-enabled-host) set it to none
make graph

Turned on debugging on log file. Saw the lack of spaces (Although I changed them and saved it) so a little confused i did:

Changed input query to %<>% and saved
Error (expected) Showed up in log (which is what I wanted)
Changed the % to spaces.
Cleared the poller,
Deleted the rrd files
Log ok!

and added graphing
And for some reason it works now!

Thanx, the debugging NaN topic bought me the ideas
roygrubb
Posts: 8
Joined: Wed Sep 19, 2007 9:03 am

creating .rrd, but not populating data

Post by roygrubb »

Most of our modems are Surfboard 5100s and it seems as if everything imported fine. I created the graphs via the device and verified that graph management is showing the graph meaning it created an .rrd just fine. The only thing is all fields are reporting "nan" as no data is being polled. I turned on debug and everything looks to be fine there as well. I would love to be able to get this information graphing in Cacti.
roygrubb
Posts: 8
Joined: Wed Sep 19, 2007 9:03 am

php script

Post by roygrubb »

our php script was in the wrong place as we're running Ubuntoo
Works great! thank you so much
cableguy34
Posts: 1
Joined: Thu Oct 18, 2007 2:51 pm

Cacti templates

Post by cableguy34 »

I am looking for Cable modem templetes for Cacti with SNMP walk or using SNMP. I also would like to monitor Rx, Tx, LostSyncs, Resets, T1, T2, T3, T4, For some reason i am having a hard time building my own mibs. so if anyone can assist, i would really appreciate it.

thanks everyone :D
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Ummm, did you even try the template in this post?
jt72
Posts: 5
Joined: Mon Jul 14, 2008 6:25 pm
Location: Cork, Ireland

Questions about Script - Template

Post by jt72 »

First of all, thanks for this script! I'm using it with Cacti 0.8.7 and having pretty good success. It's also a very useful example for gathering stats from DOCSIS devices.

I'm wondering if it's useful getting the RangingTimeout though, because it's not reallya counter, more of a setting. It's the time a CM will wait before incrementing the T3 Timeout counter if I remember correctly...

Code: Select all

docsIfCmRangingTimeout OBJECT-TYPE
        SYNTAX      TimeInterval
        MAX-ACCESS  read-write
        STATUS      current
        DESCRIPTION
            "Waiting time for a Ranging Response packet."
Curiously, if there's a really old CM that doesn't support all of the OIDs being queried, the CM might implement docsIfCmRangingRespTimeout (which is deprecated - OID .1.3.6.1.2.1.10.127.1.2.1.1.3.2).
jt72
Posts: 5
Joined: Mon Jul 14, 2008 6:25 pm
Location: Cork, Ireland

Polling 2x?

Post by jt72 »

BSOD2600 wrote:The script should only be run once per data source its set on...
Another post suggested they might be seeing the poller function 2x for each device. I installed and have a single CM host being polled but created 2 graphs for it.

Uploaded ss_docsis_stats.php to /cacti/scripts directory
Imported cacti_graph_template_docsis_signal_levels
Imported cacti_graph_template_docsis_stat_counters.xml

Created CM host with IP, None, SNMP (SNMPv2 defaults)
Created graph: Node 1 St Michaels Rd - DOCSIS Signal Levels
Created graph: Node 1 St Michaels Rd - DOCSIS Stat Counters

Code: Select all

07/15/2008 11:45:13 PM - SYSTEM STATS: Time:11.5523 Method:cmd.php Processes:1 Threads:N/A Hosts:7 HostsPerProcess:7 DataSources:73 RRDsProcessed:41
07/15/2008 11:45:13 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/rra/node_1_st_michaels_rd_cmstatust4timeouts_63.rrd --template DownChannelPower:SigQSignalNoise:SigQMicroreflection:CmRangingTimeout:CmStatusTxPower:CmStatusResets:CmStatusLostSyncs:CmStatusT1Timeouts:CmStatusT2Timeouts:CmStatusT3Timeouts:CmStatusT4Timeouts 1216161912:0:358:4:20:477:1:0:0:1:1:28
07/15/2008 11:45:13 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/rra/node_1_st_michaels_rd_cmstatust4timeouts_64.rrd --template DownChannelPower:SigQSignalNoise:SigQMicroreflection:CmRangingTimeout:CmStatusTxPower:CmStatusResets:CmStatusLostSyncs:CmStatusT1Timeouts:CmStatusT2Timeouts:CmStatusT3Timeouts:CmStatusT4Timeouts 1216161912:0:358:5:20:477:1:0:0:1:1:28
07/15/2008 11:45:13 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "delete from poller_output where local_data_id='63' and rrd_name='' and time='2008-07-15 23:45:12'"
07/15/2008 11:45:13 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "delete from poller_output where local_data_id='64' and rrd_name='' and time='2008-07-15 23:45:12'"
I guess this is normal because the graphs are representations of 2 different data sets? Please let me know if this is not the case. If I don't need to hit the CM with duplicate requests I'd prefer that.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

One should only need to create ONE data source with the DOCSIS, since as you've seen, it executes all of the queries in one go. These are all stored in the same rrd file which the graphs both pull from.

Hmm, looks like the script should probably be updates to return NaN if no data was returned...
jt72
Posts: 5
Joined: Mon Jul 14, 2008 6:25 pm
Location: Cork, Ireland

Downstream Power more than + or - 80 not graphed

Post by jt72 »

I have a couple of modems which are reporting downChannelPower of > 80 (so +8.0 dbMv). I think as a result the values are being dropped because they're out of the accepted input range (80 to -80?).

The range for DOCSIS modems is about +15 to -15, and some would work in a wider range. Does this mean we should update the graph template to use +200 to -200 as the valid range?

For example the first 2 CMs will NOT have the downChannelPower graphed (87 and 85 respectively) while the other one will.
07/16/2008 10:45:14 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/rra/node_5_teffia_park_cmstatust4timeouts_73.rrd --template DownChannelPower:SigQSignalNoise:SigQMicroreflection:CmRangingTimeout:CmStatusTxPower:CmStatusResets:CmStatusLostSyncs:CmStatusT1Timeouts:CmStatusT2Timeouts:CmStatusT3Timeouts:CmStatusT4Timeouts 1216244712:87:375:2:20:430:2:1:0:6:0:977
07/16/2008 10:45:15 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/rra/node_13_grafton_court_ballymahon_st__cmstatust4timeouts_82.rrd --template DownChannelPower:SigQSignalNoise:SigQMicroreflection:CmRangingTimeout:CmStatusTxPower:CmStatusResets:CmStatusLostSyncs:CmStatusT1Timeouts:CmStatusT2Timeouts:CmStatusT3Timeouts:CmStatusT4Timeouts 1216244714:85:375:0:20:437:3:5:0:1:577:374
07/16/2008 10:45:15 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/rra/node_10_clombalt_woods__cmstatust4timeouts_80.rrd --template DownChannelPower:SigQSignalNoise:SigQMicroreflection:CmRangingTimeout:CmStatusTxPower:CmStatusResets:CmStatusLostSyncs:CmStatusT1Timeouts:CmStatusT2Timeouts:CmStatusT3Timeouts:CmStatusT4Timeouts 1216244713:22:358:4:20:532:1:0:0:7:0:237
0
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests