detect OpenBSD sensors #2113

Merged
merged 3 commits into from Oct 12, 2015

Projects

None yet

3 participants

@sthen
Contributor
sthen commented Oct 12, 2015

This adds the MIBs for OpenBSD's snmpd, and code to detect sensors exported via OPENBSD-SENSORS-MIB. (The standard kernel supports many sensor types - on-board, USB, onewire, IPMI - and exports via a standard sysctl interface which is picked up by snmpd).

sthen added some commits Oct 12, 2015
@sthen sthen add MIBs for OpenBSD's snmpd 92c2b3a
@sthen sthen detect OpenBSD sensors 2544dfe
@sthen sthen fix descriptions
5edf962
@f0o f0o self-assigned this Oct 12, 2015
@f0o
Member
f0o commented Oct 12, 2015

Could you please split up all the sensors in the existing structures?
/includes/discovery/{current,fanspeeds,frequencies,humidity,power,temperatures,voltages}/__os__.inc.php

@f0o f0o added the Discovery label Oct 12, 2015
@sthen
Contributor
sthen commented Oct 12, 2015

Is that really preferable? I took the same approach as the existing sensors-netscaler.inc.php and entity-sensor.inc.php files, which deal with the same situation (SNMP server exporting a single table of sensors with all different types together).

Looking at existing discovery code from the type-specific subdirectories, these seem to be for devices which has a separate table per sensor type, e.g. lm-sensors has lmTempSensorsDevice and lmFanSensorsDevice, mikrotik has mtxrHlActiveFan, mtxrHlTemperature and mtxrHlVoltage, etc.

If it were split into subdirectories we'd need to loop through the table multiple times, once to pull out temperature sensors, once for voltages, etc. It's possible of course, but seems much less efficient.

@f0o
Member
f0o commented Oct 12, 2015

kk makes sense 👍

Could you just post the link/s to the MIBs here so we have them for the log?

@sthen
Contributor
sthen commented Oct 12, 2015

Certainly - they're mainly distributed as part of OpenBSD, so probably the best link is to the source repo so if they're updated you can pick up newer versions - http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/share/snmp/

@f0o f0o merged commit 91890b4 into librenms:master Oct 12, 2015

2 checks passed

Auto-Deploy Build finished. No test results found.
Details
Scrutinizer No new issues
Details
@sthen
Contributor
sthen commented Oct 12, 2015

nice, thanks :)

@f0o
Member
f0o commented Oct 12, 2015

thank you for contributing :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment