2010-08-02 23:11:54 +00:00
|
|
|
<?php
|
|
|
|
|
2015-07-13 20:10:26 +02:00
|
|
|
$cpe_oids = array(
|
|
|
|
'cpeExtPsePortEnable',
|
|
|
|
'cpeExtPsePortDiscoverMode',
|
|
|
|
'cpeExtPsePortDeviceDetected',
|
|
|
|
'cpeExtPsePortIeeePd',
|
|
|
|
'cpeExtPsePortAdditionalStatus',
|
|
|
|
'cpeExtPsePortPwrMax',
|
|
|
|
'cpeExtPsePortPwrAllocated',
|
|
|
|
'cpeExtPsePortPwrAvailable',
|
|
|
|
'cpeExtPsePortPwrConsumption',
|
|
|
|
'cpeExtPsePortMaxPwrDrawn',
|
|
|
|
'cpeExtPsePortEntPhyIndex',
|
|
|
|
'cpeExtPsePortEntPhyIndex',
|
|
|
|
'cpeExtPsePortPolicingCapable',
|
|
|
|
'cpeExtPsePortPolicingEnable',
|
|
|
|
'cpeExtPsePortPolicingAction',
|
|
|
|
'cpeExtPsePortPwrManAlloc',
|
|
|
|
);
|
2010-08-02 23:11:54 +00:00
|
|
|
|
2015-07-13 20:10:26 +02:00
|
|
|
$peth_oids = array(
|
|
|
|
'pethPsePortAdminEnable',
|
|
|
|
'pethPsePortPowerPairsControlAbility',
|
|
|
|
'pethPsePortPowerPairs',
|
|
|
|
'pethPsePortDetectionStatus',
|
|
|
|
'pethPsePortPowerPriority',
|
|
|
|
'pethPsePortMPSAbsentCounter',
|
|
|
|
'pethPsePortType',
|
|
|
|
'pethPsePortPowerClassifications',
|
|
|
|
'pethPsePortInvalidSignatureCounter',
|
|
|
|
'pethPsePortPowerDeniedCounter',
|
|
|
|
'pethPsePortOverLoadCounter',
|
|
|
|
'pethPsePortShortCounter',
|
|
|
|
'pethMainPseConsumptionPower',
|
|
|
|
);
|
2010-08-02 23:11:54 +00:00
|
|
|
|
2016-02-03 21:12:46 +01:00
|
|
|
if ($this_port['dot3StatsIndex'] && $port['ifType'] == 'ethernetCsmacd') {
|
2016-07-07 01:33:43 -05:00
|
|
|
$rrd_name = getPortRrdName($port_id, 'poe');
|
|
|
|
$rrd_def = array(
|
|
|
|
'DS:PortPwrAllocated:GAUGE:600:0:U',
|
|
|
|
'DS:PortPwrAvailable:GAUGE:600:0:U',
|
|
|
|
'DS:PortConsumption:DERIVE:600:0:U',
|
|
|
|
'DS:PortMaxPwrDrawn:GAUGE:600:0:U'
|
|
|
|
);
|
2010-08-02 23:11:54 +00:00
|
|
|
|
2015-07-13 20:10:26 +02:00
|
|
|
$upd = "$polled:".$port['cpeExtPsePortPwrAllocated'].':'.$port['cpeExtPsePortPwrAvailable'].':'.$port['cpeExtPsePortPwrConsumption'].':'.$port['cpeExtPsePortMaxPwrDrawn'];
|
2015-08-18 16:26:55 +00:00
|
|
|
|
|
|
|
$fields = array(
|
|
|
|
'PortPwrAllocated' => $port['cpeExtPsePortPwrAllocated'],
|
|
|
|
'PortPwrAvailable' => $port['cpeExtPsePortPwrAvailable'],
|
|
|
|
'PortConsumption' => $port['cpeExtPsePortPwrConsumption'],
|
|
|
|
'PortMaxPwrDrawn' => $port['cpeExtPsePortMaxPwrDrawn'],
|
|
|
|
);
|
|
|
|
|
2016-07-07 01:33:43 -05:00
|
|
|
$tags = compact('ifName', 'rrd_name', 'rrd_def');
|
2016-08-28 12:32:58 -05:00
|
|
|
data_update($device, 'poe', $tags, $fields);
|
2015-08-19 20:58:02 +00:00
|
|
|
|
2015-07-13 20:10:26 +02:00
|
|
|
echo 'PoE ';
|
|
|
|
}//end if
|