Giter VIP home page Giter VIP logo

zbx's Introduction

zbx

Zabbix command line interface Python2.7 & Python3.5 tested

Sponsor

Developed with the support and help of BlaBlaCar.

BlaBlaCar is trusted community marketplace that connects drivers with empty seats to passengers looking for a ride. Hoping to give them an effective tool

Requirement

Install

Example based on a debian linux box.

Python2

For test & dev

  • Install pip apt-get install python-pip
  • Upgrade pip easy_install -U pip
  • Install ConfigParser pip install ConfigParser
  • Install Logging pip install logging
  • Rename config.ini.example to config.ini
  • Add server url, login and password in config.ini
  • Run pip3 install --editable .

Easy way

  • run python2 setup.py install

Python3

For test & dev

  • Install python 3 apt-get install python3
  • Install pip3 apt-get install python3-pip
  • Upgrade pip3 easy_install3 -U pip
  • Rename config.ini.example to config.ini
  • Add server url, login and password in config.ini
  • Run pip3 install --no-cache-dir --editable .

Easy way

  • run python3 setup.py install

Configuration

Default

  • Look config.ini.example for example
  • Create a config.ini like config.ini.example

Option

  • Set environment variable ZBX_CONF_FILE with the config name file

Tests

Install Test

  • run cd ~ + wich zbx
  • run zbx --versionfrom any where in your filesystem tree

Dev Test

  • Install pytest pip3 search pytest
  • Install pytest-cov pip3 install pytest-cov
  • Run pytest zbx_test.py --cov=zbx.py

Python2

  • pip install pytest
  • pip install pytest-cov
  • Run pytest test.py --cov=zbx.py

Python3

  • pip3 install pytest
  • pip3 install pytest-cov
  • Run pytest test.py --cov=zbx.py

Command

  • zbx group list : List all server group in the zabbix server
  • zbx group show GROUP_NAME: List every host in a specific group
  • zbx alert list : All alert currently up
  • zbx alert history : List all reported issues with a alert send to current user
  • zbx alert ack EVEN-ID MESSAGE : Acknowledge a alert
  • zbx host add FQDN : Delete a host in zabbix server (FQDN must be a true record dns)
  • zbx host del FQDN : Delete a host in zabbix server
  • zbx host notemplate : List all host without template (and thus not monitored)
  • zbx host template FQDN : List templates for a particular host
  • zbx host linktemplate FQDN TEMPLATE : Link particular template to particular host
  • zbx maintenance add FQDN DURATION : Create a dedicated maintenance for a particular host
  • zbx maintenance del FQDN DURATION : Delete a dedicated maintenance for a particular host
  • zbx maintenance list : List all maintenance present, expired or not
  • zbx maintenance gc : Delete all expired ("Active till date time" is exceeded) maintenance
  • zbx monitor enable FQDN : Enable monitoring for a host in zabbix server
  • zbx monitor disable FQDN : Disable monitoring for a host in zabbix server
  • zbx unmonitored : List all host with monitoring disable in zabbix server
  • zbx items get ITEM.KEY --group GROUP_NAME: List the last item value for the item.key provided for all host in a group
  • zbx items get ITEM.KEY --host HOST : List the last item value for the item.key provided for the host

zbx's People

Contributors

karlesnine avatar fredprod avatar bonidier avatar

Stargazers

Simon Bouchex-Bellomie avatar  avatar Alain Tiemblo avatar Antares Tupin avatar  avatar  avatar Jaco Engelbrecht avatar

Watchers

 avatar James Cloos avatar Jean Baptiste Favre avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.