Commit d1e0134f authored by Simon Pasquier's avatar Simon Pasquier Committed by Julius Volz

Add Wechat configuration (#977)

* Add Wechat configuration
Signed-off-by: 's avatarSimon Pasquier <spasquie@redhat.com>

* Add more Wechat configuration options
Signed-off-by: 's avatarSimon Pasquier <spasquie@redhat.com>

* Address review comments
Signed-off-by: 's avatarSimon Pasquier <spasquie@redhat.com>
parent 64f1c74e
...@@ -88,6 +88,9 @@ global: ...@@ -88,6 +88,9 @@ global:
[ opsgenie_api_url: <string> | default = "https://api.opsgenie.com/" ] [ opsgenie_api_url: <string> | default = "https://api.opsgenie.com/" ]
[ hipchat_api_url: <string> | default = "https://api.hipchat.com/" ] [ hipchat_api_url: <string> | default = "https://api.hipchat.com/" ]
[ hipchat_auth_token: <secret> ] [ hipchat_auth_token: <secret> ]
[ wechat_api_url: <string> | default = "https://qyapi.weixin.qq.com/cgi-bin/" ]
[ wechat_api_secret: <secret> ]
[ wechat_api_corp_id: <string> ]
# The default HTTP client configuration # The default HTTP client configuration
[ http_config: <http_config> ] [ http_config: <http_config> ]
...@@ -279,6 +282,8 @@ webhook_configs: ...@@ -279,6 +282,8 @@ webhook_configs:
[ - <webhook_config>, ... ] [ - <webhook_config>, ... ]
victorops_configs: victorops_configs:
[ - <victorops_config>, ... ] [ - <victorops_config>, ... ]
wechat_configs:
[ - <wechat_config>, ... ]
``` ```
## `<email_config>` ## `<email_config>`
...@@ -578,3 +583,29 @@ endpoint: ...@@ -578,3 +583,29 @@ endpoint:
There is a list of There is a list of
[integrations](/docs/operating/integrations/#alertmanager-webhook-receiver) with [integrations](/docs/operating/integrations/#alertmanager-webhook-receiver) with
this feature. this feature.
## `<wechat_config>`
WeChat notifications are sent via the [WeChat
API](http://admin.wechat.com/wiki/index.php?title=Customer_Service_Messages).
```yaml
# Whether or not to notify about resolved alerts.
[ send_resolved: <boolean> | default = false ]
# The API key to use when talking to the WeChat API.
[ api_secret: <secret> | default = global.wechat_secret_url ]
# The WeChat API URL.
[ api_url: <string> | default = global.wechat_api_url ]
# The corp id for authentication.
[ corp_id: <string> | default = global.wechat_api_corp_id ]
# API request data as defined by the WeChat API.
[ message: <tmpl_string> | default = '{{ template "wechat.default.message" . }}' ]
[ agent_id: <string> | default = '{{ template "wechat.default.agent_id" . }}' ]
[ to_user: <string> | default = '{{ template "wechat.default.to_user" . }}' ]
[ to_party: <string> | default = '{{ template "wechat.default.to_party" . }}' ]
[ to_tag: <string> | default = '{{ template "wechat.default.to_tag" . }}' ]
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment