1 ## <a id="external-commands"></a> External Commands
3 Icinga 2 provides an external command pipe for processing commands
4 triggering specific actions (for example rescheduling a service check
5 through the web interface).
7 In order to enable the `ExternalCommandListener` configuration use the
8 following command and restart Icinga 2 afterwards:
10 # icinga2-enable-feature command
12 Icinga 2 creates the command pipe file as `/var/run/icinga2/cmd/icinga2.cmd`
13 using the default configuration.
15 Web interfaces and other Icinga addons are able to send commands to
16 Icinga 2 through the external command pipe, for example for rescheduling
17 a forced service check:
19 # /bin/echo "[`date +%s`] SCHEDULE_FORCED_SVC_CHECK;localhost;ping4;`date +%s`" >> /var/run/icinga2/cmd/icinga2.cmd
21 # tail -f /var/log/messages
23 Oct 17 15:01:25 icinga-server icinga2: Executing external command: [1382014885] SCHEDULE_FORCED_SVC_CHECK;localhost;ping4;1382014885
24 Oct 17 15:01:25 icinga-server icinga2: Rescheduling next check for service 'ping4'
26 By default the command pipe file is owned by the group `icingacmd` with read/write
27 permissions. Add your webserver's user to the group `icingacmd` to
28 enable sending commands to Icinga 2 through your web interface:
30 # usermod -G -a icingacmd www-data
32 Debian packages use `nagios` as the default user and group name. Therefore change `icingacmd` to
35 ### <a id="external-command-list"></a> External Command List
37 A list of currently supported external commands can be found on the
38 [Icinga Wiki](https://wiki.icinga.org/display/icinga2/External+Commands).
39 Detailed information on the commands and their required parameters can be found
40 on the [Icinga 1.x documentation](http://docs.icinga.org/latest/en/extcommands2.html).