Skip to content

Host Monitoring

monitor_host

monitor_host <HOSTNAME> <NEW_STATUS>

Monitor or unmonitor a host.

Arguments

HOSTNAME
Name of host
Type: text
Required:

NEW_STATUS
Monitoring status
Type: choice
Choices: on, off, 0, 1
Required:


show_host_inventory

show_host_inventory <HOSTNAME_OR_ID>

Show host inventory details for a specific host.

Arguments

HOSTNAME_OR_ID
Hostname or ID
Type: text
Required:


show_last_values

show_last_values <ITEM> [OPTIONS]

Show the last values of given items of monitored hosts.

Examples

Get items starting with 'MongoDB'

show_last_values 'MongoDB*'

Get items containing 'memory'

show_last_values '*memory*'

Get all items (WARNING: slow!)

show_last_values '*'

Arguments

ITEM
Item names or IDs. Comma-separated. Supports wildcards.
Type: text
Required:

Options

--group
Group items with the same value.
Type: boolean
Default: False

--limit, -n <LIMIT>
Limit the number of results. 0 to show all.
Type: integer
Default: 0


update_host_inventory

update_host_inventory <HOSTNAME_OR_ID> <KEY> <VALUE>

Update a host inventory field.

Inventory fields in the API do not always match Web GUI field names. Use zabbix-cli -o json show_host_inventory <hostname> to see the available fields.

Arguments

HOSTNAME_OR_ID
Hostname or ID of host.
Type: text
Required:

KEY
Inventory key
Type: text
Required:

VALUE
Inventory value
Type: text
Required: