From 51ee7a12f7d393b1a095704afd0fbb35d35c028b Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Thu, 19 Dec 2019 09:27:34 +0100 Subject: [PATCH] Fix #1750 --- .../ups/standard/rfc1628/snmp/mode/batterystatus.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/centreon-plugins/hardware/ups/standard/rfc1628/snmp/mode/batterystatus.pm b/centreon-plugins/hardware/ups/standard/rfc1628/snmp/mode/batterystatus.pm index 0511cbde9..51ccdfa0d 100644 --- a/centreon-plugins/hardware/ups/standard/rfc1628/snmp/mode/batterystatus.pm +++ b/centreon-plugins/hardware/ups/standard/rfc1628/snmp/mode/batterystatus.pm @@ -65,6 +65,14 @@ sub set_counters { ], } }, + { label => 'charge-remaining-minutes', nlabel => 'battery.charge.remaining.minutes', display_ok => 0, set => { + key_values => [ { name => 'minute_remain' } ], + output_template => 'minutes remaining: %s', + perfdatas => [ + { label => 'charge_remaining', value => 'minute_remain_absolute', template => '%s', min => 0, unit => 'minutes' }, + ], + } + }, { label => 'current', nlabel => 'battery.current.ampere', display_ok => 0, set => { key_values => [ { name => 'current', no_value => 0 } ], output_template => 'current: %s A', @@ -169,8 +177,8 @@ Can used special variables like: %{status} =item B<--warning-*> B<--critical-*> Thresholds. -Can be: 'charge-remaining' (%), 'current' (A), 'voltage' (V), 'temperature' (C). - +Can be: 'charge-remaining' (%), 'charge-remaining-minutes', +'current' (A), 'voltage' (V), 'temperature' (C). =back