新增部署Prometheus监控工具脚本;更新README.md文件
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
## 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']
|
||||
@@ -0,0 +1,23 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
prometheus-webhook-dingtalk:
|
||||
image: {{ prometheus_webhook_dingtalk.image }}
|
||||
container_name: {{ docker.network.name }}-prometheus-webhook-dingtalk
|
||||
hostname: prometheus-webhook-dingtalk
|
||||
restart: always
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- {{ prometheus_webhook_dingtalk.dir.conf }}/config.yml:/etc/prometheus-webhook-dingtalk/config.yml
|
||||
- {{ prometheus_webhook_dingtalk.dir.template }}/template.tmpl:/etc/prometheus-webhook-dingtalk/templates/legacy/template.tmpl
|
||||
networks:
|
||||
- {{ docker.network.name }}
|
||||
ports:
|
||||
- {{ prometheus_webhook_dingtalk.port }}:8060
|
||||
environment:
|
||||
- config.file=/etc/prometheus-webhook-dingtalk/config.yml
|
||||
|
||||
networks:
|
||||
{{ docker.network.name }}:
|
||||
external: true
|
||||
name: {{ docker.network.name }}
|
||||
Reference in New Issue
Block a user