/zabbix-cachet

Python script which export Zabbix IT Services to Cachet

Primary LanguagePythonMIT LicenseMIT

Zabbix-Cachet

This is python script which provide synchronisation between Zabbix IT Services and Cachet

Description

The idea of Zabbix-Cachet is providing the easiest way to export Zabbix terms to Cachet. With this script you can maintain Cachet though Zabbix.

Zabbix-Cachet reads pre-configured Zabbix IT Services and automatically creates Cachet components. After that Zabbix-Cachet periodically checks Zabbix triggers (that linked to you IT Services) and manipulate with Cachet incidents and Component statuses based on triggers.

Features

  • Automatically creates Cachet Components and Components group
  • Automatically creates Cachet Incidents and update them with acknowleddgment messages
  • Allow to specify root IT service where Zabbix-Cachet will work

Example

Zabbix IT Services.

  • Cachet - root_service for zabbix-cachet script.
  • Bitbucket, Network Connectivity - parent services. They will be Components Groups in Cachet.
  • GIT https, GIT ssh - Components in Cachet. Do not forget to set Zabbix trigger to this group.

Zabbix IT Services

Cachet

Cachet Components

Requirements

  • Cachet 2.2
  • Zabbix 2.X (tested only 2.4), 3.0

Installation

Docker Installation

  1. Create /etc/zabbix-cachet.yml file based config-example.yml.
  2. Run Docker container
    docker run --name zabbix-cachet -v /etc/zabbix-cachet.yml:/config.yml qk4l/zabbix-cachet
    
  3. Drink a cup of tea (optional)

direct

  1. Clone this repository
  2. Rename config-example.yml to config.yml and fill a file with your settings.
  3. Install python libs from requirements.txt
  4. Launch zabbix-cachet.py

apt

  1. Add the BeryJu.org APT Repository:
wget -O - -q https://apt.beryju.org/public.key | apt-key add -
echo "deb http://apt.beryju.org/ stable beryjuorg" > /etc/apt/sources.list.d/beryjuorg.list
apt-get update -qq
  1. Install the package: apt-get install zabbix-cachet
  2. Configure it: nano /etc/zabbix-cachet.yml
  3. Restart it: systemctl enable zabbix-cachet && systemctl restart zabbix-cachet

Configuration

Settings are storing in config.yml file which should be placed in script's working directory. If you want to use another path for config.yml use CONFIG_FILE environment variable.