docs: Tiny Sensor-State update

This commit is contained in:
Tony Murray
2016-09-27 13:08:09 -05:00
parent 59d294a58f
commit 11f087f147

View File

@@ -55,10 +55,10 @@ The file should be located in /includes/discovery/sensors/state/cisco.inc.php.
<?php
if ($device['os_group'] == 'cisco') {
$temp = snmpwalk_cache_multi_oid($device, 'ciscoEnvMonSupplyStatusTable', array(), 'CISCO-ENVMON-MIB');
$oids = snmpwalk_cache_multi_oid($device, 'ciscoEnvMonSupplyStatusTable', array(), 'CISCO-ENVMON-MIB');
$cur_oid = '.1.3.6.1.4.1.9.9.13.1.5.1.3.';
if (is_array($temp)) {
if (is_array($oids)) {
//Create State Index
$state_name = 'ciscoEnvMonSupplyState';
@@ -86,9 +86,9 @@ if ($device['os_group'] == 'cisco') {
}
}
foreach ($temp as $index => $entry) {
foreach ($oids as $index => $entry) {
//Discover Sensors
discover_sensor($valid['sensor'], 'state', $device, $cur_oid.$index, $index, $state_name, $temp[$index]['ciscoEnvMonSupplyStatusDescr'], '1', '1', null, null, null, null, $temp[$index]['ciscoEnvMonSupplyState'], 'snmp', $index);
discover_sensor($valid['sensor'], 'state', $device, $cur_oid.$index, $index, $state_name, $entry['ciscoEnvMonSupplyStatusDescr'], '1', '1', null, null, null, null, $entry['ciscoEnvMonSupplyState'], 'snmp', $index);
//Create Sensor To State Index
create_sensor_to_state_index($device, $state_name, $index);