.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "ICLI 1p" .TH ICLI 1p "2012-06-16" "perl v5.14.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" icli \- Icinga Command Line Interface .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBicli\fR [\fB\-v\fR|\fB\-vv\fR] [\fB\-z\fR \fIfilter\fR] [\fB\-h\fR \fIhosts\fR] [\fB\-g\fR \fIhostgroups\fR] [\fB\-s\fR \fIservices\fR] [\fB\-c\fR \fIconfig\fR] [\fB\-C\fR] [\fB\-f\fR \fIstatus-file\fR] [\fB\-F\fR \fIrw-file\fR] [\fB\-r\fR|\fB\-u\fR|\fB\-lh\fR|\fB\-ls\fR|\fB\-lq\fR|\fB\-ld\fR] [\fIhost\fR/\fIservice\fR \fI...\fR] .SH "VERSION" .IX Header "VERSION" version 0.42 .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBicli\fR is a command line interface to \fBIcinga\fR. By default it lists all services and their states. .PP Note that when supplying custom config and status file paths, \fBicli\fR also works with \fBNagios\fR. 100% compatibility is not guaranteed, however. .PP \&\fBicli\fR only works when executed on the host running the \fBIcinga\fR daemon. To use it on another host, shell aliases (like \f(CW\*(C`alias icli=\*(Aqssh $icingahost icli\*(Aq\*(C'\fR) or similar are recommended. .PP You can narrow down the list of services you want displayed either using \&\fBfilters\fR (like \f(CW\*(C`icli \-z!o\*(C'\fR), the \fB\-h\fR/\fB\-s\fR arguments (\f(CW\*(C`icli \-h aneurysm \-s Libraries,Websites\*(C'\fR) or commandline args (\f(CW\*(C`icli aneurysm/{Libraries,Websites}\*(C'\fR with shell expansion). .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-c\fR|\fB\-\-config\fR \fIconfig\fR" 4 .IX Item "-c|--config config" Read config from \fIfile\fR instead of the default \&\fI/var/cache/icinga/objects.cache\fR .IP "\fB\-C\fR|\fB\-\-no\-colours\fR" 4 .IX Item "-C|--no-colours" Disable colours in output .IP "\fB\-f\fR|\fB\-\-status\-file\fR \fIfile\fR" 4 .IX Item "-f|--status-file file" Read the status from \fIfile\fR instead of the default \&\fI/var/lib/icinga/status.dat\fR .IP "\fB\-F\fR|\fB\-\-rw\-file\fR \fIfile\fR" 4 .IX Item "-F|--rw-file file" Use \fIfile\fR as external commands file. Default: \&\fI/var/lib/icinga/rw/icinga.cmd\fR .IP "\fB\-g\fR|\fB\-\-hostgroup\fR \fIhostgroup\fR" 4 .IX Item "-g|--hostgroup hostgroup" Limit selection to hosts in \fIhostgroup\fR (comma separated list) .IP "\fB\-h\fR|\fB\-\-host\fR \fIhosts\fR" 4 .IX Item "-h|--host hosts" Limit selection to \fIhosts\fR (comma separated list) .IP "\fB\-l\fR|\fB\-\-list\fR \fBdowntimes\fR|\fBhosts\fR|\fBservices\fR|\fBqueue\fR" 4 .IX Item "-l|--list downtimes|hosts|services|queue" List either services (the default) or hosts. Note that only the first character of the argument is checked, so \f(CW\*(C`icli \&\-lh\*(C'\fR, \f(CW\*(C`icli \-ls\*(C'\fR etc. are also fine. .IP "\fB\-r\fR|\fB\-\-recheck\fR" 4 .IX Item "-r|--recheck" Schedule an immediate recheck of all selected services .IP "\fB\-u\fR|\fB\-\-force\-recheck\fR" 4 .IX Item "-u|--force-recheck" Schedule a forced, immediate recheck of all selected services .IP "\fB\-U\fR|\fB\-\-as\-contact\fR \fIname\fR" 4 .IX Item "-U|--as-contact name" Only operate on service visible to \fIname\fR. Doesn't work for \fB\-lh\fR yet, most useful for \fB\-ls\fR. .Sp \&\s-1NOTE:\s0 This is meant to help find out which services a user has access to. It is \&\s-1NOT\s0 intended as a way to restrict access and should never be used that way. .IP "\fB\-s\fR|\fB\-\-service\fR \fIservices\fR" 4 .IX Item "-s|--service services" Limit selection to \fIservices\fR (comma separated lists). Can be combined with \&\fB\-h\fR/\fB\-g\fR to further narrow down the selection, but may also be used stand-alone. .IP "\fB\-v\fR|\fB\-\-verbose\fR" 4 .IX Item "-v|--verbose" Increase output verbosity. Can be combined up to \fB\-vvv\fR .IP "\fB\-V\fR|\fB\-\-version\fR" 4 .IX Item "-V|--version" Show version information .IP "\fB\-x\fR|\fB\-\-cut\-mode\fR \fImode\fR" 4 .IX Item "-x|--cut-mode mode" What to do with lines which are too long for the terminal: \fBn\fRothing, \fBc\fRut off, line \fBb\fRreak (with proper indentation). The default is line \fBb\fRreaks .IP "\fB\-z\fR|\fB\-\-filter\fR \fIexpression\fR" 4 .IX Item "-z|--filter expression" Limit selection to hosts/services passing the filter. \fIexpression\fR is a comma separated list of filters, only hosts/services to which all filters apply are selected. See also \*(L"\s-1FILTER\s0 \s-1EXPRESSIONS\s0\*(R" .SH "OUTPUT" .IX Header "OUTPUT" .SS "\s-1SERVICE\s0 \s-1LISTING\s0" .IX Subsection "SERVICE LISTING" This is the standard output method. It contains the following: .IP "\(bu" 4 Service description .IP "\(bu" 4 \&\-v: Service Flags (\fBA\fRcknowledged, \fBF\fRlapping, \fBP\fRassive, \fB!\fRno checks) .IP "\(bu" 4 Service state (ok / warning / critical / unknown) .IP "\(bu" 4 \&\-v: Current attempt / Max attempts .IP "\(bu" 4 Plugin output .SS "\s-1HOST\s0 \s-1LISTING\s0" .IX Subsection "HOST LISTING" Enabled with \-ld .IP "\(bu" 4 Host name .IP "\(bu" 4 Host state (ok / down / unreachable) .IP "\(bu" 4 \&\-v: Current attempt / Max attempts .IP "\(bu" 4 Plugin output .SS "\s-1QUEUE\s0 \s-1LISTING\s0" .IX Subsection "QUEUE LISTING" Enabled with \-lq .IP "\(bu" 4 Host name .IP "\(bu" 4 Service name .IP "\(bu" 4 Last check .IP "\(bu" 4 Next check .SH "FILTER EXPRESSIONS" .IX Header "FILTER EXPRESSIONS" Each expression can be negated with an exclamation mark, e.g. \*(L"!A\*(R" for all non-acknowledged services. .IP "\fBA\fR" 4 .IX Item "A" Check state has been acknowledged .IP "\fBD\fR" 4 .IX Item "D" The host this service belongs to is Down or Unreachable .IP "\fBF\fR" 4 .IX Item "F" Service is flapping between states .IP "\fBN\fR" 4 .IX Item "N" Notifications for this service are disabled .IP "\fBP\fR" 4 .IX Item "P" Only passive checks are enabled. Note that \fB!P\fR simply means that active checks are enabled, no matter the status of passive checks .IP "\fBS\fR" 4 .IX Item "S" Check state is soft. For instance, it used to be \s-1OK\s0 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. .IP "\fBo\fR" 4 .IX Item "o" Host/Service state is \s-1OK\s0 .IP "\fBw\fR" 4 .IX Item "w" Service state is Warning .IP "\fBc\fR" 4 .IX Item "c" Service state is Critical .IP "\fBu\fR" 4 .IX Item "u" Service state is Unknown .IP "\fBd\fR" 4 .IX Item "d" Host state is Down .IP "\fBx\fR" 4 .IX Item "x" Host state is Unreachable .SH "EXIT STATUS" .IX Header "EXIT STATUS" Zero, unless errors occured. .SH "CONFIGURATION" .IX Header "CONFIGURATION" None. .SH "DEPENDENCIES" .IX Header "DEPENDENCIES" .IP "\(bu" 4 autodie (included with perl >= 5.10.1) .IP "\(bu" 4 Date::Format .IP "\(bu" 4 Term::Size .SH "BUGS AND LIMITATIONS" .IX Header "BUGS AND LIMITATIONS" This software is in early development stages. So there will probably be quite a lot. .SS "\s-1REPORTING\s0 \s-1BUGS\s0" .IX Subsection "REPORTING BUGS" Either via mail to or on . .SH "EXAMPLES" .IX Header "EXAMPLES" .ie n .IP """icli \-r \-s \*(AqAPT Updates\*(Aq""" 4 .el .IP "\f(CWicli \-r \-s \*(AqAPT Updates\*(Aq\fR" 4 .IX Item "icli -r -s APT Updates" Schedule a check of the \*(L"\s-1APT\s0 Updates\*(R" service on all hosts having it .ie n .IP """icli \-lq \-h aneurysm \-g chaosdorf\-hosts""" 4 .el .IP "\f(CWicli \-lq \-h aneurysm \-g chaosdorf\-hosts\fR" 4 .IX Item "icli -lq -h aneurysm -g chaosdorf-hosts" List check queue for all hosts in the hostgroup \*(L"chaosdorf-hosts\*(R", plus the host aneurysm .ie n .IP """icli \-z!o,!A,!S,!D""" 4 .el .IP "\f(CWicli \-z!o,!A,!S,!D\fR" 4 .IX Item "icli -z!o,!A,!S,!D" Show all service problems which are already hard states and have not yet been acknowledged. Also weed out problem services on hosts which are down anyways .SH "AUTHOR" .IX Header "AUTHOR" Copyright (C) 2010 by Daniel Friesel .SH "LICENSE" .IX Header "LICENSE" .Vb 1 \& 0. You just DO WHAT THE FUCK YOU WANT TO. .Ve