Git Product home page Git Product logo

icinga2bot's Introduction

This is a work in progress. icinga2bot is a plugin for errbot that speaks to the Icinga2 API in order to relay messages to and from a chat channel.

Caveats

I have learned from users and my own experience that errbot has trouble with Python 3.5 on Ubuntu, and have not yet solved these problems.

Principal development has been done in Centos 7 with python 3.4 and Errbot version 4.1.3, moved to Errbot 5.1.2 on September 25, 2017. I am actively seeking volunteers to help test and port the plugin on other systems.

Requirements:

Centos 7 requirements:

  • Epel Repo in order to get Python 3.4
  • Epel packages: python34 python34-tools python34-devel
  • Compiler and libraries to build errbot: gcc, glibc-devel, libffi-devel, openssl-devel
  • As errbot user:
 virtualenv -p python3.4 err
 err/bin/pip install -U setuptools
 err/bin/pip install errbot

Installation Prerequisites

Plugin installation

  • Assuming your errbot installation directory is /home/errbot, clone or pull the icinga2bot files to /home/errbot/plugins
  • Copy the Icinga2 certificate file to /home/errbot/plugins
  • Edit icinga2bot.ini to match your configuration
  • Add the certificate and icinga2bot.ini to .gitignore, just in case

Starting the bot

If you have configures your bot according to http://errbot.io/en/latest/user_guide/setup.html, then you can start the bot with /path/to/my/virtualenv/bin/errbot --daemon and check that it has entered your chatroom. If the plugin has any errors on startup, those will be shown in stderr.

Using the bot

In channel, icinga2bot accepts the following commands:

  • !i2status will show a summary of the state of everything being monitored, e.g.
    HOSTS     323 Up; 7 Down; 4 Unreachable
    SERVICES  307 OK;  33 Critical; 3 Warning; 13 Unreachable; 1 Unknown
    Checks per minute:  108 hosts, 83 services, 271 database queries
  • !host hostname will show the up/down state of a single host

From the Icinga2 side, the bot will relay the following events to the chat channel:

  • State changes
  • Comments
  • Problem acknowledgments
  • Notifications sent to a mailing list
  • Downtime start, stop, and definition

The easiest way to test these features is to add or remove a comment from an existing host.

icinga2bot's People

Contributors

reikoneko avatar

Watchers

 avatar  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.