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 »

I might play around with it over spring break with my parents cable modem on Comcast (they block snmp).
User avatar
Mees
Posts: 8
Joined: Thu Nov 17, 2005 2:38 am
Location: Oslo

Economising on script execution

Post by Mees »

Thans for the this "Coocking book" in how to set up polling via the script server.
I am have been implementing this on one of my modems also, which now is easy :D

One thing I have seen is that when I run two different templates from the same script, it seems like (poller cache and log file) that the script is runned twice during one 5 min. cycle.
Does cacti and its script server understand that it only needs to run this script once, or will it run the script twice on the same host when the two graph templates utilised ?

So does Cacti, like MRTG, economise on the polling?

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

Post by BSOD2600 »

The script should only be run once per data source its set on...
oscar.sanabria
Cacti User
Posts: 53
Joined: Tue Apr 04, 2006 3:45 pm
Location: Colombia
Contact:

Dont have data in my grpahs

Post by oscar.sanabria »

My CM's support SNMP but when the cacti create graphs for signal levels and Stat Counters, thats not take datas, the graph dont have data, is empty, without data.

Any can help me...My grpahs are same that jadam's graph,

This is a example in debug mode in data source:

/usr/local/rrdtool-1.2.12/bin/rrdtool create \
/usr/local/apache2/htdocs/cacti/rra/andres_casa_cmstatust2timeouts_997.rrd \
--step 300 \
DS:DownChannelPower:GAUGE:600:-80:80 \
DS:CmStatusT4Timeouts:GAUGE:600:0:U \
DS:CmStatusT3Timeouts:GAUGE:600:0:U \
DS:SigQSignalNoise:GAUGE:600:0:U \
DS:SigQMicroreflection:GAUGE:600:0:100 \
DS:CmStatusTxPower:GAUGE:600:0:1000 \
DS:CmRangingTimeout:GAUGE:600:0:U \
DS:CmStatusResets:GAUGE:600:0:U \
DS:CmStatusLostSyncs:GAUGE:600:0:U \
DS:CmStatusT1Timeouts:GAUGE:600:0:U \
DS:CmStatusT2Timeouts:GAUGE:600:0:U \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MIN:0.5:1:600 \
RRA:MIN:0.5:6:700 \
RRA:MIN:0.5:24:775 \
RRA:MIN:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
RRA:LAST:0.5:1:600 \
RRA:LAST:0.5:6:700 \
RRA:LAST:0.5:24:775 \
RRA:LAST:0.5:288:797 \

Now in graph Management:

/usr/local/rrdtool-1.2.12/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Andres Casa - DOCSIS Stat Counters" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
DEF:a="/usr/local/apache2/htdocs/cacti/rra/andres_casa_cmstatust2timeouts_998.rrd":CmStatusLostSyncs:AVERAGE \
DEF:b="/usr/local/apache2/htdocs/cacti/rra/andres_casa_cmstatust2timeouts_998.rrd":CmRangingTimeout:AVERAGE \
DEF:c="/usr/local/apache2/htdocs/cacti/rra/andres_casa_cmstatust2timeouts_998.rrd":CmStatusResets:AVERAGE \
DEF:d="/usr/local/apache2/htdocs/cacti/rra/andres_casa_cmstatust2timeouts_998.rrd":CmStatusT1Timeouts:AVERAGE \
DEF:e="/usr/local/apache2/htdocs/cacti/rra/andres_casa_cmstatust2timeouts_998.rrd":CmStatusT2Timeouts:AVERAGE \
DEF:f="/usr/local/apache2/htdocs/cacti/rra/andres_casa_cmstatust2timeouts_998.rrd":CmStatusT3Timeouts:AVERAGE \
DEF:g="/usr/local/apache2/htdocs/cacti/rra/andres_casa_cmstatust2timeouts_998.rrd":CmStatusT4Timeouts:AVERAGE \
LINE2:a#0000FF:"Lost Syncs" \
GPRINT:a:LAST:" Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n" \
LINE2:b#00BF47:"Ranging Timeouts\:" \
GPRINT:b:LAST:"Current\:%8.2lf %s" \
GPRINT:b:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:b:MAX:"Maximum\:%8.2lf %s\n" \
LINE2:c#FF5700:"Resets\:" \
GPRINT:c:LAST:" Current\:%8.2lf %s" \
GPRINT:c:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:c:MAX:"Maximum\:%8.2lf %s\n" \
LINE2:d#EAAF00:"T1 Timeouts\:" \
GPRINT:d:LAST:" Current\:%8.2lf %s" \
GPRINT:d:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:d:MAX:"Maximum\:%8.2lf %s\n" \
LINE2:e#D8ACE0:"T2 Timeouts\:" \
GPRINT:e:LAST:" Current\:%8.2lf %s" \
GPRINT:e:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:e:MAX:"Maximum\:%8.2lf %s\n" \
LINE2:f#B1441E:"T3 Timeouts\:" \
GPRINT:f:LAST:" Current\:%8.2lf %s" \
GPRINT:f:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:f:MAX:"Maximum\:%8.2lf %s\n" \
LINE2:g#8D00BA:"T4 Timeouts\:" \
GPRINT:g:LAST:" Current\:%8.2lf %s" \
GPRINT:g:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:g:MAX:"Maximum\:%8.2lf %s\n"
RRDTool Says:
OK



