Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

zabbixctl - Utility that connects to Zabbix API

Project Description
# zabbixctl

## Install
```bash
sudo pip install zabbixctl
#or
sudo make install
#or
sudo python setup.py install
```

## Usage
```
usage: zabbixctl [-h] [-d] [-i] [-V] [-c CACERT] [-t TIMEOUT] [-H HOSTS]
[-U USER]
{help,get,create,update,export,delete} ...

Zabbix CLI

positional arguments:
{help,get,create,update,export,delete}
get Zabbix API Method for get
export Zabbix API Method for export
update Zabbix API Method for update
create Zabbix API Method for create
delete Zabbix API Method for delete
help Display link for Zabbix wiki

optional arguments:
-h, --help show this help message and exit
-d, --debug increase output verbosity (default: False)
-i, --http Use http instead of https (default: False)
-V, --noverify Do not verify the SSL (default: False)
-c CACERT, --cacert CACERT
Path to the SSL CA Certificateexample:
/etc/pki/tls/certs/ca-bundle.crt (default: None)
-t TIMEOUT, --timeout TIMEOUT
Zabbix API read timeout in seconds (default: 30)
-H HOSTS, --hosts HOSTS
Zabbix API host(s).example: zabbixhost.example.com
(default: None)
-p URI_PATH, --uri-path URI_PATH
URI path to zabbix api. default: zabbix (default:
zabbix)
-U USER, --user USER Zabbix API user (default: system username)

usage: zabbixctl get [-h] [-a ARGUMENTS] type

positional arguments:
type Zabbix API get method
(host.get,hostgroups.get,usergroups.get)

optional arguments:
-h, --help show this help message and exit
-a ARGUMENTS, --arguments ARGUMENTS
RPC params
-k, --listkeys Returns a list of keys for the given resource type
-f FILTER, --filter FILTER
Takes "key=value" args that are sent to the zabbix api
in the filter parameter
-s SEARCH, --search SEARCH
Takes "key=value" args that are sent to the zabbix api
in the search parameter
```

## Examples
```bash
zabbixctl -H zabbix.yourdomain.com get trigger -a 'hostids=[10167]' -a 'expandExpression=true' -a 'expandDescription=true'
zabbixctl -H zabbix.yourdomain.com get trigger -a 'search={"host":"syslog"}' -a 'expandExpression=true' -a 'searchWildcardsEnabled=true' -a 'selecthosts=extend'
zabbixctl -H zabbix.yourdomain.com get trigger -a 'triggerids=[14924]'
zabbixctl -H zabbix.yourdomain.com get trigger -a 'search={"host":"syslog"}' -a 'expandExpression=true'
zabbixctl -H zabbix.yourdomain.com get user
zabbixctl -H zabbix.yourdomain.com get host
zabbixctl -H zabbix.yourdomain.com get host -a 'search={"host":"syslog"}' -a 'searchWildcardsEnabled=true'
zabbixctl -H zabbix.yourdomain.com get alert -a 'time_from=1409611855' -a 'output=extend'
zabbixctl -H zabbix.yourdomain.com get itemprototype
zabbixctl -H zabbix.yourdomain.com get event -a 'time_from=1409611855' -a 'output=extend' -a 'selectRelatedObject=["description"]'
zabbixctl -H zabbix.yourdomain.com get alert -a 'time_from=1409611855' -a 'output=extend' -a 'selectHosts=["host"]'
zabbixctl -H zabbix.yourdomain.com get template -a 'output=["host"]' -a 'selectItems=extend' -a 'templateids=[10167]'
```

## Known Issues

Error: ImportError: cannot import name to_native_string
Solution: Upgrade to at least version 2.0 of requests
Release History

Release History

This version
History Node

1.1.6

History Node

1.1.5

History Node

1.1.4

History Node

1.1.3

History Node

1.1.2

History Node

1.1.1

History Node

1.1.0

History Node

1.0.3

History Node

1.0.2

History Node

1.0.1

History Node

1.0.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
zabbixctl-1.1.6.tar.gz (6.4 kB) Copy SHA256 Checksum SHA256 Source Jul 2, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting