mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 23:54:18 +02:00
enh(ups-apc-snmp): improve last time in battery status + fix dereference in script.pm (#5524 + #5412)
- Update the output for the "replace last time" for the battery status mode : it was displayed in seconds, it is now converted to a human readable format. Refs: CTOR-1077 - $rebuild_args needs to be dereferenced when used in a join because it is a reference to an array. This is done when the script is executed with a non-root user (line 359) but not when called with root. Authored by eseyman@users.noreply.github.com #5412
This commit is contained in:
parent
75873668bf
commit
b5c5fb4b61
@ -353,7 +353,7 @@ sub check_relaunch {
|
|||||||
}
|
}
|
||||||
if ($uid != $>) {
|
if ($uid != $>) {
|
||||||
if ($> == 0) {
|
if ($> == 0) {
|
||||||
unshift @$args, '-s', '/bin/bash', '-l', $self->{runas}, '-c', join(' ', $cmd, $rebuild_args);
|
unshift @$args, '-s', '/bin/bash', '-l', $self->{runas}, '-c', join(' ', $cmd, @$rebuild_args);
|
||||||
$cmd = 'su';
|
$cmd = 'su';
|
||||||
} else {
|
} else {
|
||||||
unshift @$args, '-S', '-u', $self->{runas}, $cmd, @$rebuild_args;
|
unshift @$args, '-S', '-u', $self->{runas}, $cmd, @$rebuild_args;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
# Copyright 2025 Centreon (http://www.centreon.com/)
|
||||||
#
|
#
|
||||||
# Centreon is a full-fledged industry-strength solution that meets
|
# Centreon is a full-fledged industry-strength solution that meets
|
||||||
# the needs in IT infrastructure and application monitoring for
|
# the needs in IT infrastructure and application monitoring for
|
||||||
@ -48,6 +48,15 @@ sub custom_status_calc {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub custom_last_replace_output {
|
||||||
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
|
return sprintf(
|
||||||
|
'replace last time: %s',
|
||||||
|
centreon::plugins::misc::change_seconds(value => $self->{result_values}->{last_replace_time})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
sub custom_status_output {
|
sub custom_status_output {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
@ -111,7 +120,11 @@ sub set_counters {
|
|||||||
key_values => [ { name => 'upsAdvBatteryCapacity' } ],
|
key_values => [ { name => 'upsAdvBatteryCapacity' } ],
|
||||||
output_template => 'remaining capacity: %s %%',
|
output_template => 'remaining capacity: %s %%',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'load', template => '%s', min => 0, max => 100, unit => '%' }
|
{ label => 'load',
|
||||||
|
template => '%s',
|
||||||
|
min => 0,
|
||||||
|
max => 100,
|
||||||
|
unit => '%' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -119,7 +132,10 @@ sub set_counters {
|
|||||||
key_values => [ { name => 'upsAdvBatteryRunTimeRemaining' } ],
|
key_values => [ { name => 'upsAdvBatteryRunTimeRemaining' } ],
|
||||||
output_template => 'remaining time: %.2f minutes',
|
output_template => 'remaining time: %.2f minutes',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'load_time', template => '%.2f', min => 0, unit => 'm' }
|
{ label => 'load_time',
|
||||||
|
template => '%.2f',
|
||||||
|
min => 0,
|
||||||
|
unit => 'm' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -127,7 +143,10 @@ sub set_counters {
|
|||||||
key_values => [ { name => 'upsBasicBatteryTimeOnBattery' } ],
|
key_values => [ { name => 'upsBasicBatteryTimeOnBattery' } ],
|
||||||
output_template => 'time on battery: %.2f minutes',
|
output_template => 'time on battery: %.2f minutes',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'timeon', template => '%.2f', min => 0, unit => 'm' }
|
{ label => 'timeon',
|
||||||
|
template => '%.2f',
|
||||||
|
min => 0,
|
||||||
|
unit => 'm' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -135,7 +154,10 @@ sub set_counters {
|
|||||||
key_values => [ { name => 'upsAdvBatteryCurrent' } ],
|
key_values => [ { name => 'upsAdvBatteryCurrent' } ],
|
||||||
output_template => 'current: %s A',
|
output_template => 'current: %s A',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'current', template => '%s', min => 0, unit => 'A' }
|
{ label => 'current',
|
||||||
|
template => '%s',
|
||||||
|
min => 0,
|
||||||
|
unit => 'A' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -143,7 +165,9 @@ sub set_counters {
|
|||||||
key_values => [ { name => 'upsAdvBatteryActualVoltage' } ],
|
key_values => [ { name => 'upsAdvBatteryActualVoltage' } ],
|
||||||
output_template => 'voltage: %s V',
|
output_template => 'voltage: %s V',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'voltage', template => '%s', unit => 'V' }
|
{ label => 'voltage',
|
||||||
|
template => '%s',
|
||||||
|
unit => 'V' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -151,15 +175,19 @@ sub set_counters {
|
|||||||
key_values => [ { name => 'upsAdvBatteryTemperature' } ],
|
key_values => [ { name => 'upsAdvBatteryTemperature' } ],
|
||||||
output_template => 'temperature: %s C',
|
output_template => 'temperature: %s C',
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'temperature', template => '%s', unit => 'C'}
|
{ label => 'temperature',
|
||||||
|
template => '%s',
|
||||||
|
unit => 'C' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ label => 'replace-lasttime', nlabel => 'battery.replace.lasttime.seconds', display_ok => 0, set => {
|
{ label => 'replace-lasttime', nlabel => 'battery.replace.lasttime.seconds', display_ok => 0, set => {
|
||||||
key_values => [ { name => 'last_replace_time' } ],
|
key_values => [ { name => 'last_replace_time' } ],
|
||||||
output_template => 'replace last time: %s s',
|
closure_custom_output => $self->can('custom_last_replace_output'),
|
||||||
perfdatas => [
|
perfdatas => [
|
||||||
{ label => 'replace_last_time', template => '%s', unit => 's'}
|
{ label => 'replace_last_time',
|
||||||
|
template => '%s',
|
||||||
|
unit => 's' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -360,62 +388,112 @@ Check battery status and battery charge remaining.
|
|||||||
=item B<--filter-counters>
|
=item B<--filter-counters>
|
||||||
|
|
||||||
Only display some counters (regexp can be used).
|
Only display some counters (regexp can be used).
|
||||||
Example: --filter-counters='^status|load$'
|
Example: C<--filter-counters='^status|load$'>
|
||||||
|
|
||||||
=item B<--replace-lasttime-format>
|
=item B<--replace-lasttime-format>
|
||||||
|
|
||||||
Define the date format (default: '%m/%d/%Y').
|
Define the date format (default: C<%m/%d/%Y>).
|
||||||
|
|
||||||
=item B<--unknown-status>
|
=item B<--unknown-status>
|
||||||
|
|
||||||
Define the conditions to match for the status to be UNKNOWN (default: '%{status} =~ /unknown/i').
|
Define the conditions to match for the status to be UNKNOWN (default: C<%{status} =~ /unknown/i>).
|
||||||
You can use the following variables: %{status}, %{replace}
|
You can use the following variables: %{status}, %{replace}
|
||||||
|
|
||||||
=item B<--warning-status>
|
=item B<--warning-status>
|
||||||
|
|
||||||
Define the conditions to match for the status to be WARNING (default: '%{status} =~ /batteryLow/i').
|
Define the conditions to match for the status to be WARNING (default: C<%{status} =~ /batteryLow/i>).
|
||||||
You can use the following variables: %{status}, %{replace}
|
You can use the following variables: C<%{status}>, C<%{replace}>
|
||||||
|
|
||||||
=item B<--critical-status>
|
=item B<--critical-status>
|
||||||
|
|
||||||
Define the conditions to match for the status to be CRITICAL (default: '%{replace} =~ /yes/i').
|
Define the conditions to match for the status to be CRITICAL (default: C<%{replace} =~ /yes/i>).
|
||||||
You can use the following variables: %{status}, %{replace}
|
You can use the following variables: C<%{status}>, C<%{replace}>
|
||||||
|
|
||||||
=item B<--unknown-battery-pack-status>
|
=item B<--unknown-battery-pack-status>
|
||||||
|
|
||||||
Define the conditions to match for the status to be UNKNOWN.
|
Define the conditions to match for the status to be UNKNOWN.
|
||||||
You can use the following variables: %{status}
|
You can use the following variables: C<%{status}>
|
||||||
|
|
||||||
=item B<--warning-battery-pack-status>
|
=item B<--warning-battery-pack-status>
|
||||||
|
|
||||||
Define the conditions to match for the status to be WARNING.
|
Define the conditions to match for the status to be WARNING.
|
||||||
You can use the following variables: %{status}
|
You can use the following variables: C<%{status}>
|
||||||
|
|
||||||
=item B<--critical-battery-pack-status>
|
=item B<--critical-battery-pack-status>
|
||||||
|
|
||||||
Define the conditions to match for the status to be CRITICAL (default: '%{status} ne "OK"').
|
Define the conditions to match for the status to be CRITICAL (default: C<%{status} ne "OK">).
|
||||||
You can use the following variables: %{status}
|
You can use the following variables: C<%{status}>
|
||||||
|
|
||||||
=item B<--unknown-cartridge-status>
|
=item B<--unknown-cartridge-status>
|
||||||
|
|
||||||
Define the conditions to match for the status to be UNKNOWN.
|
Define the conditions to match for the status to be UNKNOWN.
|
||||||
You can use the following variables: %{status}
|
You can use the following variables: C<%{status}>
|
||||||
|
|
||||||
=item B<--warning-cartridge-status>
|
=item B<--warning-cartridge-status>
|
||||||
|
|
||||||
Define the conditions to match for the status to be WARNING.
|
Define the conditions to match for the status to be WARNING.
|
||||||
You can use the following variables: %{status}
|
You can use the following variables: C<%{status}>
|
||||||
|
|
||||||
=item B<--critical-cartridge-status>
|
=item B<--critical-cartridge-status>
|
||||||
|
|
||||||
Define the conditions to match for the status to be CRITICAL (default: '%{status} ne "OK"').
|
Define the conditions to match for the status to be CRITICAL (default: C<%{status} ne "OK">).
|
||||||
You can use the following variables: %{status}
|
You can use the following variables: C<%{status}>
|
||||||
|
|
||||||
=item B<--warning-*> B<--critical-*>
|
=item B<--warning-load>
|
||||||
|
|
||||||
Thresholds.
|
Warning threshold for battery load (in %).
|
||||||
Can be: 'load', 'voltage', 'current',
|
|
||||||
'temperature', 'time', 'replace-lasttime', 'timeon'.
|
=item B<--critical-load>
|
||||||
|
|
||||||
|
Critical threshold for battery load (in %).
|
||||||
|
|
||||||
|
=item B<--warning-voltage>
|
||||||
|
|
||||||
|
Warning threshold for battery voltage (in V).
|
||||||
|
|
||||||
|
=item B<--critical-voltage>
|
||||||
|
|
||||||
|
Critical threshold for battery voltage (in V).
|
||||||
|
|
||||||
|
=item B<--warning-current>
|
||||||
|
|
||||||
|
Warning threshold for battery current (in A).
|
||||||
|
|
||||||
|
=item B<--critical-current>
|
||||||
|
|
||||||
|
Critical threshold for battery current (in A).
|
||||||
|
|
||||||
|
=item B<--warning-temperature>
|
||||||
|
|
||||||
|
Warning threshold for battery temperature (in C).
|
||||||
|
|
||||||
|
=item B<--critical-temperature>
|
||||||
|
|
||||||
|
Critical threshold for battery temperature (in C).
|
||||||
|
|
||||||
|
=item B<--warning-time>
|
||||||
|
|
||||||
|
Warning threshold for battery remaining time (in minutes).
|
||||||
|
|
||||||
|
=item B<--critical-time>
|
||||||
|
|
||||||
|
Critical threshold for battery remaining time (in minutes).
|
||||||
|
|
||||||
|
=item B<--warning-replace-lasttime>
|
||||||
|
|
||||||
|
Warning threshold for battery last replace time (in seconds).
|
||||||
|
|
||||||
|
=item B<--critical-replace-lasttime>
|
||||||
|
|
||||||
|
Critical threshold for battery last replace time (in seconds).
|
||||||
|
|
||||||
|
=item B<--warning-timeon>
|
||||||
|
|
||||||
|
Warning threshold for time on battery (in minutes).
|
||||||
|
|
||||||
|
=item B<--critical-timeon>
|
||||||
|
|
||||||
|
Critical threshold for time on battery (in minutes).
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
|
57
tests/hardware/ups/apc/snmp/battery-status.robot
Normal file
57
tests/hardware/ups/apc/snmp/battery-status.robot
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
*** Settings ***
|
||||||
|
Documentation Check battery status
|
||||||
|
|
||||||
|
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}resources/import.resource
|
||||||
|
|
||||||
|
Suite Setup Ctn Generic Suite Setup
|
||||||
|
Test Timeout 120s
|
||||||
|
|
||||||
|
|
||||||
|
*** Variables ***
|
||||||
|
${CMD} ${CENTREON_PLUGINS}
|
||||||
|
... --plugin=hardware::ups::apc::snmp::plugin
|
||||||
|
... --mode=battery-status
|
||||||
|
... --hostname=${HOSTNAME}
|
||||||
|
... --snmp-version=${SNMPVERSION}
|
||||||
|
... --snmp-port=${SNMPPORT}
|
||||||
|
... --snmp-timeout=1
|
||||||
|
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
battery status ${tc}
|
||||||
|
[Tags] hardware ups apc
|
||||||
|
${command} Catenate
|
||||||
|
... ${CMD}
|
||||||
|
... --snmp-community=hardware/ups/apc/snmp/ups-apc-battery-ok
|
||||||
|
... ${extra_options}
|
||||||
|
|
||||||
|
Ctn Run Command And Check Result As Regexp ${command} ${expected_regexp}
|
||||||
|
|
||||||
|
Examples: tc extra_options expected_regexp --
|
||||||
|
... 1 ${EMPTY} ^OK: battery status is 'batteryNormal' \\\\[battery needs replace: no\\\\] \\\\[last replace date: 10-05-2022\\\\], remaining capacity: 100 %, remaining time: 665.00 minutes, time on battery: 205761.00 minutes, voltage: 110 V, temperature: 23 C - All battery packs are ok \\\\| 'battery.charge.remaining.percent'=100%;;;0;100 'battery.charge.remaining.minutes'=665.00m;;;0; 'battery.timeon.minutes'=205761.00m;;;0; 'battery.voltage.volt'=110V;;;; 'battery.temperature.celsius'=23C;;;;
|
||||||
|
... 2 --replace-lasttime-format='%d-%m-%Y' ^OK: battery status is 'batteryNormal' \\\\[battery needs replace: no\\\\] \\\\[last replace date: 10-05-2022\\\\], remaining capacity: 100 %, remaining time: 665.00 minutes, time on battery: 205761.00 minutes, voltage: 110 V, temperature: 23 C - All battery packs are ok \\\\| 'battery.charge.remaining.percent'=100%;;;0;100 'battery.charge.remaining.minutes'=665.00m;;;0; 'battery.timeon.minutes'=205761.00m;;;0; 'battery.voltage.volt'=110V;;;; 'battery.temperature.celsius'=23C;;;; 'battery.replace.lasttime.seconds'=\\\\d*s;;;;
|
||||||
|
... 3 --replace-lasttime-format='%d-%m-%Y' --warning-replace-lasttime=2 ^WARNING: replace last time: (\\\\d+y )?(\\\\d+M )?(\\\\d+w )?(\\\\d+d )?(\\\\d+h )?(\\\\d+m )?(\\\\d+s )?\\\\| 'battery.charge.remaining.percent'=100%;;;0;100 'battery.charge.remaining.minutes'=665.00m;;;0; 'battery.timeon.minutes'=205761.00m;;;0; 'battery.voltage.volt'=110V;;;; 'battery.temperature.celsius'=23C;;;; 'battery.replace.lasttime.seconds'=\\\\d*s;0:2;;;$
|
||||||
|
... 4 --replace-lasttime-format='%d-%m-%Y' --critical-replace-lasttime=2 ^CRITICAL: replace last time: (\\\\d+y )?(\\\\d+M )?(\\\\d+w )?(\\\\d+d )?(\\\\d+h )?(\\\\d+m )?(\\\\d+s )?\\\\| 'battery.charge.remaining.percent'=100%;;;0;100 'battery.charge.remaining.minutes'=665.00m;;;0; 'battery.timeon.minutes'=205761.00m;;;0; 'battery.voltage.volt'=110V;;;; 'battery.temperature.celsius'=23C;;;; 'battery.replace.lasttime.seconds'=\\\\d*s;;0:2;;$
|
||||||
|
|
||||||
|
*** Test Cases ***
|
||||||
|
battery low status ${tc}
|
||||||
|
[Tags] hardware ups apc
|
||||||
|
${command} Catenate
|
||||||
|
... ${CMD}
|
||||||
|
... --snmp-community=hardware/ups/apc/snmp/ups-apc-battery-low
|
||||||
|
... --warning-status='${warning_status}'
|
||||||
|
... --critical-status='${critical_status}'
|
||||||
|
... --critical-battery-pack-status='${critical_battery_pack_status}'
|
||||||
|
... --critical-cartridge-status='${critical_cartridge_status}'
|
||||||
|
... ${extra_options}
|
||||||
|
|
||||||
|
Ctn Run Command And Check Result As Regexp ${command} ${expected_regexp}
|
||||||
|
|
||||||
|
Examples: tc warning_status critical_status critical_battery_pack_status critical_cartridge_status extra_options expected_regexp --
|
||||||
|
... 1 \\\%{status} =~ /batteryLow/i \\\%{replace} =~ /yes/i \\\%{status} ne "OK" \\\%{status} ne "OK" ${EMPTY} ^CRITICAL: battery status is 'batteryLow' \\\\[battery needs replace: yes\\\\] \\\\[last replace date: 10/05/2022\\\\] - battery pack '1' status is 'needsReplacement' - cartridge '1' status is 'needsReplacement' - cartridge '2' status is 'needsReplacement' - battery pack '2' status is 'needsReplacement' \\\\| 'battery.charge.remaining.percent'=75%;;;0;100 'battery.charge.remaining.minutes'=665.00m;;;0; 'battery.timeon.minutes'=390946.00m;;;0; 'battery.voltage.volt'=110V;;;; 'battery.temperature.celsius'=23C;;;; 'battery.replace.lasttime.seconds'=\\\\d*s;;;;$
|
||||||
|
... 2 \\\%{status} =~ /batteryLow/i ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} ^WARNING: battery status is 'batteryLow' \\\\[battery needs replace: yes\\\\] \\\\[last replace date: 10/05/2022\\\\] \\\\| 'battery.charge.remaining.percent'=75%;;;0;100 'battery.charge.remaining.minutes'=665.00m;;;0; 'battery.timeon.minutes'=390946.00m;;;0; 'battery.voltage.volt'=110V;;;; 'battery.temperature.celsius'=23C;;;; 'battery.replace.lasttime.seconds'=\\\\d*s;;;;$
|
||||||
|
... 3 ${EMPTY} \\\%{replace} =~ /yes/i ${EMPTY} ${EMPTY} ${EMPTY} ^CRITICAL: battery status is 'batteryLow' \\\\[battery needs replace: yes\\\\] \\\\[last replace date: 10/05/2022\\\\] \\\\| 'battery.charge.remaining.percent'=75%;;;0;100 'battery.charge.remaining.minutes'=665.00m;;;0; 'battery.timeon.minutes'=390946.00m;;;0; 'battery.voltage.volt'=110V;;;; 'battery.temperature.celsius'=23C;;;; 'battery.replace.lasttime.seconds'=\\\\d*s;;;;$
|
||||||
|
... 4 ${EMPTY} ${EMPTY} \\\%{status} ne "OK" ${EMPTY} ${EMPTY} ^CRITICAL: battery pack '1' status is 'needsReplacement' - battery pack '2' status is 'needsReplacement' \\\\| 'battery.charge.remaining.percent'=75%;;;0;100 'battery.charge.remaining.minutes'=665.00m;;;0; 'battery.timeon.minutes'=390946.00m;;;0; 'battery.voltage.volt'=110V;;;; 'battery.temperature.celsius'=23C;;;; 'battery.replace.lasttime.seconds'=\\\\d*s;;;;$
|
||||||
|
... 5 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} --warning-battery-pack-status='\\\%{status} ne "OK"' ^WARNING: battery pack '1' status is 'needsReplacement' - battery pack '2' status is 'needsReplacement' \\\\| 'battery.charge.remaining.percent'=75%;;;0;100 'battery.charge.remaining.minutes'=665.00m;;;0; 'battery.timeon.minutes'=390946.00m;;;0; 'battery.voltage.volt'=110V;;;; 'battery.temperature.celsius'=23C;;;; 'battery.replace.lasttime.seconds'=\\\\d*s;;;;$
|
||||||
|
... 6 ${EMPTY} ${EMPTY} ${EMPTY} \\\%{status} ne "OK" ${EMPTY} ^CRITICAL: battery pack '1' cartridge '1' status is 'needsReplacement' - cartridge '2' status is 'needsReplacement' \\\\| 'battery.charge.remaining.percent'=75%;;;0;100 'battery.charge.remaining.minutes'=665.00m;;;0; 'battery.timeon.minutes'=390946.00m;;;0; 'battery.voltage.volt'=110V;;;; 'battery.temperature.celsius'=23C;;;; 'battery.replace.lasttime.seconds'=\\\\d*s;;;;$
|
||||||
|
... 7 ${EMPTY} ${EMPTY} ${EMPTY} ${EMPTY} --warning-cartridge-status='\\\%{status} ne "OK"' ^WARNING: battery pack '1' cartridge '1' status is 'needsReplacement' - cartridge '2' status is 'needsReplacement' \\\\| 'battery.charge.remaining.percent'=75%;;;0;100 'battery.charge.remaining.minutes'=665.00m;;;0; 'battery.timeon.minutes'=390946.00m;;;0; 'battery.voltage.volt'=110V;;;; 'battery.temperature.celsius'=23C;;;; 'battery.replace.lasttime.seconds'=\\\\d*s;;;;$
|
95
tests/hardware/ups/apc/snmp/ups-apc-battery-low.snmpwalk
Normal file
95
tests/hardware/ups/apc/snmp/ups-apc-battery-low.snmpwalk
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
.1.3.6.1.4.1.318.1.1.1.2.1.1.0 = INTEGER: 3
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.1.2.0 = 2345678901
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.1.3.0 = STRING: "10/05/2022"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.2.1.0 = Gauge32: 75
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.2.2.0 = Gauge32: 23
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.2.3.0 = 3992500
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.2.4.0 = INTEGER: 2
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.2.5.0 = INTEGER: 4
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.2.8.0 = INTEGER: 110
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.2.19.0 = STRING: Anonymized 198
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.2.20.0 = STRING: Anonymized 057
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.2.21.0 = STRING: Anonymized 150
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.1.1.1 = STRING: "0010000000000000"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.1.1.2 = STRING: "0010000000000000"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.2.1.1 = STRING: "0000000000000000"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.2.1.2 = STRING: "0000000000000000"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.3.1.1 = STRING: "0000000000000000"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.3.1.2 = STRING: "0000000000000000"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.4.1.1 = STRING: "0000000000000000"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.4.1.2 = STRING: "0000000000000000"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.5.1.1 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.5.1.2 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.6.1.1 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.6.1.2 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.7.1.1 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.7.1.2 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.8.1.1 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.8.1.2 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.9.1.1 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.9.1.2 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.10.1.1 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.10.1.2 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.11.1.1 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.11.1.2 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.4.1.5.1.1 = STRING: "0010000000000000"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.4.1.5.2.1 = STRING: "0010000000000000"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.4.1.5.3.1 = STRING: "0000000000000000"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.4.1.5.4.1 = STRING: "0000000000000000"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.4.1.5.5.1 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.4.1.5.6.1 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.4.1.5.7.1 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.4.1.5.8.1 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.3.2.1.0 = Gauge32: 234
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.3.2.4.0 = Gauge32: 50
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.3.2.5.0 = INTEGER: 9
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.3.3.1.0 = Gauge32: 2341
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.3.3.4.0 = Gauge32: 500
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.4.1.1.0 = INTEGER: 2
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.4.2.1.0 = Gauge32: 220
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.4.2.2.0 = Gauge32: 50
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.4.2.3.0 = Gauge32: 10
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.4.2.4.0 = Gauge32: 1
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.4.3.1.0 = Gauge32: 2200
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.4.3.2.0 = Gauge32: 500
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.4.3.3.0 = Gauge32: 97
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.4.3.4.0 = Gauge32: 13
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.5.2.2.0 = INTEGER: 245
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.5.2.3.0 = INTEGER: 198
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.5.2.20.0 = INTEGER: 1
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.5.2.21.0 = INTEGER: 0
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.5.2.22.0 = INTEGER: -1
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.5.2.23.0 = INTEGER: -1
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.5.2.24.0 = INTEGER: 1
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.5.2.26.0 = INTEGER: 1
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.5.2.27.0 = INTEGER: 1
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.5.2.28.0 = INTEGER: 0
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.5.2.30.0 = 15000
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.5.2.31.0 = INTEGER: 2
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.1.1 = INTEGER: 1
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.2.1 = STRING: Anonymized 133
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.3.1 = INTEGER: 2
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.4.1 = INTEGER: 18
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.5.1 = INTEGER: 1
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.6.1 = INTEGER: 37
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.7.1 = INTEGER: 3
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.8.1 = INTEGER: 3
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.9.1 = INTEGER: 3
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.10.1 = INTEGER: 3
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.11.1 = INTEGER: 3
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.12.1 = INTEGER: 3
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.13.1 = INTEGER: 3
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.14.1 = INTEGER: 3
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.15.1 = STRING: Anonymized 205
|
||||||
|
.1.3.6.1.4.1.318.1.1.25.1.2.1.1.1.1 = INTEGER: 1
|
||||||
|
.1.3.6.1.4.1.318.1.1.25.1.2.1.2.1.1 = INTEGER: 1
|
||||||
|
.1.3.6.1.4.1.318.1.1.25.1.2.1.3.1.1 = STRING: Anonymized 192
|
||||||
|
.1.3.6.1.4.1.318.1.1.25.1.2.1.4.1.1 = STRING: Anonymized 169
|
||||||
|
.1.3.6.1.4.1.318.1.1.25.1.2.1.5.1.1 = INTEGER: 64
|
||||||
|
.1.3.6.1.4.1.318.1.1.25.1.2.1.6.1.1 = INTEGER: 18
|
||||||
|
.1.3.6.1.4.1.318.1.1.25.1.2.1.7.1.1 = INTEGER: 37
|
||||||
|
.1.3.6.1.4.1.318.1.1.25.1.2.1.8.1.1 = INTEGER: 0
|
||||||
|
.1.3.6.1.4.1.318.1.1.25.1.2.1.9.1.1 = INTEGER: 1
|
||||||
|
.1.3.6.1.4.1.318.1.1.25.1.2.1.10.1.1 = INTEGER: 2
|
||||||
|
.1.3.6.1.4.1.318.2.1.6.1.0 = STRING: Anonymized 210
|
||||||
|
.1.3.6.1.4.1.318.2.1.6.2.0 = STRING: Anonymized 141
|
95
tests/hardware/ups/apc/snmp/ups-apc-battery-ok.snmpwalk
Normal file
95
tests/hardware/ups/apc/snmp/ups-apc-battery-ok.snmpwalk
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
.1.3.6.1.4.1.318.1.1.1.2.1.1.0 = INTEGER: 2
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.1.2.0 = 1234567890
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.1.3.0 = STRING: "10-05-2022"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.2.1.0 = Gauge32: 100
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.2.2.0 = Gauge32: 23
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.2.3.0 = 3992500
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.2.4.0 = INTEGER: 1
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.2.5.0 = INTEGER: 4
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.2.8.0 = INTEGER: 110
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.2.19.0 = STRING: Anonymized 198
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.2.20.0 = STRING: Anonymized 057
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.2.21.0 = STRING: Anonymized 150
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.1.1.1 = STRING: "0000000000000000"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.1.1.2 = STRING: "0000000000000000"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.2.1.1 = STRING: "0000000000000000"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.2.1.2 = STRING: "0000000000000000"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.3.1.1 = STRING: "0000000000000000"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.3.1.2 = STRING: "0000000000000000"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.4.1.1 = STRING: "0000000000000000"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.4.1.2 = STRING: "0000000000000000"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.5.1.1 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.5.1.2 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.6.1.1 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.6.1.2 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.7.1.1 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.7.1.2 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.8.1.1 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.8.1.2 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.9.1.1 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.9.1.2 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.10.1.1 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.10.1.2 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.11.1.1 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.2.1.10.11.1.2 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.4.1.5.1.1 = STRING: "0000000000000000"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.4.1.5.2.1 = STRING: "0000000000000000"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.4.1.5.3.1 = STRING: "0000000000000000"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.4.1.5.4.1 = STRING: "0000000000000000"
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.4.1.5.5.1 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.4.1.5.6.1 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.4.1.5.7.1 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.2.3.10.4.1.5.8.1 = ""
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.3.2.1.0 = Gauge32: 234
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.3.2.4.0 = Gauge32: 50
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.3.2.5.0 = INTEGER: 9
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.3.3.1.0 = Gauge32: 2341
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.3.3.4.0 = Gauge32: 500
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.4.1.1.0 = INTEGER: 2
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.4.2.1.0 = Gauge32: 220
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.4.2.2.0 = Gauge32: 50
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.4.2.3.0 = Gauge32: 10
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.4.2.4.0 = Gauge32: 1
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.4.3.1.0 = Gauge32: 2200
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.4.3.2.0 = Gauge32: 500
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.4.3.3.0 = Gauge32: 97
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.4.3.4.0 = Gauge32: 13
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.5.2.2.0 = INTEGER: 245
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.5.2.3.0 = INTEGER: 198
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.5.2.20.0 = INTEGER: 1
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.5.2.21.0 = INTEGER: 0
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.5.2.22.0 = INTEGER: -1
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.5.2.23.0 = INTEGER: -1
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.5.2.24.0 = INTEGER: 1
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.5.2.26.0 = INTEGER: 1
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.5.2.27.0 = INTEGER: 1
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.5.2.28.0 = INTEGER: 0
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.5.2.30.0 = 15000
|
||||||
|
.1.3.6.1.4.1.318.1.1.1.5.2.31.0 = INTEGER: 2
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.1.1 = INTEGER: 1
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.2.1 = STRING: Anonymized 133
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.3.1 = INTEGER: 2
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.4.1 = INTEGER: 18
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.5.1 = INTEGER: 1
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.6.1 = INTEGER: 37
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.7.1 = INTEGER: 3
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.8.1 = INTEGER: 3
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.9.1 = INTEGER: 3
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.10.1 = INTEGER: 3
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.11.1 = INTEGER: 3
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.12.1 = INTEGER: 3
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.13.1 = INTEGER: 3
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.14.1 = INTEGER: 3
|
||||||
|
.1.3.6.1.4.1.318.1.1.10.2.3.2.1.15.1 = STRING: Anonymized 205
|
||||||
|
.1.3.6.1.4.1.318.1.1.25.1.2.1.1.1.1 = INTEGER: 1
|
||||||
|
.1.3.6.1.4.1.318.1.1.25.1.2.1.2.1.1 = INTEGER: 1
|
||||||
|
.1.3.6.1.4.1.318.1.1.25.1.2.1.3.1.1 = STRING: Anonymized 192
|
||||||
|
.1.3.6.1.4.1.318.1.1.25.1.2.1.4.1.1 = STRING: Anonymized 169
|
||||||
|
.1.3.6.1.4.1.318.1.1.25.1.2.1.5.1.1 = INTEGER: 64
|
||||||
|
.1.3.6.1.4.1.318.1.1.25.1.2.1.6.1.1 = INTEGER: 18
|
||||||
|
.1.3.6.1.4.1.318.1.1.25.1.2.1.7.1.1 = INTEGER: 37
|
||||||
|
.1.3.6.1.4.1.318.1.1.25.1.2.1.8.1.1 = INTEGER: 0
|
||||||
|
.1.3.6.1.4.1.318.1.1.25.1.2.1.9.1.1 = INTEGER: 1
|
||||||
|
.1.3.6.1.4.1.318.1.1.25.1.2.1.10.1.1 = INTEGER: 2
|
||||||
|
.1.3.6.1.4.1.318.2.1.6.1.0 = STRING: Anonymized 210
|
||||||
|
.1.3.6.1.4.1.318.2.1.6.2.0 = STRING: Anonymized 141
|
Loading…
x
Reference in New Issue
Block a user