Files
librenms-librenms/includes/discovery/sensors/pre-cache/schleifenbauer.inc.php
Martijn Schmidt e0da083f5c New OS: Schleifenbauer, entity-physical improvements, various html page fixes (#9471)
* 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
2019-01-20 12:24:11 -06:00

39 lines
1.8 KiB
PHP

<?php
/*
* LibreNMS
*
* Copyright (c) 2018 Martijn Schmidt <martijn.schmidt@gmail.com>
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
echo 'sdbMgmtCtrlDevUnitAddress ';
$pre_cache['sdbMgmtCtrlDevUnitAddress'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.1.2.4.1.2', 1));
echo 'sdbDevIdSerialNumber ';
$pre_cache['sdbDevIdSerialNumber'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.1.1.1.6', 1));
echo 'sdbDevInActualVoltage ';
$pre_cache['sdbDevInActualVoltage'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.6.1.1.7', 2));
echo 'sdbDevInActualCurrent ';
$pre_cache['sdbDevInActualCurrent'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.6.1.1.5', 2));
echo 'sdbDevInMaxAmps ';
$pre_cache['sdbDevInMaxAmps'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.6.1.1.11', 2));
echo 'sdbDevCfMaximumLoad ';
$pre_cache['sdbDevCfMaximumLoad'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.2.1.1.6', 1));
echo 'sdbDevInPowerVoltAmpere ';
$pre_cache['sdbDevInPowerVoltAmpere'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.6.1.1.9', 2));
echo 'sdbDevInKWhTotal ';
$pre_cache['sdbDevInKWhTotal'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.6.1.1.2', 2));
echo 'sdbDevInPowerFactor ';
$pre_cache['sdbDevInPowerFactor'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.6.1.1.4', 2));