(plugin) hardware::pdu::cyberpower::snmp - add ampere perfdata even if 0 (#3600)

This commit is contained in:
qgarnier 2022-04-15 14:53:09 +02:00 committed by GitHub
parent 5b5ae8334f
commit ecb7edd844
1 changed files with 3 additions and 4 deletions

View File

@ -75,8 +75,8 @@ sub set_counters {
}
},
{ label => 'current', nlabel => 'outlet.current.ampere', set => {
key_values => [ { name => 'current', no_value => 0 }, { name => 'display' } ],
output_template => 'current : %s A',
key_values => [ { name => 'current' }, { name => 'display' } ],
output_template => 'current: %s A',
perfdatas => [
{ template => '%s', unit => 'A', min => 0, label_extra_instance => 1 }
]
@ -90,8 +90,7 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
});
$options{options}->add_options(arguments => {});
return $self;
}