apps::monitoring::kadiska::plugin - fix metric format (#4385)

This commit is contained in:
Thibault S 2023-04-28 10:46:30 +02:00 committed by GitHub
parent 9b79fc5b35
commit 8e41e054ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ sub custom_usage_perfdata_ms {
nlabel => $self->{nlabel},
unit => 'ms',
instances => [ $self->{result_values}->{watcher_name}, $self->{result_values}->{site_name}, $self->{result_values}->{gateway_name} ],
value => sprintf('%s', $self->{result_values}->{ $self->{key_values}->[0]->{name} } ),
value => sprintf('%.2f', $self->{result_values}->{ $self->{key_values}->[0]->{name} } ),
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $self->{thlabel}),
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $self->{thlabel}),
min => 0
@ -46,7 +46,7 @@ sub custom_usage_perfdata {
$self->{output}->perfdata_add(
nlabel => $self->{nlabel},
instances => [ $self->{result_values}->{watcher_name}, $self->{result_values}->{site_name}, $self->{result_values}->{gateway_name} ],
value => sprintf('%s', $self->{result_values}->{ $self->{key_values}->[0]->{name} } ),
value => sprintf('%.2f', $self->{result_values}->{ $self->{key_values}->[0]->{name} } ),
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $self->{thlabel}),
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $self->{thlabel}),
min => 0