usr/local/rrdtool-1.2.12/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Andres Casa - DOCSIS Signal Levels" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=-10 \
--vertical-label="" \
--slope-mode \
DEF:a="/usr/local/apache2/htdocs/cacti/rra/andres_casa_cmstatust2timeouts_997.rrd":DownChannelPower:AVERAGE \
DEF:b="/usr/local/apache2/htdocs/cacti/rra/andres_casa_cmstatust2timeouts_997.rrd":CmStatusTxPower:AVERAGE \
DEF:c="/usr/local/apache2/htdocs/cacti/rra/andres_casa_cmstatust2timeouts_997.rrd":SigQMicroreflection:AVERAGE \
DEF:d="/usr/local/apache2/htdocs/cacti/rra/andres_casa_cmstatust2timeouts_997.rrd":SigQSignalNoise:AVERAGE \
CDEF:cdefa=a,10,/ \
CDEF:cdefe=b,10,/ \
CDEF:cdefbc=d,10,/ \
LINE2:cdefa#0000FF:"Downstream Power (dBmV)" \
GPRINT:cdefa:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefa:MIN:"Min\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Max\:%8.2lf %s\n" \
LINE2:cdefe#FF5700:"Upstream Power (dBmV)" \
GPRINT:cdefe:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefe:MIN:"Min\:%8.2lf %s" \
GPRINT:cdefe:MAX:"Max\:%8.2lf %s\n" \
LINE2:c#837C04:"Microreflections (dBc)" \
GPRINT:c:LAST:" Current\:%8.2lf %s" \
GPRINT:c:MIN:"Min\:%8.2lf %s" \
GPRINT:c:MAX:"Max\:%8.2lf %s\n" \
LINE2:cdefbc#6EA100:"Signal/Noise ratio (dB)" \
GPRINT:cdefbc:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefbc:MIN:"Min\:%8.2lf %s" \
GPRINT:cdefbc:MAX:"Max\:%8.2lf %s\n"
RRDTool Says:
OK

This is my log file:
04/18/2006 02:41:00 PM - CMDPHP: Poller[0] Host[170] DS[890] SNMP: v2: 10.1.57.213, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.2, output: 7614017
04/18/2006 02:41:00 PM - CMDPHP: Poller[0] Host[170] DS[890] SNMP: v2: 10.1.57.213, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.2, output: 250347304
04/18/2006 02:41:00 PM - CMDPHP: Poller[0] Host[170] DS[997] SERVER: /usr/local/apache2/htdocs/cacti/scripts/ss_docsis_stats.php ss_docsis_stats 10.1.57.213community2161500, output: U
04/18/2006 02:41:00 PM - CMDPHP: Poller[0] Host[170] DS[997] WARNING: Result from SERVER not valid. Partial Result: docsIfDownChannelPow
04/18/2006 02:41:00 PM - CMDPHP: Poller[0] Host[170] DS[998] SERVER: /usr/local/apache2/htdocs/cacti/scripts/ss_docsis_stats.php ss_docsis_stats 10.1.57.213community2161500, output: U
04/18/2006 02:41:00 PM - CMDPHP: Poller[0] Host[170] DS[998] WARNING: Result from SERVER not valid. Partial Result: docsIfDownChannelPow
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

doesn't look like your modem supports all the fields that are being queried.

snmpwalk .1.3.6.1.2.1.10.127.1.1.1.1.6 and post the results.

Also manually run the script under the php script server and see what the results are.
oscar.sanabria
Cacti User
Posts: 53
Joined: Tue Apr 04, 2006 3:45 pm
Location: Colombia
Contact:

My post

Post by oscar.sanabria »

Hi.

This are my result for u mib:

SNMPv2-SMI::transmission.127.1.1.1.1.6.3 = INTEGER: 0

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

Post by BSOD2600 »

hmm, ok. So what happens when you manually run the script under the script server?
kanada
Cacti User
Posts: 137
Joined: Sun Aug 28, 2005 12:51 pm

Post by kanada »

Hmm.. i have one problem when i load this script. Cacti in debug mode tell me:

ERROR: Not enough arguments

I clean load this script, so i don't understand.

Bay the way, when i made from console:
php scripts/ss_docsis_stats.php 10.80.4.7 public 2 161 500

i get answer:

docsIfDownChannelPower:141 docsIfSigQSignalNoise:378 docsIfSigQMicroreflections:36 docsIfCmRangingTimeout:5 docsIfCmStatusTxPower:393 docsIfCmStatusResets:0 docsIfCmStatusLostSyncs:0 docsIfCmStatusT1Timeouts:0 docsIfCmStatusT2Timeouts:0 docsIfCmStatusT3Timeouts:0 docsIfCmStatusT4

& rrd begin make graphs, but without results.

any ideas? Thanks..

Greetz,

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

Post by BSOD2600 »

Are you using cmd.php or cactid poller?

Clear your poller cache. Post the section of cacti log where the script runs.
kanada
Cacti User
Posts: 137
Joined: Sun Aug 28, 2005 12:51 pm

Post by kanada »

BSOD2600 wrote:Are you using cmd.php or cactid poller?

Clear your poller cache. Post the section of cacti log where the script runs.
I test it on cmd/cactid poller, on both rrd made graphs without results.

Older problem was solved (in script was no spaces between parameters, maybe someone will be repair that?)

Now all its ok.

Many Thanks && Greetz,

Alexander
Last edited by kanada on Mon Jun 05, 2006 4:42 am, edited 1 time in total.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Space between the parameters in the Data Input Method? Sounds like it wasn't properly imported or something.... the default script has spaces.
quinten
Posts: 6
Joined: Wed May 24, 2006 12:29 pm

Post by quinten »

also be sure you have these mibs in your snmp/mibs directory.

docs-baseline-privacy.mib
docs-cable-device.mib
docs-cable-if.mib

without these mibs, some docsis devices will not report the correct information OID, or it will say that the OID is not supported on X device.

The scripts use the DOCSIS standard v2 SNMP MIB, which is globally uniform for ALL docsis devices... if the modem does not answer the above mibs, its not fully DOCSIS compliant and should be beaten, burned, shot, blown up and trashed.

I have yet to find a Docsis Device that does not answer any of the above mib's.
Attachments
docsis-cm-mibs.zip
DOCSIS Mibs, just put them into your ../snmp/mibs folder. (AFTER you unzip them of course)
(35.58 KiB) Downloaded 1121 times
3AHO3A
Posts: 30
Joined: Wed Oct 04, 2006 9:20 am
Location: Somewhere in EU
Contact:

Post by 3AHO3A »

Hi. Have a problem. Docsis signal & stats dont appear. Modem is answering my SNMP queries, cause i can see the modem traffic information. Please show me where to dig?
thanx in advance

