BT Openreach Fiber Modem HG612

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

Moderators: Developers, Moderators

Post Reply
chrisbish92
Posts: 4
Joined: Tue Oct 08, 2013 2:39 pm

BT Openreach Fiber Modem HG612

Post by chrisbish92 »

Hi All,

I'm after some help with the following guide I've found..

http://bennettsbits.wordpress.com/2012/ ... -graphing/

I have the script working but I've no idea how I get the output into a graph. I did give it a shot earlier but it's a complete mess.

Would anyone be able to help?

Many thanks.
chrisbish92
Posts: 4
Joined: Tue Oct 08, 2013 2:39 pm

Re: BT Openreach Fiber Modem HG612

Post by chrisbish92 »

I'm having issues with getting results into a graph now.

Run as Cacti user:
sh-4.1$ ./getvdslstats.pl
mul:13752 mdl:59964 ul:13667 dl:59072
sh-4.1$
Poller Log:
10/09/2013 10:50:33 AM - CMDPHP: Poller[0] Host[12] DS[138] CMD: perl /usr/share/cacti/scripts/getvdslstats.pl, output: U
10/09/2013 10:50:33 AM - CMDPHP: Poller[0] Host[12] DS[138] WARNING: Result from CMD not valid. Partial Result: U

Script:

Code: Select all

#!/usr/bin/perl -w
#
# Extract text from Router utility output
#
my $ExpectScript = "vdsl.ex";
my $ExpectScriptOutput = "vdsl.out";
if ( ! -x $ExpectScript )
{
printf("\n");
printf("ERROR: Expect script not found or not executable...exiting.\n");
printf("\n");
exit(1);
}

my @ExpectScriptResponse;
my $ResponseLine;
my $debug = 0;

`$ExpectScript > $ExpectScriptOutput 2>&1`;
@ExpectScriptResponse = `cat $ExpectScriptOutput`;
foreach ( @ExpectScriptResponse )
{
chomp($_);
$ResponseLine = $_;

if ( /^Max:/ )
{
if ( $debug )
{ printf("DEBUG: %s\n", $ResponseLine); }

$ResponseLine =~ s/^.*Upstream rate = (.*) Kbps, Downstream rate = (.*) Kbps.*$/mul:$1 mdl:$2/;
printf("%s", $ResponseLine);
printf(" ");
}
elsif ( /^Path:/ )
{
if ( $debug )
{ printf("DEBUG: %s\n", $ResponseLine); }

$ResponseLine =~ s/^.*Upstream rate = (.*) Kbps, Downstream rate = (.*) Kbps.*$/ul:$1 dl:$2/;
printf("%s", $ResponseLine);
printf(" ");
}
else
{
# Not interested
}

}
printf("\n");
exit(0);
chrisbish92
Posts: 4
Joined: Tue Oct 08, 2013 2:39 pm

Re: BT Openreach Fiber Modem HG612

Post by chrisbish92 »

Further update:
10/09/2013 12:15:05 PM - SYSTEM STATS: Time:3.8052 Method:cmd.php Processes:1 Threads:N/A Hosts:11 HostsPerProcess:11 DataSources:170 RRDsProcessed:98
10/09/2013 12:11:28 PM - EXPORT STATS: ExportDate:2013-10-09_12:11:28 ExportDuration:83.1672 TotalGraphsExported:582
10/09/2013 12:10:05 PM - SYSTEM STATS: Time:3.8564 Method:cmd.php Processes:1 Threads:N/A Hosts:11 HostsPerProcess:11 DataSources:170 RRDsProcessed:98
10/09/2013 12:06:34 PM - EXPORT STATS: ExportDate:2013-10-09_12:06:34 ExportDuration:88.4241 TotalGraphsExported:582
10/09/2013 12:05:06 PM - SYSTEM STATS: Time:4.2531 Method:cmd.php Processes:1 Threads:N/A Hosts:11 HostsPerProcess:11 DataSources:170 RRDsProcessed:98
10/09/2013 12:00:06 PM - SYSTEM STATS: Time:4.8984 Method:cmd.php Processes:1 Threads:N/A Hosts:11 HostsPerProcess:11 DataSources:170 RRDsProcessed:98
10/09/2013 11:55:05 AM - SYSTEM STATS: Time:3.8907 Method:cmd.php Processes:1 Threads:N/A Hosts:11 HostsPerProcess:11 DataSources:170 RRDsProcessed:98
10/09/2013 12:23:51 PM - CMDPHP: Poller[0] Time: 0.3332 s, Theads: N/A, Hosts: 1
10/09/2013 12:23:51 PM - CMDPHP: Poller[0] Host[12] DS[138] CMD: perl /usr/share/cacti/scripts/getvdslstats.pl, output: mul:13767 mdl:59740 ul:13667 dl:59072
10/09/2013 12:23:50 PM - CMDPHP: Poller[0] Host[12] PING: UDP Ping Success (0.57 ms)
Poller seems to be running OK now. However graph is showing no data logged.


