Fix numericvalue mode and avoid error messages
This commit is contained in:
parent
3ad4a4e3a9
commit
65c0426d92
|
@ -184,7 +184,10 @@ sub output_add {
|
|||
sub perfdata_add {
|
||||
my ($self, %options) = @_;
|
||||
my $perfdata = {'label' => '', 'value' => '', unit => '', warning => '', critical => '', min => '', max => ''};
|
||||
$perfdata = {%$perfdata, %options};
|
||||
foreach (keys %options) {
|
||||
next if (!defined($options{$_}));
|
||||
$perfdata->{$_} = $options{$_};
|
||||
}
|
||||
$perfdata->{label} =~ s/'/''/g;
|
||||
push @{$self->{perfdatas}}, $perfdata;
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ __END__
|
|||
|
||||
=head1 MODE
|
||||
|
||||
Check current/average connections on Cisco ASA (CISCO-UNIFIED-FIREWALL-MIB).
|
||||
Check failover status on Cisco ASA (CISCO-UNIFIED-FIREWALL-MIB).
|
||||
|
||||
=over 8
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ sub new {
|
|||
"format-scale-unit:s" => { name => 'format_scale_unit', default => 'other'},
|
||||
"perfdata-unit:s" => { name => 'perfdata_unit', default => ''},
|
||||
"perfdata-name:s" => { name => 'perfdata_name', default => 'value'},
|
||||
"perfdata-max:s" => { name => 'perfdata_min', default => ''},
|
||||
"perfdata-min:s" => { name => 'perfdata_min', default => ''},
|
||||
"perfdata-max:s" => { name => 'perfdata_max', default => ''},
|
||||
});
|
||||
$self->{statefile_cache} = centreon::plugins::statefile->new(%options);
|
||||
|
|
Loading…
Reference in New Issue