File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ sub custom_uptime_perfdata {
5252 $self -> {output }-> perfdata_add(
5353 label => ' uptime' , unit => $self -> {instance_mode }-> {option_results }-> {unit },
5454 nlabel => ' system.uptime.' . $unitdiv_long -> { $self -> {instance_mode }-> {option_results }-> {unit } },
55- value => floor( $self -> {result_values }-> {uptime } / $unitdiv -> { $self -> {instance_mode }-> {option_results }-> {unit } }),
55+ value => sprintf ( " %.2f " , $self -> {result_values }-> {uptime } / $unitdiv -> { $self -> {instance_mode }-> {option_results }-> {unit } }),
5656 warning => $self -> {perfdata }-> get_perfdata_for_output(label => ' warning-' . $self -> {thlabel }),
5757 critical => $self -> {perfdata }-> get_perfdata_for_output(label => ' critical-' . $self -> {thlabel }),
5858 min => 0
@@ -63,7 +63,7 @@ sub custom_uptime_threshold {
6363 my ($self , %options ) = @_ ;
6464
6565 return $self -> {perfdata }-> threshold_check(
66- value => floor( $self -> {result_values }-> {uptime } / $unitdiv -> { $self -> {instance_mode }-> {option_results }-> {unit } }),
66+ value => sprintf ( " %.2f " , $self -> {result_values }-> {uptime } / $unitdiv -> { $self -> {instance_mode }-> {option_results }-> {unit } }),
6767 threshold => [
6868 { label => ' critical-' . $self -> {thlabel }, exit_litteral => ' critical' },
6969 { label => ' warning-' . $self -> {thlabel }, exit_litteral => ' warning' },
You can’t perform that action at this time.
0 commit comments