mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
hopefully doesn't break anything Mostly issues with snmp oids and options containing spaces. Try to remove all of those. 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` After you are done testing, you can remove the changes with `./scripts/github-remove`. If there are schema changes, you can ask on discord how to revert.
21 lines
981 B
PHP
21 lines
981 B
PHP
<?php
|
|
|
|
// FIXME: EMD "stack" support
|
|
// FIXME: What to do with IPOMANII-MIB::ipmEnvEmdConfigHumiOffset.0 ?
|
|
echo ' IPOMANII-MIB ';
|
|
$emd_installed = snmp_get($device, 'IPOMANII-MIB::ipmEnvEmdStatusEmdType.0', '-Oqv');
|
|
|
|
if ($emd_installed == 'eMD-HT') {
|
|
$descr = snmp_get($device, 'IPOMANII-MIB::ipmEnvEmdConfigHumiName.0', '-Oqv');
|
|
$current = (snmp_get($device, 'IPOMANII-MIB::ipmEnvEmdStatusHumidity.0', '-Oqv') / 10);
|
|
$high_limit = snmp_get($device, 'IPOMANII-MIB::ipmEnvEmdConfigHumiHighSetPoint.0', '-Oqv');
|
|
$low_limit = snmp_get($device, 'IPOMANII-MIB::ipmEnvEmdConfigHumiLowSetPoint.0', '-Oqv');
|
|
|
|
if ($descr != '' && is_numeric($current) && $current > '0') {
|
|
$current_oid = '.1.3.6.1.4.1.2468.1.4.2.1.5.1.1.3.0';
|
|
$descr = trim(str_replace('"', '', $descr));
|
|
|
|
discover_sensor($valid['sensor'], 'humidity', $device, $current_oid, '1', 'ipoman', $descr, '10', '1', $low_limit, null, null, $high_limit, $current);
|
|
}
|
|
}
|