Graph:
Image

Code: Select all

sh-4.1$ rrdtool info /usr/share/cacti/rra/vdsl2modem_vdslmul_138.rrd
filename = "/usr/share/cacti/rra/vdsl2modem_vdslmul_138.rrd"
rrd_version = "0003"
step = 300
last_update = 1381318205
ds[VDSLMUL].type = "GAUGE"
ds[VDSLMUL].minimal_heartbeat = 600
ds[VDSLMUL].min = 0.0000000000e+00
ds[VDSLMUL].max = 1.0000000000e+02
ds[VDSLMUL].last_ds = "13756"
ds[VDSLMUL].value = NaN
ds[VDSLMUL].unknown_sec = 5
ds[VDSLMDL].type = "GAUGE"
ds[VDSLMDL].minimal_heartbeat = 600
ds[VDSLMDL].min = 0.0000000000e+00
ds[VDSLMDL].max = 1.0000000000e+02
ds[VDSLMDL].last_ds = "59740"
ds[VDSLMDL].value = NaN
ds[VDSLMDL].unknown_sec = 5
ds[VDSLUL].type = "GAUGE"
ds[VDSLUL].minimal_heartbeat = 600
ds[VDSLUL].min = 0.0000000000e+00
ds[VDSLUL].max = 1.0000000000e+02
ds[VDSLUL].last_ds = "13667"
ds[VDSLUL].value = NaN
ds[VDSLUL].unknown_sec = 5
ds[VDSLDL].type = "GAUGE"
ds[VDSLDL].minimal_heartbeat = 600
ds[VDSLDL].min = 0.0000000000e+00
ds[VDSLDL].max = 1.0000000000e+02
ds[VDSLDL].last_ds = "59072"
ds[VDSLDL].value = NaN
ds[VDSLDL].unknown_sec = 5
rra[0].cf = "AVERAGE"
rra[0].rows = 500
rra[0].cur_row = 235
rra[0].pdp_per_row = 1
rra[0].xff = 5.0000000000e-01
rra[0].cdp_prep[0].value = NaN
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[0].cdp_prep[1].value = NaN
rra[0].cdp_prep[1].unknown_datapoints = 0
rra[0].cdp_prep[2].value = NaN
rra[0].cdp_prep[2].unknown_datapoints = 0
rra[0].cdp_prep[3].value = NaN
rra[0].cdp_prep[3].unknown_datapoints = 0
rra[1].cf = "AVERAGE"
rra[1].rows = 600
rra[1].cur_row = 293
rra[1].pdp_per_row = 1
rra[1].xff = 5.0000000000e-01
rra[1].cdp_prep[0].value = NaN
rra[1].cdp_prep[0].unknown_datapoints = 0
rra[1].cdp_prep[1].value = NaN
rra[1].cdp_prep[1].unknown_datapoints = 0
rra[1].cdp_prep[2].value = NaN
rra[1].cdp_prep[2].unknown_datapoints = 0
rra[1].cdp_prep[3].value = NaN
rra[1].cdp_prep[3].unknown_datapoints = 0
rra[2].cf = "AVERAGE"
rra[2].rows = 700
rra[2].cur_row = 321
rra[2].pdp_per_row = 6
rra[2].xff = 5.0000000000e-01
rra[2].cdp_prep[0].value = NaN
rra[2].cdp_prep[0].unknown_datapoints = 0
rra[2].cdp_prep[1].value = NaN
rra[2].cdp_prep[1].unknown_datapoints = 0
rra[2].cdp_prep[2].value = NaN
rra[2].cdp_prep[2].unknown_datapoints = 0
rra[2].cdp_prep[3].value = NaN
rra[2].cdp_prep[3].unknown_datapoints = 0
rra[3].cf = "AVERAGE"
rra[3].rows = 775
rra[3].cur_row = 339
rra[3].pdp_per_row = 24
rra[3].xff = 5.0000000000e-01
rra[3].cdp_prep[0].value = NaN
rra[3].cdp_prep[0].unknown_datapoints = 18
rra[3].cdp_prep[1].value = NaN
rra[3].cdp_prep[1].unknown_datapoints = 18
rra[3].cdp_prep[2].value = NaN
rra[3].cdp_prep[2].unknown_datapoints = 18
rra[3].cdp_prep[3].value = NaN
rra[3].cdp_prep[3].unknown_datapoints = 18
rra[4].cf = "AVERAGE"
rra[4].rows = 797
rra[4].cur_row = 478
rra[4].pdp_per_row = 288
rra[4].xff = 5.0000000000e-01
rra[4].cdp_prep[0].value = NaN
rra[4].cdp_prep[0].unknown_datapoints = 138
rra[4].cdp_prep[1].value = NaN
rra[4].cdp_prep[1].unknown_datapoints = 138
rra[4].cdp_prep[2].value = NaN
rra[4].cdp_prep[2].unknown_datapoints = 138
rra[4].cdp_prep[3].value = NaN
rra[4].cdp_prep[3].unknown_datapoints = 138
rra[5].cf = "MAX"
rra[5].rows = 500
rra[5].cur_row = 98
rra[5].pdp_per_row = 1
rra[5].xff = 5.0000000000e-01
rra[5].cdp_prep[0].value = NaN
rra[5].cdp_prep[0].unknown_datapoints = 0
rra[5].cdp_prep[1].value = NaN
rra[5].cdp_prep[1].unknown_datapoints = 0
rra[5].cdp_prep[2].value = NaN
rra[5].cdp_prep[2].unknown_datapoints = 0
rra[5].cdp_prep[3].value = NaN
rra[5].cdp_prep[3].unknown_datapoints = 0
rra[6].cf = "MAX"
rra[6].rows = 600
rra[6].cur_row = 552
rra[6].pdp_per_row = 1
rra[6].xff = 5.0000000000e-01
rra[6].cdp_prep[0].value = NaN
rra[6].cdp_prep[0].unknown_datapoints = 0
rra[6].cdp_prep[1].value = NaN
rra[6].cdp_prep[1].unknown_datapoints = 0
rra[6].cdp_prep[2].value = NaN
rra[6].cdp_prep[2].unknown_datapoints = 0
rra[6].cdp_prep[3].value = NaN
rra[6].cdp_prep[3].unknown_datapoints = 0
rra[7].cf = "MAX"
rra[7].rows = 700
rra[7].cur_row = 46
rra[7].pdp_per_row = 6
rra[7].xff = 5.0000000000e-01
rra[7].cdp_prep[0].value = NaN
rra[7].cdp_prep[0].unknown_datapoints = 0
rra[7].cdp_prep[1].value = NaN
rra[7].cdp_prep[1].unknown_datapoints = 0
rra[7].cdp_prep[2].value = NaN
rra[7].cdp_prep[2].unknown_datapoints = 0
rra[7].cdp_prep[3].value = NaN
rra[7].cdp_prep[3].unknown_datapoints = 0
rra[8].cf = "MAX"
rra[8].rows = 775
rra[8].cur_row = 512
rra[8].pdp_per_row = 24
rra[8].xff = 5.0000000000e-01
rra[8].cdp_prep[0].value = NaN
rra[8].cdp_prep[0].unknown_datapoints = 18
rra[8].cdp_prep[1].value = NaN
rra[8].cdp_prep[1].unknown_datapoints = 18
rra[8].cdp_prep[2].value = NaN
rra[8].cdp_prep[2].unknown_datapoints = 18
rra[8].cdp_prep[3].value = NaN
rra[8].cdp_prep[3].unknown_datapoints = 18
rra[9].cf = "MAX"
rra[9].rows = 797
rra[9].cur_row = 329
rra[9].pdp_per_row = 288
rra[9].xff = 5.0000000000e-01
rra[9].cdp_prep[0].value = NaN
rra[9].cdp_prep[0].unknown_datapoints = 138
rra[9].cdp_prep[1].value = NaN
rra[9].cdp_prep[1].unknown_datapoints = 138
rra[9].cdp_prep[2].value = NaN
rra[9].cdp_prep[2].unknown_datapoints = 138
rra[9].cdp_prep[3].value = NaN
rra[9].cdp_prep[3].unknown_datapoints = 138
Last edited by chrisbish92 on Fri Oct 18, 2013 5:40 am, edited 1 time in total.
chrisbish92
Posts: 4
Joined: Tue Oct 08, 2013 2:39 pm

Re: BT Openreach Fiber Modem HG612

Post by chrisbish92 »

Removed the RRD file and waiting for it to be re-made.

Looks to be working now. :)
fbnts
Posts: 1
Joined: Tue Feb 18, 2014 5:17 am

Re: BT Openreach Fiber Modem HG612

Post by fbnts »

Hi,

I'm fairly new to Cacti so not entirely sure on setting up my own graphs. I have the script working pulling the line data, how do I set up the graphs in Cacti?

Also, I'd like to graph the SNR & Attenuation - I presume I can just change the above script to cut out those figures?

Tom
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests