Permalink
Browse files

ComtechEFData: added IP Controller stats

  • Loading branch information...
ssinyagin committed Jul 13, 2012
1 parent 605c8ca commit 065f2ca6f06c118600eab9bebee13ef390bd0e9d
@@ -779,6 +779,10 @@
'name' => 'cdm570',
'source' => 'vendor/comtechefdata.xml',
},
+ 'ComtechEFData::cdmip' => {
+ 'name' => 'cdmip',
+ 'source' => 'vendor/comtechefdata.xml',
+ },
#### Empire Sysedge
'EmpireSystemedge::sysedge_opmode' => {
@@ -35,10 +35,22 @@ $Torrus::DevDiscover::registry{'ComtechEFData'} = {
our %oiddef =
(
'ComtechEFData' => '1.3.6.1.4.1.6247',
- 'CDM-570::cdm570' => '1.3.6.1.4.1.6247.24',
+ 'cdm570' => '1.3.6.1.4.1.6247.24',
+ 'cdm570TxFrequency' => '1.3.6.1.4.1.6247.24.1.2.2.1.0',
+ 'cdm570TxDataRate' => '1.3.6.1.4.1.6247.24.1.2.2.2.0',
+ 'cdm570RxFrequency' => '1.3.6.1.4.1.6247.24.1.2.3.1.0',
+ 'cdm570RxDataRate' => '1.3.6.1.4.1.6247.24.1.2.3.2.0',
+ 'cdmipWanFpgaRxPayLoadCount' => '1.3.6.1.4.1.6247.4.8.5.6.0',
);
+my %cdm570_OID = (
+ 'cdm570TxFrequency' => 'cdm-wan-tx-freq',
+ 'cdm570TxDataRate' => 'cdm-wan-tx-rate',
+ 'cdm570RxFrequency' => 'cdm-wan-rx-freq',
+ 'cdm570RxDataRate' => 'cdm-wan-rx-rate',
+ );
+
sub checkdevtype
{
my $dd = shift;
@@ -51,7 +63,7 @@ sub checkdevtype
return 0;
}
- if( $dd->oidBaseMatch( 'CDM-570::cdm570', $sysObjectID ) )
+ if( $dd->oidBaseMatch( 'cdm570', $sysObjectID ) )
{
$devdetails->setCap('cdm570');
}
@@ -81,6 +93,46 @@ sub discover
$data->{'param'}{'snmp-oids-per-pdu'} = 10;
+ # Get TX/RX frequency and data rate
+ if( $devdetails->hasCap('cdm570') )
+ {
+ my @oids = ();
+ foreach my $var ( sort keys %cdm570_OID )
+ {
+ push( @oids, $dd->oiddef($var) );
+ }
+
+ my $result = $session->get_request( -varbindlist => \@oids );
+ if( not defined $result )
+ {
+ Error('Failed to get CDM570 radio parameters');
+ return 0;
+ }
+
+ foreach my $var ( keys %cdm570_OID )
+ {
+ my $val = $result->{$dd->oiddef($var)};
+ if( not defined($val) )
+ {
+ $val = 0;
+ }
+ $data->{'cdm570'}{$var} = $val;
+ $data->{'param'}{$cdm570_OID{$var}} = $val;
+ }
+ }
+
+ # Check if IP cotroller is present
+ {
+ my $oid = $dd->oiddef('cdmipWanFpgaRxPayLoadCount');
+ my $result = $session->get_request( -varbindlist => [$oid] );
+
+ if( $session->error_status() == 0 and
+ defined( $result ) and
+ defined($result->{$oid}) )
+ {
+ $devdetails->setCap('CDMIPController');
+ }
+ }
return 1;
}
@@ -96,6 +148,11 @@ sub buildConfig
$cb->addTemplateApplication($devNode, 'ComtechEFData::cdm570');
}
+ if( $devdetails->hasCap('CDMIPController') )
+ {
+ $cb->addTemplateApplication($devNode, 'ComtechEFData::cdmip');
+ }
+
return;
}
@@ -28,6 +28,10 @@
<def name="cdm570RxFrequencyOffset" value="1.3.6.1.4.1.6247.24.1.3.2.3.0"/>
<def name="cdm570RxSignalLevel" value="1.3.6.1.4.1.6247.24.1.3.2.4.0"/>
<def name="cdm570RxEbNo" value="1.3.6.1.4.1.6247.24.1.3.2.5.0"/>
+ <def name="cdmipWanFpgaRxPayLoadCount" value="1.3.6.1.4.1.6247.4.8.5.6.0"/>
+ <def name="cdmipWanFpgaRxHeaderCount" value="1.3.6.1.4.1.6247.4.8.5.7.0"/>
+ <def name="cdmipWanFpgaTxHeaderCount" value="1.3.6.1.4.1.6247.4.8.5.9.0"/>
+ <def name="cdmipWanFpgaTxPayLoadCount" value="1.3.6.1.4.1.6247.4.8.5.10.0"/>
</definitions>
<datasources>
@@ -114,10 +118,121 @@
<param name="precedence" value="400"/>
<param name="nodeid" value="radio//%nodeid-device%//0//txpower"/>
</leaf>
-
</subtree>
</template>
+
+
+ <template name="cdmip">
+ <subtree name="IPController">
+ <param name="comment" value="IP Controller statistics"/>
+ <param name="rrd-create-dstype" value="COUNTER"/>
+ <param name="data-file" value="%system-id%_cdm_ip.rrd"/>
+
+ <leaf name="Bandwidth_Usage">
+ <param name="comment" value="Radio channel bandwidth usage" />
+ <param name="vertical-label" value="percent" />
+ <param name="graph-lower-limit" value="0" />
+ <param name="graph-upper-limit" value="100" />
+ <param name="upper-limit" value="100" />
+ <param name="rrd-hwpredict" value="disabled" />
+ <param name="precedence" value="1000" />
+ <param name="nodeid" value="hdlc//%nodeid-device%//0//bwusage"/>
+ <param name="ds-type" value="rrd-multigraph" />
+ <param name="ds-names" value="rx,tx" />
+
+ <param name="ds-expr-rx">
+ {RxHeaderBytes},{RxPayloadBytes},+,800,*,%cdm-wan-rx-rate%,/
+ </param>
+ <param name="graph-legend-rx"
+ value="RX use of %cdm-wan-rx-rate% bps" />
+ <param name="line-style-rx" value="##BpsIn" />
+ <param name="line-color-rx" value="##BpsIn" />
+ <param name="line-order-rx" value="1" />
+
+ <param name="ds-expr-tx">
+ {TxHeaderBytes},{TxPayloadBytes},+,800,*,%cdm-wan-tx-rate%,/
+ </param>
+ <param name="graph-legend-tx"
+ value="TX use of %cdm-wan-tx-rate% bps" />
+ <param name="line-style-tx" value="##BpsOut" />
+ <param name="line-color-tx" value="##BpsOut" />
+ <param name="line-order-tx" value="2" />
+ </leaf>
+
+
+ <leaf name="RX_bps">
+ <param name="comment"
+ value="Total RX data"/>
+ <param name="graph-legend" value="Total RX data"/>
+ <param name="vertical-label" value="bps"/>
+ <param name="ds-type" value="rrd-file" />
+ <param name="leaf-type" value="rrd-cdef" />
+ <param name="rpn-expr"
+ value="{RxHeaderBytes},{RxPayloadBytes},+,8,*" />
+ <param name="upper-limit" value="%cdm-wan-rx-rate%"/>
+ <param name="precedence" value="900"/>
+ <param name="nodeid" value="hdlc//%nodeid-device%//0//rx//totalbps"/>
+ </leaf>
+
+ <leaf name="TX_bps">
+ <param name="comment"
+ value="Total TX data"/>
+ <param name="graph-legend" value="Total TX data"/>
+ <param name="vertical-label" value="bps"/>
+ <param name="ds-type" value="rrd-file" />
+ <param name="leaf-type" value="rrd-cdef" />
+ <param name="rpn-expr"
+ value="{TxHeaderBytes},{TxPayloadBytes},+,8,*" />
+ <param name="upper-limit" value="%cdm-wan-tx-rate%"/>
+ <param name="precedence" value="800"/>
+ <param name="nodeid" value="hdlc//%nodeid-device%//0//tx//totalbps"/>
+ </leaf>
+
+ <leaf name="RxHeaderBytes">
+ <param name="comment" value="HDLC header bytes received"/>
+ <param name="rrd-ds" value="RxHeader"/>
+ <param name="snmp-object" value="$cdmipWanFpgaRxHeaderCount"/>
+ <param name="graph-legend" value="Rx Header Bytes"/>
+ <param name="vertical-label" value="Bps"/>
+ <param name="precedence" value="500"/>
+ <param name="nodeid" value="hdlc//%nodeid-device%//0//rx//headers"/>
+ </leaf>
+
+ <leaf name="RxPayloadBytes">
+ <param name="comment" value="Payload bytes received"/>
+ <param name="rrd-ds" value="RxPayload"/>
+ <param name="snmp-object" value="$cdmipWanFpgaRxPayLoadCount"/>
+ <param name="graph-legend" value="Rx Payload Bytes"/>
+ <param name="vertical-label" value="Bps"/>
+ <param name="precedence" value="400"/>
+ <param name="nodeid" value="hdlc//%nodeid-device%//0//rx//payload"/>
+ </leaf>
+
+ <leaf name="TxHeaderBytes">
+ <param name="comment" value="HDLC header bytes sent"/>
+ <param name="rrd-ds" value="TxHeader"/>
+ <param name="snmp-object" value="$cdmipWanFpgaTxHeaderCount"/>
+ <param name="graph-legend" value="Tx Header Bytes"/>
+ <param name="vertical-label" value="Bps"/>
+ <param name="precedence" value="300"/>
+ <param name="nodeid" value="hdlc//%nodeid-device%//0//tx//headers"/>
+ </leaf>
+
+ <leaf name="TxPayloadBytes">
+ <param name="comment" value="Payload bytes sent"/>
+ <param name="rrd-ds" value="TxPayload"/>
+ <param name="snmp-object" value="$cdmipWanFpgaTxPayLoadCount"/>
+ <param name="graph-legend" value="Tx Payload Bytes"/>
+ <param name="vertical-label" value="Bps"/>
+ <param name="precedence" value="200"/>
+ <param name="nodeid" value="hdlc//%nodeid-device%//0//tx//payload"/>
+ </leaf>
+
+ </subtree>
+ </template>
+
+
</datasources>
</configuration>

0 comments on commit 065f2ca

Please sign in to comment.