Skip to content

Proxy

clear_host_proxy

clear_host_proxy <HOSTNAME> [OPTIONS]

Clear the proxy for one or more hosts.

Sets the hosts to be monitored by the Zabbix server instead of a proxy.

Arguments

HOSTNAME
Hostnames. Comma-separated Supports wildcards.
Type: text
Required:

Options

--dryrun/--no-dryrun
Preview changes
Type: boolean
Default: False


load_balance_proxy_hosts

load_balance_proxy_hosts <<PROXY1,PROXY2,...>> <[WEIGHT1,WEIGHT2,...]>

Spread hosts between multiple proxies.

Hosts are determined by the hosts monitored by the given proxies Hosts monitored by other proxies or not monitored at all are not affected.

Weighting for the load balancing is optional, and defaults to equal weights. Number of proxies must match number of weights if specified.

Examples

Load balance hosts evenly between two proxies

load_balance_proxy_hosts proxy1,proxy2

Place twice as many hosts on proxy1 as proxy2

load_balance_proxy_hosts proxy1,proxy2 2,1

Load balance hosts evenly between three proxies

load_balance_proxy_hosts proxy1,proxy2,proxy3

Load balance hosts unevenly between three proxies

load_balance_proxy_hosts proxy1,proxy2,proxy3 1,1,2

Arguments

<proxy1,proxy2,...>
Comma delimited list of proxies to share hosts between.
Type: text
Required:

[weight1,weight2,...]
Weights for each proxy. Comma-separated. Defaults to equal weights.
Type: text


move_proxy_hosts

move_proxy_hosts <PROXY_SRC> <PROXY_DST> [OPTIONS]

Move hosts from one proxy to another.

Examples

Move all hosts from one proxy to another

move_proxy_hosts proxy1 proxy2

Move all hosts with names matching a regex pattern

move_proxy_hosts proxy1 proxy2 --filter '$www.*'

Arguments

PROXY_SRC
Proxy to move hosts from.
Type: text
Required:

PROXY_DST
Proxy to move hosts to.
Type: text
Required:

Options

--filter <HOST_FILTER>
Regex pattern of hosts to move.
Type: text


show_proxies

show_proxies <NAME_OR_ID> [OPTIONS]

Show all proxies.

Shows number of hosts for each proxy unless --hosts is passed in, in which case the hostnames of each host are displayed instead.

Arguments

NAME_OR_ID
Filter by proxy name or ID. Comma-separated. Supports wildcards.
Type: text

Options

--hosts
Show hostnames of each host for every proxy.
Type: boolean
Default: False


show_proxy_hosts

show_proxy_hosts <PROXY>

Show all hosts with for a given proxy.

Arguments

PROXY
Proxy name or ID. Supports wildcards.
Type: text
Required:


update_host_proxy

update_host_proxy <HOSTNAME> <PROXY> [OPTIONS]

Assign hosts to a proxy.

Supports wildcards for both hosts and proxy names. If multiple proxies match the proxy name, the first match is used.

Arguments

HOSTNAME
Hostnames. Comma-separated Supports wildcards.
Type: text
Required:

PROXY
Proxy name. Supports wildcards.
Type: text
Required:

Options

--dryrun/--no-dryrun
Preview changes
Type: boolean
Default: False


update_hostgroup_proxy

update_hostgroup_proxy <HOSTGROUP> <PROXY> [OPTIONS]

Assign a proxy to all hosts in one or more host groups.

Arguments

HOSTGROUP
Host group(s). Comma-separated. Supports wildcards.
Type: text
Required:

PROXY
Proxy to assign. Supports wildcards.
Type: text
Required:

Options

--dryrun/--no-dryrun
Preview changes.
Type: boolean
Default: False