• Stars
    star
    798
  • Rank 57,078 (Top 2 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created about 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

DingTalk integration for Prometheus Alertmanager

prometheus-webhook-dingtalk

Build Status Go Report Card Docker Pulls

Generating DingTalk notification from Prometheus AlertManager WebHooks.

Install

Precompiled binaries

Precompiled binaries for released versions are available in release page: It's always recommended to use latest stable version available.

Docker

You can deploy this tool using the Docker image from following registry:

Building from Source

Prerequisites

  1. Go (1.17 or greater is required)
  2. Nodejs

Build

Clone the repository and build manually:

make build

Building the Docker Image

In order to build the docker image locally (linux/amd64), you can use the following commands:

make promu
promu crossbuild -p linux/amd64   #  Or $(go env GOPATH)/bin/promu crossbuild -p linux/amd64
make common-docker-amd64

Usage

usage: prometheus-webhook-dingtalk [<flags>]

Flags:
  -h, --help                    Show context-sensitive help (also try --help-long and --help-man).
      --web.listen-address=:8060
                                The address to listen on for web interface.
      --web.enable-ui           Enable Web UI mounted on /ui path
      --web.enable-lifecycle    Enable reload via HTTP request.
      --config.file=config.yml  Path to the configuration file.
      --log.level=info          Only log messages with the given severity or above. One of: [debug, info, warn, error]
      --log.format=logfmt       Output format of log messages. One of: [logfmt, json]
      --version                 Show application version.

For Kubernetes users, check out ./contrib/k8s.

Configuration

常见问题可以看看 FAQ

## Request timeout
# timeout: 5s

## Customizable templates path
# templates:
#   - contrib/templates/legacy/template.tmpl

## You can also override default template using `default_message`
## The following example to use the 'legacy' template from v0.3.0
# default_message:
#   title: '{{ template "legacy.title" . }}'
#   text: '{{ template "legacy.content" . }}'

## Targets, previously was known as "profiles"
targets:
  webhook1:
    url: https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxxxxx
    # secret for signature
    secret: SEC000000000000000000000
  webhook2:
    url: https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxxxxx
  webhook_legacy:
    url: https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxxxxx
    # Customize template content
    message:
      # Use legacy template
      title: '{{ template "legacy.title" . }}'
      text: '{{ template "legacy.content" . }}'
  webhook_mention_all:
    url: https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxxxxx
    mention:
      all: true
  webhook_mention_users:
    url: https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxxxxx
    mention:
      mobiles: ['156xxxx8827', '189xxxx8325']

More Repositories

1

OmniMarkupPreviewer

Sublime Text 2&3 plugin to live preview markup files, supported (not limited to) markup formats are markdown, reStructuredText, WikiCreole and textile.
Python
499
star
2

SublimeAStyleFormatter

SublimeAStyleFormatter is a code formatter/beautifier for Sublime Text 2 & 3. It provides ability to format C/C++/C#/Java files.
Python
280
star
3

uwsgi_exporter

uWSGI metrics exporter for prometheus.io
Go
66
star
4

cyksuid

Fast Python implementation of KSUID (K-Sortable Globally Unique IDs) using Cython
Python
37
star
5

ding2wechat

钉钉机器人到企业微信机器人转发器
Go
30
star
6

sxsdiff

Side by side diff for python
Python
17
star
7

loggercheck

A linter for logr,klog,zap that can also works with golangci-lint as a plugin
Go
13
star
8

ScalaFormat

Yet another Scala code formatter for Sublime Text.
Python
13
star
9

elasticsearch-discovery-ecs

Aliyun ECS unicast discovery plugin for Elasticsearch
Java
9
star
10

astyle-mirror

[Unofficial] mirror of astyle (http://astyle.sourceforge.net)
C++
8
star
11

pyastyle

astyle library as a python module
Python
8
star
12

libao

[Mirror] Cross Platform Audio Output Library http://xiph.org/ao/
C
8
star
13

vscode-ansible-autocomplete

TypeScript
6
star
14

smart-table-improved

Collection of useful widgets for the smart-table
JavaScript
6
star
15

dbr

Additions to Go's database/sql for super fast performance and convenience. (fork of gocraft/dbr, Go 1.8+)
Go
6
star
16

python27-rpm

Shell
5
star
17

jaeger-client-python-contrib

Python
5
star
18

SublimeAlternate

SublimeAlternate is a simple working in progress plugin for Sublime Text 2. It provides simple ways to alternate files (like swithing .c to .h) by keyboard shortcuts quickly.
Python
4
star
19

todolint

Go
3
star
20

k8sutils

Go
2
star
21

webpack-angular-gettext

TypeScript
2
star
22

grpc_with_gevent_will_screw_you

Python
1
star
23

wasm-limit-size-filter

Proxy-Wasm Request/Response Size Limit Filter
Rust
1
star
24

undisposition-addon

Removes Content-Disposition: attachment HTTP header to allow view files instead of downloading them. Extension icon acts as toggle.
TypeScript
1
star
25

foo_uie_wsh_panel_mod

Automatically exported from code.google.com/p/foo-wsh-panel-mod
C++
1
star
26

alauda-pipeline-cover

Go
1
star
27

dotfiles

dotfiles managed by chezmoi
Shell
1
star
28

vagrant-rabbit-clusters

Shell
1
star
29

logrlint

(Archived) Please use https://github.com/timonwong/loggercheck instead
Go
1
star