Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


DOCSIS Stats
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
BSOD2600
Cacti Moderator


Joined: 08 May 2004
Posts: 6793
Location: WA, USA

PostPosted: Tue Mar 07, 2006 7:08 pm    Post subject: Reply with quote

I might play around with it over spring break with my parents cable modem on Comcast (they block snmp).
Back to top
Mees



Joined: 17 Nov 2005
Posts: 8
Location: Oslo

PostPosted: Tue Mar 21, 2006 2:10 am    Post subject: Economising on script execution Reply with quote

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

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
Back to top
BSOD2600
Cacti Moderator


Joined: 08 May 2004
Posts: 6793
Location: WA, USA

PostPosted: Tue Mar 21, 2006 3:18 am    Post subject: Reply with quote

The script should only be run once per data source its set on...
Back to top
oscar.sanabria



Joined: 04 Apr 2006
Posts: 46
Location: Colombia

PostPosted: Tue Apr 18, 2006 1:44 pm    Post subject: Dont have data in my grpahs Reply with quote

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
Back to top
BSOD2600
Cacti Moderator


Joined: 08 May 2004
Posts: 6793
Location: WA, USA

PostPosted: Tue Apr 18, 2006 3:12 pm    Post subject: Reply with quote

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.
Back to top
oscar.sanabria



Joined: 04 Apr 2006
Posts: 46
Location: Colombia

PostPosted: Tue Apr 18, 2006 5:25 pm    Post subject: My post Reply with quote

Hi.

This are my result for u mib:

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

Thanks a lot.
Back to top
BSOD2600
Cacti Moderator


Joined: 08 May 2004
Posts: 6793
Location: WA, USA

PostPosted: Tue Apr 18, 2006 10:49 pm    Post subject: Reply with quote

hmm, ok. So what happens when you manually run the script under the script server?
Back to top
kanada
Cacti User


Joined: 28 Aug 2005
Posts: 125

PostPosted: Fri Jun 02, 2006 4:47 am    Post subject: Reply with quote

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.
Back to top
BSOD2600
Cacti Moderator


Joined: 08 May 2004
Posts: 6793
Location: WA, USA

PostPosted: Fri Jun 02, 2006 11:05 am    Post subject: Reply with quote

Are you using cmd.php or cactid poller?

Clear your poller cache. Post the section of cacti log where the script runs.
Back to top
kanada
Cacti User


Joined: 28 Aug 2005
Posts: 125

PostPosted: Mon Jun 05, 2006 2:47 am    Post subject: Reply with quote

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
Back to top
BSOD2600
Cacti Moderator


Joined: 08 May 2004
Posts: 6793
Location: WA, USA

PostPosted: Mon Jun 05, 2006 11:24 am    Post subject: Reply with quote

Space between the parameters in the Data Input Method? Sounds like it wasn't properly imported or something.... the default script has spaces.
Back to top
quinten



Joined: 24 May 2006
Posts: 6

PostPosted: Mon Jun 05, 2006 12:57 pm    Post subject: Reply with quote

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.



docsis-cm-mibs.zip
 Description:
DOCSIS Mibs, just put them into your ../snmp/mibs folder. (AFTER you unzip them of course)

Download
 Filename:  docsis-cm-mibs.zip
 Filesize:  35.58 KB
 Downloaded:  403 Time(s)

Back to top
3AHO3A



Joined: 04 Oct 2006
Posts: 30
Location: Somewhere in EU

PostPosted: Wed Oct 04, 2006 9:32 am    Post subject: Reply with quote

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
Back to top
BSOD2600
Cacti Moderator


Joined: 08 May 2004
Posts: 6793
Location: WA, USA

PostPosted: Wed Oct 04, 2006 11:12 am    Post subject: Reply with quote

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.
Back to top
3AHO3A



Joined: 04 Oct 2006
Posts: 30
Location: Somewhere in EU

PostPosted: Wed Oct 04, 2006 1:36 pm    Post subject: Reply with quote

[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]#
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4  Next
Page 2 of 4

 



Powered by phpBB © 2001, 2005 phpBB Group