Giter Club home page Giter Club logo

teams_connector's Introduction

Icinga2 Microsoft Teams Connector

By Andrew Jaffie (ajaffie)

Description

This simple script makes use of the 'incoming webhook' connector in MS Teams. It will simply send a message stating that the server has either gone offline or online based on the last hard state of the host.

Requirements

Internet access, Python 3, and the requests package are required.

Installation

  1. Clone git repo:

    git clone https://github.com/ajaffie/teams_connector.git cd teams_connector git tag -l git checkout

  2. Create webhook(s) in desired MS Teams channels and add the urls to the urls list in config.json.

  3. For each webhook in config.json, either put a "*" to include all notifications for that channel, or list the servers you want notifications to be sent to that channel for. Optional: You can specify custom names for servers to use instead of "Server " in the messages. This is most useful for cases where the script executed automatically by a system such as Icinga or Nagios where the name specified is the internal name/FQDN and you want a more user-friendly message printed.

  4. Add NotificationCommand definition and Notification apply rules to your Icinga2/Nagios/etc. configurations.

  5. Stop cluttering your inbox and instead annoy everyone in MS Teams!

(A NotificationCommand definition is included, but you MUST change the path, as it uses a custom defined constant.)

teams_connector's People

Contributors

ajaffie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

teams_connector's Issues

Icinga2 with Director

I am trying to use this with Icinga2 and Director.

I created the incoming webhook URL in Teams and populated the json file with it.

I modified the python script to use my path to python and made it executable.. it runs at the terminal and wants -s -n etc..

I created a command in Director for the python script and passed the path and added the fields and arguments so config wise (in the preview) it looked pretty much exactly like your example conf.

I created the notification template and notification and tied them to user groups (cloned the existing working email notifications I have configured and modified the command etc..)

I trigger notifications and nothing seems to ever hit Teams.

What could I be missing here?

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.