Keywords: Supervision, Icinga, Nagios, Linux

7.1. External Commands
Prev | Chapter 7. Advanced Topics | Next

## 7.1. External Commands

### 7.1.1. Introduction

Icinga can process commands from external applications (including the CGIs) and alter various aspects of its monitoring functions based on the commands it receives. External applications can submit commands by writing to the command file, which is periodically processed by the Icinga daemon.

### 7.1.2. Enabling External Commands

In order to have Icinga process external commands, make sure you do the following:

- Enable external command checking with the check_external_commands option.

- Set the frequency of command checks with the command_check_interval option.

- Specify the location of the command file with the command_file option.

- Setup proper permissions on the directory containing the external command file, as described in the quickstart guide.

### 7.1.3. When Does Icinga Check For External Commands?

- At regular intervals specified by the command_check_interval option in the main configuration file

- Immediately after event handlers are executed. This is in addtion to the regular cycle of external command checks and is done to provide immediate action if an event handler submits commands to Icinga.

### 7.1.4. Using External Commands

External commands can be used to accomplish a variety of things while Icinga is running. Example of what can be done include temporarily disabling notifications for services and hosts, temporarily disabling service checks, forcing immediate service checks, adding comments to hosts and services, etc.

### 7.1.5. Command Format

External commands that are written to the command file have the following format...

    [time]  command_id; command_arguments

...where time is the time (in time_t format) that the external application submitted the external command to the command file. The values for the command_id and command_arguments arguments will depend on what command is being submitted to Icinga.

### 7.1.6. External Commands List

A full listing of external commands that can be used can be found in the list of external commands in the development section.

Prev | Up | Next
Chapter 7. Advanced Topics | Home | 7.2. List of External Commands

© 1999-2009 Ethan Galstad, 2009-2017 Icinga Development Team, https://www.icinga.com