1. Zabbix CLI
1.1 Example
1.1.1 Valid Command
zabbix_controller -u username -p password hosts list
zabbix_controller -u username -p password hosts -m name:^server$ list
1.1.2 Invalid Command
zabbix_controller hosts -u username -p password list
zabbix_controller -u username -p password hosts list -m name:^server$
1.2 zabbixctl [options] command ...
1.2.1 Options
These options are only set at zabbixctl [options] command ....
zabbixctl command [options] ... is not accepted.
1.2.1.1 --help
zabbixctl --help
1.2.1.2 --apiserver-address, -aa
zabbixctl -aa http://localhost:8081
1.2.1.3 --username, -u, --password, -p
Used for zabbix login
zabbixctl --username Admin --password zabbix_password
1.2.1.4 --basicauth_username, -bu, --basicauth_password, -bp
Used for basic authentication
zabbixctl -bu alis -bp alis_password
1.2.1.5 --dry-run
If you set --dry-run, only get API is executed, then ZabbixCTL state is printed.
Create, update, delete like API is not executed.
zabbixctl --dry-run
1.3 zabbixctl host Options Command ...
1.3.1 Options
1.3.1.1 -m, --match
Search host using json like object.
Search key, then apply value.
In the example below,
hosts which name key is including some_name are listed.
zabbixctl hosts -m '{"name": "some_name"}' list
zabbixctl hosts -m '[{"name": "some_name"}]' list
Each key, value pairs are chained by and operator.
Each dicts are chained by or operator.
This command mean ("name": "some_name" and "hostid": "^1") or "name": "other_name".
zabbixctl hosts -m '[{"name": "some_name", "hostid": "^1"}, {"name": "other_name"}]' list
1.3.1.2 -tr, --time-range
This option is able to specify time range. If you use --match at the same time, used by "and operator".
key:[from]-[to]
from and to must be unixtime and can be omitted.
These commands are same and print host which disable property is included from 0 to now.
zabbixctl hosts -tr disable:0- list
zabbixctl hosts -tr disable:- list
This command mean (("name": "some_name" and "hostid": "^1") or "name": "other_name") and (0 <= disable_until <= now).
zabbixctl hosts -m '[{"name": "some_name", "hostid": "^1"}, {"name": "other_name"}]' -tr 'disable_until:-' list
1.3.2 Commands
1.3.2.1 list
list up host
1.3.2.2 delete
delete host
- options
-y, --yes
zabbixctl hosts -m '{"name": "some_name"}' delete -y
1.3.2.3 disable
disable host
- options
-y, --yes
zabbixctl hosts -m '{"name": "some_name"}' disable -y
1.3.2.4 update
update host
- options
-d, --data-y, --yes
These are same command.
zabbixctl hosts -m '{"name": "some_name"}' update -d '{"state": 1}' -y
zabbixctl hosts -m '{"name": "some_name"}' update -d '{"state": "1"}' -y
zabbixctl hosts -m '{"name": "some_name"}' disable -y
1.4 zabbixctl host graphs Options Command
1.4.1 Command
1.4.2 list
1.4.3 delete
- options
-y, --yes
1.4.2 Options
1.4.2.1 -m, --match
This command delete graphs which is in hosts which is matched regex.
zabbixctl hosts -m '{"name": "some_name"}' graphs delete -y
1.5 zabbixctl host interfaces Options Command
1.5.1 Command
1.5.1.1 list
1.5.1.2 usedns
Use dns, not ipaddress
- options
-y, --yes
1.5.1.3 update
These are same command.
- options
-y, --yes
zabbixctl hosts interfaces update -d '{"useip": 0}' -y
zabbixctl hosts interfaces update -d '{"useip": "0"}' -y
zabbixctl hosts interfaces usedns -y
LICENSE
Metadata
Release files for zabbix-controller 0.1.19
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zabbix_controller-0.1.19.tar.gz | 12.7 kB | Without provenance | Details for zabbix_controller-0.1.19.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zabbix_controller-0.1.19-py3-none-any.whl | Python 3 | none | any | Details for zabbix_controller-0.1.19-py3-none-any.whl |
Total release size: 28.4 kB
Release files / zabbix_controller-0.1.19.tar.gz
| Download URL | zabbix_controller-0.1.19.tar.gz |
|---|---|
| Size | 12.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
31917695bbe0fbd99d8b36b0b3723c3ba3d6f201e10b05487f7b54e53387ca4b
|
|
BLAKE2b-256 checksum How to use checksums |
ed649ab33bc2f1404a8c16f2118f6278a4550fb91285a9b50d4baeab3450de4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.17 CPython/3.7.3 Darwin/18.5.0
|
Release files / zabbix_controller-0.1.19-py3-none-any.whl
| Download URL | zabbix_controller-0.1.19-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4d8f3ba05805dbec9f2e830e5ed4e1f3a65af89870646b36de1cb9c43218c3e
|
|
BLAKE2b-256 checksum How to use checksums |
76ffc55f2988efca2c2f943312dce9bf08a8d1070c83e097e818d52603eedab5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.17 CPython/3.7.3 Darwin/18.5.0
|
Security for zabbix-controller 0.1.19
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.