From 0b8057261213843250fef84676679e0fa5af732e Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 27 Nov 2010 14:59:33 +0100 Subject: Support -vvv for host listing as well --- bin/icli | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/icli b/bin/icli index 9d8cd7d..8d35f5c 100755 --- a/bin/icli +++ b/bin/icli @@ -568,7 +568,7 @@ sub display_host_single { printf(" %d/%d", $h->{'current_attempt'}, $h->{'max_attempts'}); } - printf(" %s\n", $h->{'plugin_output'}); + printf(" %s", $h->{'plugin_output'}); } else { printf( @@ -618,8 +618,64 @@ sub display_host_single { ), $h->{'percent_state_change'}, ); - print "\n"; } + if ($v > 3) { + printf( + $format, + 'Check Type', + ($h->{'check_type'} ? 'PASSIVE' : 'ACTIVE'), + ); + printf( + "%-16s : %5.3fs\n%-16s : %5.3fs\n", + 'Check Latency', + $h->{'check_latency'}, + 'Check Duration', + $h->{'check_execution_time'}, + ); + printf( + "%-16s : o %s d %s u %s\n", + 'Last State Times', + pretty_date($h->{'last_time_up'}), + pretty_date($h->{'last_time_down'}), + pretty_date($h->{'last_time_unreachable'}), + ); + printf( + $format, + 'In Downtime', + 'FIXME' + ); + printf( + $format, + 'Active Checks', + pretty_yesno($h->{'active_checks_enabled'}), + ); + printf( + $format, + 'Passive Checks', + pretty_yesno($h->{'passive_checks_enabled'}), + ); + printf( + $format, + 'Obsessing', + pretty_yesno($h->{'obsess_over_host'}), + ); + printf( + $format, + 'Notifications', + pretty_yesno($h->{'notifications_enabled'}), + ); + printf( + $format, + 'Event Handler', + pretty_yesno($h->{'event_handler_enabled'}), + ); + printf( + $format, + 'Flap Detection', + pretty_yesno($h->{'flap_detection_enabled'}), + ); + } + print "\n"; } -- cgit v1.2.3