Skip to content

icinga modify-host

modifies a host object


modifies a host object


icinga modify-host
    [--site <site>]
    [--cluster <cluster>]
    --name <name>
    [--address <address>]
    [--groups <groups>]
    [--vars <vars>]
    [--check_command <check_command>]


site - (string)

     Site where this command will be executed
     Example: --site "site-1"
     Default:      Attributes: optional

cluster - (string)

     Name of Icinga cluster
     Example: --cluster "icinga-default"
     Default: icinga-default      Attributes: optional

name - (string)

     Name of the host object
     Example: --name "example.localdomain"
     Default: _None_      Attributes: required

address - (string)

     The host’s IPv4 address. Available as command runtime macro $address$ if set.
     Example: --address ""
     Default: _None_      Attributes: optional

groups - (string)

     A list of host groups this host belongs to
     Example: --groups "group1"
     Default: _None_      Attributes: optional, multiple allowed

vars - (string)

     A dictionary containing custom variables that are specific to this host.
     Example: --vars "{"os":"linux"}"
     Default: _None_      Attributes: optional

check_command - (string)

     The name of the check command.
     Example: --check_command "hostalive"
     Default: _None_      Attributes: optional



! icinga modify-host --name "host1" --check_command "hostalive"  --vars `{"os":"unix"}`
  "results": [
      "code": 200,
      "name": "host1",
      "status": "Attributes updated.",
      "type": "Host"

Access Control

To use this command, you need access to the following:

Field Value
Action "update"
Service Type "icinga"
Service Instance cluster
Object Type "host"
Object ID name

Please see Access Control for details.