Giter Site home page Giter Site logo

g2ww's Introduction

Code based on https://github.com/n0vad3v/g2ww. After modification, an alarm trigger metric is added to the message content.

G2WW (Grafana 2 Wechat Work)

Proxy Grafana Webhook alert to WeChat Work.

Grafana doesn't support push alert to WeChat Work(企业微信) by it's design, this is a small adapter for supporting this.

Build g2ww

go build -o g2ww.linux *.go

Then g2ww will listen on localhost:2408, quite simple isn't it?

Run g2ww

Run g2ww on server, it will listen on http://127.0.0.1:2408 by default, keep it running in background (systemd or screen?).

Let Nginx to proxy it

Like this:

server {
        listen 80;
        server_name g2ww.nova.moe;

        location / {
            proxy_pass http://127.0.0.1:2408;
        }
}

Create a Wechat Work Bot

Create a Wechat Work Bot and get the webhook address.

For instance, the webhook address is https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=e28dde4c-1998-0002-0018-114514114514.

Configure Grafana

In the configuration above, we need to specify the address like this:

https://g2ww.nova.moe/e28dde4c-1998-0002-0018-114514114514

Demo

Quite simple, isn't it?

g2ww's People

Watchers

James Cloos 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.