Giter VIP home page Giter VIP logo

lita-icinga2's Introduction

lita-icinga2

lita-icinga2 is a handler for Lita that allows interaction with Icinga monitoring solution. It listens for notifications on a HTTP endpoint.

Work is based upon lita-nagios handler.

Note: Colors in notifications are not enabled yet, because it relies completely on the adapter and no abstraction layer is implemented nor designed as of now.

Installation

Add lita-icinga2 to your Lita instance's Gemfile:

gem "lita-icinga2"

Configuration

HTTP interface

  • default_room (String) - Default chat room for notifications

Icinga commands

  • api - Icinga API URL
  • user - Icinga user with system commands authorization
  • pass - User password
  • verify_ssl - default: true

Example

Lita.configure do |config|
  config.handlers.icinga2.default_room = "#admin_room"
  config.handlers.icinga2.api = "http://icinga.example.com:5665"
  config.handlers.icinga2.user = "lita"
  config.handlers.icinga2.pass = "xxxx"
  config.handlers.icinga2.verify_ssl = true
end

Usage

Display notifications in channel

lita-icinga provides a HTTP endpoint to receive Icinga notifications:

POST /icinga2/notification

Request parameters must include those fields:

  • type - host or service
  • room - notifications destination (see default_room in configuration section)
  • host - Icinga' $HOSTNAME or $HOSTALIAS
  • output - Icinga' $HOSTOUTPUT or $SERVICEOUTPUT
  • state - Icinga' $HOSTSTATE or $SERVICESTATE
  • notificationtype - Icinga' $NOTIFICATIONTYPE
  • description - Icinga' $SERVICEDESC (only for service type)

see contrib/icinga2.txt for information how to enable and configure notification in icinga2

Available commands

lita: icinga2 recheck <-h | --host HOST> [-s | --service SERVICE] - Reschedule check for given host/service
lita: icinga2 ack(nowledge) <-h | --host HOST> [-s | --service SERVICE] [-m | --message MESSAGE] - Acknowledge host/service problem with optional message
lita: icinga2 unack(nowledge) <-h | --host HOST> <-s | --service SERVICE> - Remove acknowledge on host/service problem
lita: icinga2 list [-h | --host HOST] - List all checks (optional on specific host)

ToDo

lita: icinga2 enable notif(ication(s)) <-h | --host HOST> [-s | --service SERVICE] - Enable notifications for given host/service
lita: icinga2 disable notif(ication(s)) <-h | --host HOST> [-s | --service SERVICE] - Disable notifications for given host/service
lita: icinga2 (fixed|flexible) downtime <-d | --duration DURATION > <-h | --host HOST> [-s | --service SERVICE] - Schedule downtime for a host/service with duration units in (m, h, d, default to seconds)

lita-icinga2's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

lita-icinga2's Issues

Lita::Handlers::Icinga2 crashed.

Hi,
i saw your presentation on the icingacamp and now tried your bot for lita. I integrate lita in hipchat which worked fine. The icinga2 handler can connect to my api and response on my commands in hipchat.

But if i typed "lita icinga2 list" for example, i got an error in my logfile and did not getting any information back

Lita::Handlers::Icinga2 crashed. The exception was: no implicit conversion of String into Integer

I'm using Lita 4.7.0 and ruby ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-linux-gnu] on Ubuntu 15.

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.