icinga create-check-command
Creates a new check command object
Description
Creates a new check command object
Synopsis
icinga create-check-command
[--site <site>]
[--cluster <cluster>]
--name <name>
[--templates <templates>]
[--ignore_on_err]
--commands <commands>
[--arguments <arguments>]
[--vars <vars>]
Arguments
site
- (string)
Site where this command will be executed
Example: --site "site-1"
Default: input.site
Attributes: optional
cluster
- (string)
Name of Icinga cluster
Example: --cluster "icinga-default"
Default: icinga-default
Attributes: optional
name
- (string)
Name of the check command object. Must be unique on a per-host basis
Example: --name "checkcommand1"
Default: _None_
Attributes: required
templates
- (string)
Import existing configuration templates for this object type. These templates must either be statically configured or provided in config packages
Example: --templates "plugin-check-command"
Default: _None_
Attributes: optional, multiple allowed
ignore_on_err
- (bool)
If set, Ignore object creation errors and return an HTTP 200 status instead.
Example: --ignore_on_err
Default: _None_
Attributes: optional
commands
- (string)
The command. This can either be an array of individual command arguments. Alternatively a string can be specified in which case the shell interpreter (usually /bin/sh) takes care of parsing the command.
Example: --commands "/usr/local/sbin/check_http"
Default: _None_
Attributes: required, multiple allowed
arguments
- (string)
A dictionary of command arguments
Example: --arguments "{ "-I": "$mytest_iparam$" }"
Default: _None_
Attributes: optional
vars
- (string)
A dictionary containing custom variables that are specific to this command.
Example: --vars "{http_ssl: false, http_sni: false}"
Default: _None_
Attributes: optional
Examples
Input:
Output:Access Control
To use this command, you need access to the following:
Field | Value |
---|---|
Action | "create" |
Service Type | "icinga" |
Service Instance | cluster |
Namespace | |
Object Type | "check_command" |
Object ID | name |
Please see Access Control for details.