i think this is the problem logs
10/04/2006 12:05:03 PM - CMDPHP: Poller[0] Host[6] DS[76] WARNING: Result from SERVER not valid. Partial Result: docsIfDownChannelPow
10/04/2006 12:05:03 PM - CMDPHP: Poller[0] Host[6] DS[75] WARNING: Result from SERVER not valid. Partial Result: docsIfDownChannelPow

and this is the graph debug, here seems everything is OK, the image appears well but it contains no data
RRDTool Command:

/usr/local/rrdtool-1.2.15/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="modem - DOCSIS Signal Levels" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=-10 \
--vertical-label="" \
DEF:a="/var/www/html/cacti/rra/modem_downchannelpower_104.rrd":DownChannelPower:AVERAGE \
DEF:b="/var/www/html/cacti/rra/modem_downchannelpower_104.rrd":CmStatusTxPower:AVERAGE \
DEF:c="/var/www/html/cacti/rra/modem_downchannelpower_104.rrd":SigQMicroreflection:AVERAGE \
DEF:d="/var/www/html/cacti/rra/modem_downchannelpower_104.rrd":SigQSignalNoise:AVERAGE \
CDEF:cdefa=a,10,/ \
CDEF:cdefe=b,10,/ \
CDEF:cdefbc=d,10,/ \
LINE2:cdefa#0000FF:"Downstream Power (dBmV)" \
GPRINT:cdefa:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefa:MIN:"Min\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Max\:%8.2lf %s\n" \
LINE2:cdefe#FF5700:"Upstream Power (dBmV)" \
GPRINT:cdefe:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefe:MIN:"Min\:%8.2lf %s" \
GPRINT:cdefe:MAX:"Max\:%8.2lf %s\n" \
LINE2:c#837C04:"Microreflections (dBc)" \
GPRINT:c:LAST:" Current\:%8.2lf %s" \
GPRINT:c:MIN:"Min\:%8.2lf %s" \
GPRINT:c:MAX:"Max\:%8.2lf %s\n" \
LINE2:cdefbc#6EA100:"Signal/Noise ratio (dB)" \
GPRINT:cdefbc:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefbc:MIN:"Min\:%8.2lf %s" \
GPRINT:cdefbc:MAX:"Max\:%8.2lf %s\n"

RRDTool Says:

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

Post by BSOD2600 »

Please manually run the script under the script server and see what it reports back. It's possible your modem doesn't report all the snmp data.
3AHO3A
Posts: 30
Joined: Wed Oct 04, 2006 9:20 am
Location: Somewhere in EU
Contact:

Post by 3AHO3A »

[root@localhost scripts]# php ss_docsis_stats.php
PHP Warning: Missing argument 1 for ss_docsis_stats() in /var/www/html/cacti/scripts/ss_docsis_stats.php on line 15
PHP Warning: Missing argument 2 for ss_docsis_stats() in /var/www/html/cacti/scripts/ss_docsis_stats.php on line 15
PHP Warning: Missing argument 3 for ss_docsis_stats() in /var/www/html/cacti/scripts/ss_docsis_stats.php on line 15
PHP Warning: Missing argument 4 for ss_docsis_stats() in /var/www/html/cacti/scripts/ss_docsis_stats.php on line 15
PHP Warning: Missing argument 5 for ss_docsis_stats() in /var/www/html/cacti/scripts/ss_docsis_stats.php on line 15
PHP Warning: Missing argument 6 for ss_docsis_stats() in /var/www/html/cacti/scripts/ss_docsis_stats.php on line 15
PHP Warning: Missing argument 7 for ss_docsis_stats() in /var/www/html/cacti/scripts/ss_docsis_stats.php on line 15
Content-type: text/html
X-Powered-By: PHP/4.3.9

docsIfDownChannelPower:NaN docsIfSigQSignalNoise:NaN docsIfSigQMicroreflections:NaN docsIfCmRangingTimeout:NaN docsIfCmStatusTxPower:NaN docsIfCmStatusResets:NaN docsIfCmStatusLostSyncs:NaN docsIfCmStatusT1Timeouts:NaN docsIfCmStatusT2Timeouts:NaN docsIfCmStatusT3Timeouts:NaN docsIfCmStatusT4Timeouts:NaN[root@localhost scripts]#
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests