Giter Club home page Giter Club logo

prometheus-rocket-chat's Introduction

Rocket.Chat Integration for Prometheus Alertmanager

A Rocket.Chat webhook that receives Prometheus Alertmananager alerts, creates concise messages and routes them to the actual channel.

See https://rocket.chat/docs/administrator-guides/integrations/ for details on how to generate Rocket.Chat webhooks.

Message Format

Rocket.Chat messages produced by this webhook will have the following basic format (based on the keys in the Alertmanager request):

[annotations.severity OR status] annotations.summary
annotations.description

You are responsible to put all labels you would like to see into the summary or the description when you define the alert rules for Prometheus. The description is optional, leave it empty if it does not contain additional information.

You may optionally set the label rocketchat_channel in the alert rule to route a message to a custom channel.

Installation

Rocket.Chat

Login as admin user and go to: Administration => Integrations => New Integration => Incoming WebHook

Set "Enabled" and "Script Enabled" to "True".

Set channel, icons, etc. as you need.

Paste the contents of webhook.js into the Script field.

Create Integration. Copy the WebHook URL and proceed to Alertmanager.

Prometheus Alertmanager

Create a new receiver or modify config of existing one. You'll need to add webhooks_config to it. Small example:

route:
  receiver: rocketchat

receivers:
  - name: rocketchat
    webhook_configs:
      - send_resolved: true
        url: '${WEBHOOK_URL}'

Reload/restart Alertmanager.

Testing

To test the webhook, you may send a sample request to your Rocket.Chat instance:

curl -X POST -H 'Content-Type: application/json' --data-binary @sample-request.json [webhook-url]

License

prometheus-rocket-chat is released under the terms of the MIT License. Copyright 2019-2020 Puzzle ITC GmbH. See LICENSE for further information.

prometheus-rocket-chat's People

Contributors

codez 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.