get_blackouts
Lists all blackouts or just those for a specified target or one or more hosts. Only the blackouts the user has privilege to view are listed.
Format
emcli get_blackouts [-target=<name1:type1> | -hostnames=<host1;host2;...>] [-noheader] [-script | -format= [name:<pretty|script|csv>]; [column_separator:<column_sep_string>]; [row_separator:<row_sep_string>]; ] [ ] indicates that the parameter is optional
Options
-
target
Lists blackouts for this target. When neither this nor the
-hostnames
option is specified, all blackouts the user has privilege to view are listed. -
hostnames
Lists blackouts that have a target on one of the specified hosts. The host name is just the target name part of the host target. For example, specify
host.example.com
, rather thanhost.example.com:host
. When neither this nor the-target
option is specified, all blackouts the user has privilege to view are listed. -
noheader
Displays tabular information without column headers.
-
script
This is equivalent to
-format="name:script"
. -
format
Format specification (default is
-format="name:pretty"
).-
format="name:pretty"
prints the output table in a readable format not intended to be parsed by scripts. -
format="name:script"
sets the default column separator to a tab and the default row separator to a newline. The column and row separator strings can be specified to change these defaults. -
format="name:csv"
sets the column separator to a comma and the row separator to a newline. -
format="name:script;column_separator:<column_sep_string>" column-separates the verb output by <column_sep_string>. Rows are separated by the newline character.
-
format="name:script;row_separator:<row_sep_string>" row-separates the verb output by <row_sep_string>. Columns are separated by the tab character.
-
Output Columns
Name, Created By, Status, Status ID, Next Start, Duration, Reason, Frequency, Repeat, Start Time, End Time, Previous End, TZ Region, TZ Offset
Examples
Example 1
This example shows all blackouts that cover some target on host myhost.example.com
.
emcli get_blackouts -hostnames=myhost.example.com
Example 2
This example shows all blackouts that cover some target on host myhost.example.com
or on host yourhost.example.com
.
emcli get_blackouts -hostnames=myhost.example.com -hostnames=yourhost.example.com