See for the official Zabbix site.

Zabbix CLI Tools

Jump to: navigation, search



zabbixctl is tool that provides effective way for operating in Zabbix server using command line interface.


  • Searching, sorting and showing triggers statuses;
  • Acknowledge specified triggers;
  • Listing hosts latest data;
  • Search and operate on users groups.

Zabbix Tool

zabbix_tool is a Github repository containing three useful, maybe even essential, Zabbix CLI tools.

Both CLI tools support --help and --debug, while the Python module uses the standard logging module and supports both extensive logging as well as a "no send" mode.

  • zabbix_tool: this is the eponymous tool for manipulating your Zabbix installation. It's far from complete, yet I use it on a daily basis to get useful work done. While somewhat useful as-is, the real power can only be realized by using it to codify changes you want to make in Zabbix. Best of all, given what's already there you can usually accomplish this by adding one or two more functions (usually less than 10 lines each).
  • screen_creator (essential!): Allows you to create and re-size screens, adding items to your screens by hostgroup or hostname, with filtering. While you can create some useful screens in a single go, you generally get the best bang for the buck from a multiple execution method (see below for an example).
  • Python module that can be used to send data to Zabbix trapper items.


Zabcon is a tool written in Ruby which makes use of the Zabbix API wrapper also written in Ruby. The goal of Zabcon is to make it easier to maintain your Zabbix installation.



The Zabbix Gnomes are a collection of simple and reusable python scripts that are meant as an interface from the Unix shell to the Zabbix API. They will allow you to manipulate and use Zabbix information in normal *nix shell scripts without bothering with API calls.

Zabbix (agent) framework

This tool is used to maintain external zabbix checks in one place. There are lot of places where it is possible to download many external checks. But there is problem with installation, update and centralised management. This tool should do all of this in easy steps. In future it can be starting point to install and configure zabbix agent on systems with one step. Primary goal is not to make all plugins available here but to be able to use any plugin and decentralized development. If you are maintainer of some external check, it is enough to create zaf file in your repo and use zaf installer everywhere. Next to this, this tool can even communicate with Zabbix API with NO dependencies to high level languages. Shell, sed and awk only.

Zabbix Cli

Zabbix-cli is a tool for managing some Zabbix administration task via the zabbix-API. Manual here:



Get help (warning: very, very long)

zabbix_tool --help 

Re-assign all of the hosts currently using proxy HKG01 to proxy HKG02.

zabbix_tool assign_proxy_hosts HKG02 $(zabbix_tool get_hosts_assigned_to_proxy --filter=name HKG01)

List the hint count for all of your Cassandra nodes

zabbix_tool --filter=lastvalue get_item "Cassandra_status-Hints" hg-type-cassandra


Create a screen of Cassandra graphs - 3 columns of graphs for 8 servers.

for host in cass-{1..8}
  ./screen_creator --hsize=3 --vsize=8 --add_all_group=hg-type-cassandra "Memory Usage"
  ./screen_creator --hsize=3 --vsize=8 --add_all_group=hg-type-cassandra "Disk /cassandra"
  ./screen_creator --hsize=3 --vsize=8 --add_all_group=hg-type-cassandra "Hints"

Zabbix (agent) framework

Simple installation of zaf on any system:

curl -k | sh

Install plugin which will find and discover biggest directories on system

  zaf install fsx

Get all host ids in system via API

   zaf api get-host-ids

Export all hosts to backup directory in xml format, one xml per host

   zaf api export-hosts ./backup

zabbix-review-export can create XML or YAML dump of Zabbix configuration. Can be used as "code review" tecnique to review zabbix configuration, read more about it

   git clone
   cd zabbix-review-export

   python -mpip install -r requirements.xml

   # smoke test :)
   python ./ --help

   # backup to current folder, save XML and JSON
   python ./ --zabbix-url --zabbix-username user --zabbix-password password

   # backup zabbix configuration in YAML format
   python ./ --save-yaml --zabbix-url --zabbix-username user --zabbix-password password

   # backup to custom folder in YAML format
   python ./ --save-yaml --directory /home/username/path/to/zabbix-yaml --zabbix-url --zabbix-username user --zabbix-password password