diff --git a/includes/definitions.inc.php b/includes/definitions.inc.php index 6e1cd4fa5d73..89bcb1b80594 100644 --- a/includes/definitions.inc.php +++ b/includes/definitions.inc.php @@ -1787,10 +1787,6 @@ $config['os'][$os]['icon'] = 'hp'; $config['os'][$os]['over'][0]['graph'] = 'device_bits'; $config['os'][$os]['over'][0]['text'] = 'Traffic'; -$config['os'][$os]['over'][1]['graph'] = 'device_processor'; -$config['os'][$os]['over'][1]['text'] = 'CPU Usage'; -$config['os'][$os]['over'][2]['graph'] = 'device_mempool'; -$config['os'][$os]['over'][2]['text'] = 'Memory Usage'; // HP MSM $os = 'hpmsm'; diff --git a/includes/discovery/sensors/power/hpblmos.inc.php b/includes/discovery/sensors/power/hpblmos.inc.php new file mode 100644 index 000000000000..366244171d22 --- /dev/null +++ b/includes/discovery/sensors/power/hpblmos.inc.php @@ -0,0 +1,27 @@ + $value[0], + 'state_descr' => $value[1], + 'state_draw_graph' => $value[2], + 'state_value' => $value[3], + 'state_generic_value' => $value[4] + ); + dbInsert($insert, 'state_translations'); + } + } + } + discover_sensor($valid['sensor'], 'state', $device, $current_oid, $current_id, $fan_state_name, $descr, '1', '1', null, null, null, null, $state, 'snmp', $current_id); + create_sensor_to_state_index($device, $fan_state_name, $current_id); + } + } + + + } + + $psu_oid = '.1.3.6.1.4.1.232.22.2.5.1.1.1.16'; + $psu_state_name = 'hpblmos_psustate'; + $psu_state_descr = 'PSU '; + $psu_state_oid = '.1.3.6.1.4.1.232.22.2.5.1.1.1.17.'; + + $psus = trim(snmp_walk($device, $psu_oid, '-Osqn')); + + foreach (explode("\n", $psus) as $psu) { + $psu = trim($psu); + if ($psu) { + list($oid, $presence) = explode(' ', $psu, 2); + if ($presence != 2) { + $split_oid = explode('.', $oid); + $current_id = $split_oid[(count($split_oid) - 1)]; + $current_oid = $psu_state_oid.$current_id; + $descr = $psu_state_descr.$current_id; + $state = snmp_get($device, $current_oid, '-Oqv'); + if (!empty($state)) { + $state_index_id = create_state_index($psu_state_name); + if ($state_index_id) { + $states = array( + array($state_index_id, 'other', 0, 1, 3), + array($state_index_id, 'ok', 1, 2, 0), + array($state_index_id, 'degraded', 1, 3, 1), + array($state_index_id, 'failed', 1, 4, 2), + ); + + foreach ($states as $value) { + $insert = array( + 'state_index_id' => $value[0], + 'state_descr' => $value[1], + 'state_draw_graph' => $value[2], + 'state_value' => $value[3], + 'state_generic_value' => $value[4] + ); + dbInsert($insert, 'state_translations'); + } + } + } + discover_sensor($valid['sensor'], 'state', $device, $current_oid, $current_id, $psu_state_name, $descr, '1', '1', null, null, null, null, $state, 'snmp', $current_id); + create_sensor_to_state_index($device, $psu_state_name, $current_id); + } + } + } +} diff --git a/includes/discovery/sensors/temperatures/hpblmos.inc.php b/includes/discovery/sensors/temperatures/hpblmos.inc.php new file mode 100644 index 000000000000..e5c74fd2b453 --- /dev/null +++ b/includes/discovery/sensors/temperatures/hpblmos.inc.php @@ -0,0 +1,25 @@ + 0) { + discover_sensor($valid['sensor'], 'temperature', $device, $current_oid, $current_id, $sensor_type, $descr, 1, 1, null, null, null, null, $value); + } + } + } + } +} diff --git a/includes/polling/os/hpblmos.inc.php b/includes/polling/os/hpblmos.inc.php new file mode 100644 index 000000000000..18f34794cc0f --- /dev/null +++ b/includes/polling/os/hpblmos.inc.php @@ -0,0 +1,3 @@ +