GithubHelp home page GithubHelp logo

moreamazingnick / automatic_downtime Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mikesch-mp/automatic_downtime

0.0 0.0 0.0 15 KB

Icinga2 eventhandler Script to set an automatic downtime for a host and its services

License: GNU General Public License v2.0

Shell 100.00%

automatic_downtime's Introduction

automatic_downtime

Icinga2 eventhandler Script to set an automatic downtime for a host and its services

FAQ

  • This Script will set a downtime for your host and its services when the condition max_check_attempts -1 is met.
  • The DOWNTIME_AUTHOR must be a unique username that is not used anywhere (user object must not exist), removing downtimes are based on that username.
  • The eventhandler will run on the same host as the host check_command runs!
  • You can set a downtime length with the host variable vars.downtime_length. Keep in mind that the Icinga Director only store it as a string, so set it in seconds if you use Icinga Director.

Installation

  1. Copy the eventhandler-automatic-downtime.conf into your Icinga2 configuration folder.
  2. Copy the script automtic-downtime into your Icinga2 PluginDir.
  3. Edit automtic-downtime and edit these variables to fit your environment:
readonly DOWNTIME_AUTHOR="Automatic Downtime"
readonly API_HOST="localhost"
readonly API_PORT="5665"
readonly API_USERNAME="root"
readonly API_PASSWD="d6312b5777a8c8ba"
  1. Create a api user with the rights to set and remove downtimes.

Configuration

Enable event handler with enable_event_handler = true and event_command = "automatic-downtime" in your host object.
If you want a different downtime then 1 day, set the downtime length in seconds with vars.downtime_length = 3600.

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.