Giter VIP home page Giter VIP logo

notify-by-opsgenie's Introduction

notify by opsgenie

A dead simple Opsgenie notification script for Check_MK Flexible Notifications

Installation

Put the script somewhere the nagios/monitoring user can reach. Ensure the script is executable.
If you run OMD you drop this script in ${OMD_ROOT}/local/share/check_mk/notifications/

git clone https://github.com/epleterte/notify-by-opsgenie.git
cp notify-by-opsgenie/opsgenie /omd/sites/<site>/local/share/check_mk/notifications/
chown <omd user>:<omd group> /omd/sites/<site>/local/share/check_mk/notifications/opsgenie

Next, add the user that will run the notification script to the opsgenie group. With OMD this is the site user/name:

gpasswd -a <omd user> opsgenie

The Nagios (OMD) user needs to be able to write to the log. We need the log to be group writeable:

chmod g+w /var/log/opsgenie/nagios2opsgenie.log

# if the file does not exist yet, you can do this
( cd /var/log/opsgenie && touch nagios2opsgenie.log && chown opsgenie:opsgenie nagios2opsgenie.log && chmod 664 nagios2opsgenie.log )

Usage

Create a new notification rule in WATO. Select Opsgenie as alert method from the dropdown menu.

The script has a few options. If none are specified whatever is set in /etc/opsgenie/conf/opsgenie-integration.conf will be used.

$ ./opsgenie -h
Usage: ./opsgenie [-h|-r|-t|-T]
  -h   Print Usage
  -r   Set recipient(s)
  -t   Set teams
  -T   Set tags

You can specify these as extra parameters in the WATO field to override i.e. recipients for given notification rules, i.e. -r team_database

This script is released under the BEER-WARE license :squirrel:

notify-by-opsgenie's People

Contributors

epleterte avatar

Stargazers

 avatar

Watchers

 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.