mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* split siteboss 530 and 550 into multiple OS * add more sensors to siteboss550 and new Percent sensor * fix contact closure event state values * split os polling for siteboss to siteboss530 and siteboss550 * add test unit for siteboss550, rename test unit for siteboss to siteboss530 * refactor siteboss os polling to \Librenms\OS * implement OSPolling to Sitebos550 * force save in pollOS() to keep custom sysName during polling * updated unit test * update device graphs * remove pollOS and extra save() * siteboss550 no longer extends OSPolling * update siteboss550 test data * update discoverOS() to match recent os discovery changes * styleCI changes * fix siteboss hardware discovery; add check to OS polling if os_group .inc file exists * collapse siteboss to single OS, implement siteboss sensors in advanced discovery * add siteboss unit tests * removed unneeded OS disco defs * styleCI changes * more styleCI changes * split siteboss os to siteboss530 and siteboss550 * split siteboss os to siteboss530 and siteboss550 * move php polling back into yaml * keep original siteboss OS name * resave snmp data for siteboss OS * resave snmp data for siteboss550 OS
84 lines
1.8 KiB
PHP
84 lines
1.8 KiB
PHP
<?php
|
|
|
|
use LibreNMS\Config;
|
|
use LibreNMS\OS;
|
|
|
|
$valid['sensor'] = [];
|
|
|
|
/** @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';
|
|
}
|
|
|
|
if ($device['os_group'] == 'printer') {
|
|
include 'includes/discovery/sensors/state/printer.inc.php';
|
|
}
|
|
|
|
$run_sensors = [
|
|
'airflow',
|
|
'current',
|
|
'charge',
|
|
'dbm',
|
|
'fanspeed',
|
|
'frequency',
|
|
'humidity',
|
|
'load',
|
|
'loss',
|
|
'power',
|
|
'power_consumed',
|
|
'power_factor',
|
|
'runtime',
|
|
'signal',
|
|
'state',
|
|
'count',
|
|
'temperature',
|
|
'voltage',
|
|
'snr',
|
|
'pressure',
|
|
'cooling',
|
|
'delay',
|
|
'quality_factor',
|
|
'chromatic_dispersion',
|
|
'ber',
|
|
'eer',
|
|
'waterflow',
|
|
'percent',
|
|
];
|
|
|
|
// 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
|
|
);
|