Skip to main content

Zabbix management command-line client

Project description

Zabbix management command-line client

zabbix-cli-ent allows to perform actions on a Zabbix server through command line.

Zabbix web interface usually is the most suitable way for administration tasks, however there are times when you need to modify settings non-interactively (scripts, ..) or even certain actions easily done by command line.

Getting Started

Install zabbix-cli-ent using pip, either by getting the version uploaded in PyPi:

$ pip install zm

or the one from the current repo:

$ git clone https://github.com/orviz/zabbix-cli-ent.git
$ cd zabbix-cli-ent && pip install .

Basic Usage

$ zm --help

will list the current actions that can be performed.

Depending on the subcommand it will have different options; rely on the –help option to learn about each one.

NOTE: You can provide the connection details as options or via a configuration file. Either way, the login, password and url must be provided in order to get a successfully connection.

Use it programatically

You can also use zabbix-cli-ent as a Python library to get data from a Zabbix API.

For that you first need to provide the credentials to be able to access any of the available functionality. As an example:

import zm.trigger
from oslo.config import cfg

CONF = cfg.CONF
CONF.username="foo"
CONF.password="bar"
CONF.url="https://example.com/zabbix"


print zm.trigger.list(host="host.example.com",
                      priority="DISASTER",
                      omit_ack=True,)

Extending Functionality

The code allows to easily extend the functionality. To do so:

  1. Create a new Command inherited class that will handle the new functionality.

    • __init__(), where you will define the new action’s options.

    • run(), sets the work to be done.

  2. Add the brand new class to: commands.py > add_command_parsers()

There you go!

Project details


Download files

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

Source Distribution

zm-1.0.3.gdafc207.tar.gz (14.1 kB view details)

Uploaded Source

File details

Details for the file zm-1.0.3.gdafc207.tar.gz.

File metadata

  • Download URL: zm-1.0.3.gdafc207.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for zm-1.0.3.gdafc207.tar.gz
Algorithm Hash digest
SHA256 de1e512b80fee70c2eab7fb61452e03444aeba84028fc1f894179d39021f78de
MD5 4da964d297e89389e98c30a21af88f2d
BLAKE2b-256 7fbd2229362835199f939eb079e46639f27f94bdf3d7cb0eee5a60134cb18039

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page