mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
docs: Tiny Sensor-State update
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user