mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Fix some comment and documentation typos. * Fix various entphysical page display issues. - Resolve flickering during loading (missing liClosed for nested items). - Clicking a sensor actually takes you to the matching graph now. * Add a few nicecase() calls to clean up html page display. * Create discover_entity_physical() function - Add discover_entity_physical() function into includes/discovery/functions.inc.php - This allows for an easy implementation of OS-specific entity-physical discovery. - Update includes/discovery/entity-physical/entity-physical.inc.php to use the new function. * Add power_consumed and power_factor sensors. * Two new icons, make more entPhysical data visible. * Pre-commit fix: blank line found at end of control structure. * Add Schleifenbauer OS support. * Now really fix the comment typo. * Fix parsing mistakes. * Add a generic count sensor. * Make the Schleifenbauer discovery use count instead of state sensors. * Don't place count sensor at the top, add sane limits for Schleifenbauer * Finetuning the rrd_options, changing Schleifenbauer sensor names. * Update schleifenbauer.svg * optimize logo too * add test data * fix sensor value display (spaces break it) * update entPhysicalIndex
79 lines
1.8 KiB
PHP
79 lines
1.8 KiB
PHP
<?php
|
|
|
|
use LibreNMS\Config;
|
|
use LibreNMS\Device\YamlDiscovery;
|
|
use LibreNMS\OS;
|
|
|
|
$valid['sensor'] = array();
|
|
|
|
/** @var OS $os */
|
|
$pre_cache = $os->preCache();
|
|
|
|
// Run custom sensors
|
|
require 'includes/discovery/sensors/cisco-entity-sensor.inc.php';
|
|
require 'includes/discovery/sensors/entity-sensor.inc.php';
|
|
require 'includes/discovery/sensors/ipmi.inc.php';
|
|
|
|
if ($device['os'] == 'netscaler') {
|
|
include 'includes/discovery/sensors/netscaler.inc.php';
|
|
}
|
|
|
|
if ($device['os'] == 'openbsd') {
|
|
include 'includes/discovery/sensors/openbsd.inc.php';
|
|
}
|
|
|
|
if (strstr($device['hardware'], 'Dell')) {
|
|
include 'includes/discovery/sensors/fanspeed/dell.inc.php';
|
|
include 'includes/discovery/sensors/power/dell.inc.php';
|
|
include 'includes/discovery/sensors/voltage/dell.inc.php';
|
|
include 'includes/discovery/sensors/state/dell.inc.php';
|
|
include 'includes/discovery/sensors/temperature/dell.inc.php';
|
|
}
|
|
|
|
if (strstr($device['hardware'], 'ProLiant')) {
|
|
include 'includes/discovery/sensors/state/hp.inc.php';
|
|
}
|
|
|
|
if ($device['os'] == 'gw-eydfa') {
|
|
include 'includes/discovery/sensors/gw-eydfa.inc.php';
|
|
}
|
|
|
|
$run_sensors = array(
|
|
'airflow',
|
|
'current',
|
|
'charge',
|
|
'dbm',
|
|
'fanspeed',
|
|
'frequency',
|
|
'humidity',
|
|
'load',
|
|
'power',
|
|
'power_consumed',
|
|
'power_factor',
|
|
'runtime',
|
|
'signal',
|
|
'state',
|
|
'count',
|
|
'temperature',
|
|
'voltage',
|
|
'snr',
|
|
'pressure',
|
|
'cooling',
|
|
'delay',
|
|
'quality_factor',
|
|
'chromatic_dispersion',
|
|
'ber',
|
|
'eer',
|
|
'waterflow',
|
|
);
|
|
|
|
// filter submodules
|
|
$run_sensors = array_intersect($run_sensors, Config::get('discovery_submodules.sensors', $run_sensors));
|
|
|
|
sensors($run_sensors, $device, $valid, $pre_cache);
|
|
unset(
|
|
$pre_cache,
|
|
$run_sensors,
|
|
$entitysensor
|
|
);
|