Giter Site home page Giter Site logo

tmb's Introduction

TMB

https://travis-ci.org/tdf/tmb.svg?branch=master https://coveralls.io/repos/tdf/tmb/badge.svg?branch=master&service=github

TMB is a Telegram Bot to send monitoring notifications, typically from an Icinga or Nagios installation to Telegram users.

Installation

For the moment, TMB is not available in the Python Package Index, so you have to use github as source. TMB requires Python 3 and uses some advanced features for concurrent programming from the great asyncio lib, so at least Python 3.4 is needed.

To install directly from github, first install pip, git and then run this command as root:

pip3 install git+git://github.com/tdf/tmb@master

Configuration

First of all, talk to Botfather. Start creating a new bot by issuing the command /newbot and following the instructions.

Create the file ~/.config/tmb/tmb.ini that will hold the configuration, with the following contents:

[global]
host = 127.0.0.1
port = 64321
password = changeme #replace by the password required to register at your bot
token = invalid #replace by the token you got from BotFather

Next is to run the tmb command, and thats it!

Usage

Tell your users to talk to the Bot you've just created, you can also send them links to https://telegram.me/YourBotName. They should use the /register command and then send the password needed for registration

To send notifications to your registered users, use nc as follows:

/bin/echo -e "$NOTIFICATIONTYPE$\nHost: $HOSTALIAS$\nService: $SERVICEDESC$\nState: $SERVICESTATE$\nInfo: $SERVICEOUTPUT$" | nc localhost 64321

tmb's People

Contributors

awerner avatar

Watchers

 avatar Robert Einsle avatar  avatar Thorsten Behrens avatar Erich avatar andreasma avatar James Cloos avatar  avatar

Forkers

bell-kevin

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.