Host
create_host
Create a host.
Always adds the host to the default host group unless --no-default-hostgroup is specified.
Selects a random proxy by default unless --proxy
-
is specified.
Arguments
HOSTNAME_OR_IP
Hostname or IP
Type: text
Required: ✅
Options
--hostgroup
<HOSTGROUPS>
Hostgroup name(s) or ID(s). Comma-separated.
Type: text
--proxy
<PROXY>
Proxy server used to monitor the host. Supports regular expressions.
Type: text
Default: .+
--status
<STATUS>
Host monitoring status.
Type: choice
Choices: on
, off
, 0
, 1
Default: on
--default-hostgroup
/--no-default-hostgroup
Add host to default host group(s) defined in config.
Type: boolean
Default: True
--name
<NAME>
Visible name of the host. Uses hostname or IP if omitted.
Type: text
--description
<DESCRIPTION>
Description of the host.
Type: text
remove_host
Delete a host.
Arguments
HOSTNAME
Name of host to remove.
Type: text
Required: ✅
show_host
Show a specific host.
Arguments
HOSTNAME_OR_ID
Hostname or ID.
Type: text
Required: ✅
Options
--active
<ACTIVE>
Active interface availability.
Type: choice
Choices: unknown
, available
, unavailable
, 0
, 1
, 2
--maintenance
/--no-maintenance
Maintenance status.
Type: boolean
--monitored
/--no-monitored
Monitoring status.
Type: boolean
show_hosts
Show all hosts.
Hosts can be filtered by agent, monitoring and maintenance status. Hosts are sorted by name.
Examples
Show all monitored (enabled) hosts
Show all hosts with names ending in '.example.com'
Show all hosts with names ending in '.example.com' or '.example.net'
Show all hosts with names ending in '.example.com' or '.example.net'
Show all hosts from a given hostgroup
Arguments
HOSTNAME_OR_ID
Hostname pattern or ID to filter by. Comma-separated. Supports wildcards.
Type: text
Options
--hostgroup
<HOSTGROUP>
Hostgroup name(s) or ID(s). Comma-separated.
Type: text
--active
<ACTIVE>
Active interface availability.
Type: choice
Choices: unknown
, available
, unavailable
, 0
, 1
, 2
--maintenance
/--no-maintenance
Maintenance status.
Type: boolean
--monitored
/--unmonitored
Monitoring status.
Type: boolean
--limit
, -n
<LIMIT>
Limit the number of results. 0 to show all.
Type: integer
Default: 0
update_host
Update basic information about a host.
Other notable commands to update a host:
add_host_to_hostgroup
create_host_interface
monitor_host
remove_host_from_hostgroup
update_host_interface
update_host_inventory
Arguments
HOSTNAME_OR_IP
Hostname or IP
Type: text
Required: ✅
Options
--name
<NAME>
Visible name of the host.
Type: text
--description
<DESCRIPTION>
Description of the host.
Type: text