SYNOPSIS

VERSION

DESCRIPTION

icli is a command line interface to Icinga. By default it lists all
services and their states.

Note that when supplying custom config and status file paths, icli also
works with Nagios. 100% compatibility is not guaranteed, however.

icli only works when executed on the host running the Icinga daemon. To
use it on another host, shell aliases (like alias icli='ssh $icingahost
icli') or similar are recommended.

You can narrow down the list of services you want displayed either using
filters (like icli -z!o), the -h/-s arguments (icli -h
aneurysm -s Libraries,Websites) or commandline args (icli
aneurysm/{Libraries,Websites} with shell expansion).

OPTIONS

Run action on all matching hosts or services. args is a comma-separated
list of action arguments and depends on the action in question. action may
also be a one or two letter shortcut.

The following actions are supported:

a|acknowledge comment

Acknowledge service problems with string comment. This creates a sticky
acknwoledgment with notification and no expire time. The comment will not be
persistent.

Note: Acknowledgement of host problems is not yet supported.

d|downtime start,stop,duration,comment[,opts]

Schedule a non-triggered host or service (depending on the filter arguments)
downtime. start and stop are timestamps and must be formatted as
YYYY-MM-DDTHH:MM:SS, where the "T" is literal. The timestamp is assumed to
be in the same time zone as the system running icli.

If duration is 0 (zero), a fixed downtime between start and stop
is scheduled. Otherwise, a flexible downtime which will start between
start and stop and last duration is scheduled. In this case,
duration must be a real number appended with an optional unit
(s for seconds, m for minutes, h for hours, d for days, w for weeks). If no
unit is specified, seconds are used.

If a host is selected and opts contains "children", a downtime for all of
its children will be scheduled with the same parameters as the host's.
Likewise, if opts contains "trigger_children", a triggered downtime for all
of the host's children will be scheduled.

comment refers to the downtime's comment field and must not contain the
"," (comma) character.

r|recheck

Schedule an immediate recheck

R|force_recheck

Schedule a forced, immediate recheck

--api1apiroot

Set Icinga 1.x (Classic UI) JSON API root to apiroot. apiroot must be the root
of Icinga's CGI directory. For instance, if your tactical overview has the
URL https://monitoring.finalrewind.org/cgi-bin/icinga/tac.cgi,
you need to set apiroot to https://monitoring.finalrewind.org/cgi-bin/icinga.

Please refer to the "JSON API" section in this manual for more information
about this API.

-c|--configconfig

Read config from file

-C|--no-colours

Disable colours in output

-f|--status-filefile

Read the status from file

-F|--rw-filefile

Use file as external commands file.

-g|--hostgrouphostgroup

Limit selection to hosts in hostgroup (comma separated list)

-h|--hosthosts

Limit selection to hosts (comma separated list)

-l|--listdowntimes|hosts|services|queue

List either services (the default) or hosts.
Note that only the first character of the argument is checked, so icli
-lh, icli -ls etc. are also fine.

QUEUE LISTING

FILTER EXPRESSIONS

Each expression can be negated with an exclamation mark, e.g. "!A" for all
non-acknowledged services.

A

Check state has been acknowledged

D

The host this service belongs to is Down or Unreachable

F

Service is flapping between states

N

Notifications for this service are disabled

P

Only passive checks are enabled. Note that !P simply means that active
checks are enabled, no matter the status of passive checks

S

Check state is soft. For instance, it used to be OK and is now critical, but
has not reached its maximum number and caused a notification yet. Good to
find (or ignore) service problems which might just be temporary, non-critical
glitches.