mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Mostly useful for debugging DO NOT DELETE THIS TEXT #### Please note > Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting. - [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/) #### Testers If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
72 lines
1.6 KiB
PHP
72 lines
1.6 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';
|
|
}
|
|
|
|
$run_sensors = array(
|
|
'airflow',
|
|
'current',
|
|
'charge',
|
|
'dbm',
|
|
'fanspeed',
|
|
'frequency',
|
|
'humidity',
|
|
'load',
|
|
'power',
|
|
'runtime',
|
|
'signal',
|
|
'state',
|
|
'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
|
|
);
|