Fix NetAgent II battery voltage (#10427)

* Fix NetAgent II battery voltage

* Add new test data and new icon for NetAgent
This commit is contained in:
CirnoT 2019-07-23 06:34:31 +02:00 committed by Tony Murray
parent c0c3ad296b
commit cafcf417fa
5 changed files with 1902 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -44,7 +44,7 @@
$bat_1phase_warnlimit = 28;
$bat_1phase_lowlimit = 10;
$bat_1phase_lowwarnlimit = 18;
$bat_1phase_divisor = 1;
$bat_1phase_divisor = 10;
# UPS 3 phase battery system values
$bat_3phase_limit = 270; // Remember to check correct values
@ -389,8 +389,8 @@ if ($out_phaseNum == '3') {
// BATTERY Voltage
# Set divisor and limit ranges 1 phase UPS systems
if ($in_phaseNum == '1') {
$battery_voltage_oid = '.1.3.6.1.4.1.935.1.1.1.2.2.2.0';
$battery_voltage1 = snmp_get($device, $battery_voltage_oid, '-Oqv');
$battery_voltage1_oid = '.1.3.6.1.4.1.935.1.1.1.2.2.2.0';
$battery_voltage1 = snmp_get($device, $battery_voltage1_oid, '-Oqv');
$limit = $bat_1phase_limit;
$warnlimit = $bat_1phase_warnlimit;
$lowlimit = $bat_1phase_lowlimit;

View File

@ -10,11 +10,11 @@
"version": null,
"hardware": null,
"features": null,
"location": null,
"os": "netagent2",
"type": "power",
"serial": null,
"icon": "generic.svg"
"icon": "netagent2.png",
"location": null
}
]
},
@ -28,11 +28,11 @@
"version": null,
"hardware": null,
"features": null,
"location": "<private>",
"os": "netagent2",
"type": "power",
"serial": null,
"icon": "generic.svg"
"icon": "netagent2.png",
"location": "<private>"
}
]
}

