summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog1
-rwxr-xr-xbin/icli13
2 files changed, 13 insertions, 1 deletions
diff --git a/Changelog b/Changelog
index 6dff008..4e0c515 100644
--- a/Changelog
+++ b/Changelog
@@ -6,6 +6,7 @@ git HEAD
-aa/ -a acknowledge, -r/--recheck with -ar / -a recheck and
-u/--force-recheck wiht -aR / -a force_recheck
* add -ad / -a downtime option to schedule host/service downtimes
+ * Also show service downtimes when using --list downtimes
icli 0.47 - Thu May 29 2014
diff --git a/bin/icli b/bin/icli
index c28b413..77253f6 100755
--- a/bin/icli
+++ b/bin/icli
@@ -584,7 +584,13 @@ sub display_downtime {
my ($d) = @_;
my $v = $verbosity;
- printf( '%-27.27s', $d->{'host_name'} );
+ if ( $d->{service_description} ) {
+ printf( '%-25.25s %-25.25s',
+ $d->{'host_name'}, $d->{service_description} );
+ }
+ else {
+ printf( '%-25.25s', $d->{'host_name'} );
+ }
if ( $v >= 3 ) {
printf( ' %s %-10.10s',
@@ -1082,9 +1088,14 @@ elsif ( $list_type eq 'q' ) {
display_queue();
}
elsif ( $list_type eq 'd' ) {
+ say "Host downtimes:";
foreach my $downtime ( @{ $data->{hostdowntimes} } ) {
display_downtime($downtime);
}
+ say "\nService downtimes:";
+ foreach my $downtime ( @{ $data->{servicedowntimes} } ) {
+ display_downtime($downtime);
+ }
}
elsif ($action) {