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.
dingtalk配置文件
~# cat /usr/local/prometheus-webhook-dingtalk/config.yml
## 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=2c12e095bf94e7fdde88cf3379023f800ecc26a44d25f3002a781e1cee825ad4
# secret for signature
secret: SEC01944594567bfc02c1888dacbdf8115b4b6725b39fa26bd300bd3455fdc20e3b
webhook_mention_all:
url: https://oapi.dingtalk.com/robot/send?access_token=2c12e095bf94e7fdde88cf3379023f800ecc26a44d25f3002a781e1cee825ad4
secret: SEC01944594567bfc02c1888dacbdf8115b4b6725b39fa26bd300bd3455fdc20e3b
mention:
all: true
webhook_mention_users:
url: https://oapi.dingtalk.com/robot/send?access_token=2c12e095bf94e7fdde88cf3379023f800ecc26a44d25f3002a781e1cee825ad4
mention:
mobiles: ['13618666666']