1660
tests/data/netagent2_1.json Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,235 @@
1.3.6.1.2.1.1.1.0|4|<private>
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.935.1.1.1
1.3.6.1.2.1.1.3.0|67|14396721
1.3.6.1.2.1.1.4.0|4|<private>
1.3.6.1.2.1.1.5.0|4|<private>
1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0.0.0
1.3.6.1.2.1.4.20.1.3.192.168.2.97|64|255.255.255.0
1.3.6.1.2.1.4.22.1.2.2.192.168.2.111|4x|<private>
1.3.6.1.2.1.4.22.1.2.2.192.168.2.121|4x|<private>
1.3.6.1.2.1.4.31.1.1.3.1|65|132807
1.3.6.1.2.1.4.31.1.1.3.2|65|19
1.3.6.1.2.1.4.31.1.1.4.1|70|132807
1.3.6.1.2.1.4.31.1.1.4.2|70|19
1.3.6.1.2.1.4.31.1.1.6.1|70|0
1.3.6.1.2.1.4.31.1.1.6.2|70|0
1.3.6.1.2.1.4.31.1.1.7.1|65|0
1.3.6.1.2.1.4.31.1.1.7.2|65|0
1.3.6.1.2.1.4.31.1.1.9.1|65|0
1.3.6.1.2.1.4.31.1.1.9.2|65|0
1.3.6.1.2.1.4.31.1.1.10.1|65|0
1.3.6.1.2.1.4.31.1.1.10.2|65|0
1.3.6.1.2.1.4.31.1.1.12.1|65|0
1.3.6.1.2.1.4.31.1.1.12.2|65|0
1.3.6.1.2.1.4.31.1.1.13.1|70|0
1.3.6.1.2.1.4.31.1.1.13.2|70|0
1.3.6.1.2.1.4.31.1.1.14.1|65|0
1.3.6.1.2.1.4.31.1.1.14.2|65|0
1.3.6.1.2.1.4.31.1.1.15.1|65|0
1.3.6.1.2.1.4.31.1.1.15.2|65|0
1.3.6.1.2.1.4.31.1.1.16.1|65|0
1.3.6.1.2.1.4.31.1.1.16.2|65|0
1.3.6.1.2.1.4.31.1.1.17.1|65|0
1.3.6.1.2.1.4.31.1.1.17.2|65|0
1.3.6.1.2.1.4.31.1.1.18.1|65|127822
1.3.6.1.2.1.4.31.1.1.18.2|65|19
1.3.6.1.2.1.4.31.1.1.19.1|70|127822
1.3.6.1.2.1.4.31.1.1.19.2|70|19
1.3.6.1.2.1.4.31.1.1.20.1|65|138662
1.3.6.1.2.1.4.31.1.1.20.2|65|29
1.3.6.1.2.1.4.31.1.1.21.1|70|138662
1.3.6.1.2.1.4.31.1.1.21.2|70|29
1.3.6.1.2.1.4.31.1.1.22.1|65|0
1.3.6.1.2.1.4.31.1.1.22.2|65|40
1.3.6.1.2.1.4.31.1.1.24.1|70|0
1.3.6.1.2.1.4.31.1.1.24.2|70|0
1.3.6.1.2.1.4.31.1.1.25.1|65|0
1.3.6.1.2.1.4.31.1.1.25.2|65|5
1.3.6.1.2.1.4.31.1.1.28.1|65|0
1.3.6.1.2.1.4.31.1.1.28.2|65|0
1.3.6.1.2.1.4.31.1.1.29.1|65|0
1.3.6.1.2.1.4.31.1.1.29.2|65|0
1.3.6.1.2.1.4.31.1.1.46.1|67|0
1.3.6.1.2.1.4.31.1.1.46.2|67|0
1.3.6.1.2.1.4.31.1.1.47.1|66|30000
1.3.6.1.2.1.4.31.1.1.47.2|66|30000
1.3.6.1.2.1.4.34.1.3.2.16.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1|2|1
1.3.6.1.2.1.4.34.1.3.2.16.254.128.0.0.0.0.0.0.2.3.234.255.254.20.188.251|2|2
1.3.6.1.2.1.4.34.1.5.2.16.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1|6|1.3.6.1.2.1.4.32.1.5.1.2.16.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.128
1.3.6.1.2.1.4.34.1.5.2.16.254.128.0.0.0.0.0.0.2.3.234.255.254.20.188.251|6|1.3.6.1.2.1.4.32.1.5.2.2.16.254.128.0.0.0.0.0.0.0.0.0.0.0.0.0.0.64
1.3.6.1.2.1.4.34.1.6.2.16.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1|2|2
1.3.6.1.2.1.4.34.1.6.2.16.254.128.0.0.0.0.0.0.2.3.234.255.254.20.188.251|2|5
1.3.6.1.2.1.4.35.1.4.2.1.4.192.168.2.111|4x|<private>
1.3.6.1.2.1.4.35.1.4.2.1.4.192.168.2.121|4x|<private>
1.3.6.1.2.1.5.1.0|65|10053
1.3.6.1.2.1.5.2.0|65|0
1.3.6.1.2.1.5.3.0|65|3
1.3.6.1.2.1.5.4.0|65|0
1.3.6.1.2.1.5.5.0|65|0
1.3.6.1.2.1.5.6.0|65|0
1.3.6.1.2.1.5.7.0|65|0
1.3.6.1.2.1.5.8.0|65|9971
1.3.6.1.2.1.5.9.0|65|79
1.3.6.1.2.1.5.10.0|65|0
1.3.6.1.2.1.5.11.0|65|0
1.3.6.1.2.1.5.12.0|65|0
1.3.6.1.2.1.5.13.0|65|0
1.3.6.1.2.1.5.14.0|65|10054
1.3.6.1.2.1.5.15.0|65|0
1.3.6.1.2.1.5.16.0|65|3
1.3.6.1.2.1.5.17.0|65|0
1.3.6.1.2.1.5.18.0|65|0
1.3.6.1.2.1.5.19.0|65|0
1.3.6.1.2.1.5.20.0|65|0
1.3.6.1.2.1.5.21.0|65|80
1.3.6.1.2.1.5.22.0|65|9971
1.3.6.1.2.1.5.23.0|65|0
1.3.6.1.2.1.5.24.0|65|0
1.3.6.1.2.1.5.25.0|65|0
1.3.6.1.2.1.5.26.0|65|0
1.3.6.1.2.1.6.14.0|65|0
1.3.6.1.2.1.6.15.0|65|36
1.3.6.1.2.1.7.5.1.1.0.0.0.0.137|64|0.0.0.0
1.3.6.1.2.1.11.1.0|65|79554
1.3.6.1.2.1.11.2.0|65|79553
1.3.6.1.2.1.11.3.0|65|0
1.3.6.1.2.1.11.4.0|65|0
1.3.6.1.2.1.11.5.0|65|0
1.3.6.1.2.1.11.6.0|65|0
1.3.6.1.2.1.11.8.0|65|0
1.3.6.1.2.1.11.9.0|65|0
1.3.6.1.2.1.11.10.0|65|0
1.3.6.1.2.1.11.11.0|65|0
1.3.6.1.2.1.11.12.0|65|0
1.3.6.1.2.1.11.13.0|65|246286
1.3.6.1.2.1.11.14.0|65|0
1.3.6.1.2.1.11.15.0|65|61812
1.3.6.1.2.1.11.16.0|65|1912
1.3.6.1.2.1.11.17.0|65|0
1.3.6.1.2.1.11.18.0|65|0
1.3.6.1.2.1.11.19.0|65|0
1.3.6.1.2.1.11.20.0|65|0
1.3.6.1.2.1.11.21.0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