From bf3c4995d131043943d62ad74f1d816115498e47 Mon Sep 17 00:00:00 2001 From: Sims24 Date: Mon, 12 Oct 2015 14:50:18 +0200 Subject: [PATCH] +fix copy/paste in output and add verbose message --- apps/protocols/ntp/mode/offset.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/protocols/ntp/mode/offset.pm b/apps/protocols/ntp/mode/offset.pm index 120962516..0c53f0766 100644 --- a/apps/protocols/ntp/mode/offset.pm +++ b/apps/protocols/ntp/mode/offset.pm @@ -82,7 +82,9 @@ sub run { my $exit = $self->{perfdata}->threshold_check(value => $offset, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]); $self->{output}->output_add(severity => $exit, - short_msg => sprintf("Response time %.3fs", $offset)); + short_msg => sprintf("Offset: %.3fs", $offset)); + $self->{output}->output_add(long_msg => sprintf("Host has %.5fs with its time server reference %s", $offset, $self->{option_results}->{ntp_host})); + $self->{output}->perfdata_add(label => "time", value => sprintf('%.3f', $offset), warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'), @@ -120,7 +122,7 @@ Threshold warning in seconds =item B<--critical> -Threshold critical in seconds +Threshold critical in seconds (e.g @10:10 means CRITICAL if offset is not between -10 and +10 seconds) =back