ansible_tools/prometheus/roles/prometheus_webhook_dingtalk/templates/conf/config.yml.j2

36 lines
1.1 KiB
Plaintext
Raw Normal View History

## Request timeout
# timeout: 5s
## Uncomment following line in order to write template from scratch (be careful!)
#no_builtin_template: true
## Customizable templates path
#templates:
# - contrib/templates/legacy/template.tmpl
templates:
- /etc/prometheus-webhook-dingtalk/templates/legacy/template.tmpl
## 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={{ alert.dingtalk.access_token }}
webhook_legacy:
url: https://oapi.dingtalk.com/robot/send?access_token={{ alert.dingtalk.access_token }}
# Customize template content
message:
# Use legacy template
title: '{{ alert.message.title }}'
text: '{{ alert.message.text }}'
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']