From eae37490a846552278a396ebf9fb23af87b9640f Mon Sep 17 00:00:00 2001 From: Simon Pasquier Date: Tue, 20 Feb 2018 18:00:21 +0100 Subject: [PATCH 1/3] Add Wechat configuration Signed-off-by: Simon Pasquier --- content/docs/alerting/configuration.md | 31 ++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/content/docs/alerting/configuration.md b/content/docs/alerting/configuration.md index 5e41c0de4..9d156c29a 100755 --- a/content/docs/alerting/configuration.md +++ b/content/docs/alerting/configuration.md @@ -88,6 +88,9 @@ global: [ opsgenie_api_url: | default = "https://api.opsgenie.com/" ] [ hipchat_api_url: | default = "https://api.hipchat.com/" ] [ hipchat_auth_token: ] + [ wechat_api_url: | default = "https://qyapi.weixin.qq.com/cgi-bin/" ] + [ wechat_api_secret: ] + [ wechat_api_corp_id: ] # The default HTTP client configuration [ http_config: ] @@ -279,6 +282,8 @@ webhook_configs: [ - , ... ] victorops_configs: [ - , ... ] +wechat_configs: + [ - , ... ] ``` ## `` @@ -578,3 +583,29 @@ endpoint: There is a list of [integrations](/docs/operating/integrations/#alertmanager-webhook-receiver) with this feature. + +## `` + +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: | default = false ] + +# The API key to use when talking to the Wechat API. +[ api_secret: | default = global.wechat_secret_url ] + +# The Wechat API URL. +[ api_url: | default = global.wechat_api_url ] + +# The corp id for authentication +[ corp_id: | default = global.wechat_api_corp_id ] + +# API request data as defined by the Wechat API. +[ message: | default = '{{ template "wechat.default.message" . }}' ] +[ agent_id: ] +[ to_user: ] +[ to_party: ] +[ to_tag: ] +``` From 9c4dc94e696a9913e0f0c8f44c2e5a44f769052c Mon Sep 17 00:00:00 2001 From: Simon Pasquier Date: Fri, 16 Mar 2018 16:47:00 +0100 Subject: [PATCH 2/3] Add more Wechat configuration options Signed-off-by: Simon Pasquier --- content/docs/alerting/configuration.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/docs/alerting/configuration.md b/content/docs/alerting/configuration.md index 9d156c29a..90eead611 100755 --- a/content/docs/alerting/configuration.md +++ b/content/docs/alerting/configuration.md @@ -604,8 +604,8 @@ API](http://admin.wechat.com/wiki/index.php?title=Customer_Service_Messages). # API request data as defined by the Wechat API. [ message: | default = '{{ template "wechat.default.message" . }}' ] -[ agent_id: ] -[ to_user: ] -[ to_party: ] -[ to_tag: ] +[ agent_id: | default = '{{ template "wechat.default.agent_id" . }}' ] +[ to_user: | default = '{{ template "wechat.default.to_user" . }}' ] +[ to_party: | default = '{{ template "wechat.default.to_party" . }}' ] +[ to_tag: | default = '{{ template "wechat.default.to_tag" . }}' ] ``` From aab7d2b0f83e49c6d23592201581eeaa70b64c0e Mon Sep 17 00:00:00 2001 From: Simon Pasquier Date: Wed, 2 May 2018 10:02:57 +0200 Subject: [PATCH 3/3] Address review comments Signed-off-by: Simon Pasquier --- content/docs/alerting/configuration.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/content/docs/alerting/configuration.md b/content/docs/alerting/configuration.md index 90eead611..20a93849a 100755 --- a/content/docs/alerting/configuration.md +++ b/content/docs/alerting/configuration.md @@ -586,23 +586,23 @@ this feature. ## `` -Wechat notifications are sent via the [Wechat +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: | default = false ] -# The API key to use when talking to the Wechat API. +# The API key to use when talking to the WeChat API. [ api_secret: | default = global.wechat_secret_url ] -# The Wechat API URL. +# The WeChat API URL. [ api_url: | default = global.wechat_api_url ] -# The corp id for authentication +# The corp id for authentication. [ corp_id: | default = global.wechat_api_corp_id ] -# API request data as defined by the Wechat API. +# API request data as defined by the WeChat API. [ message: | default = '{{ template "wechat.default.message" . }}' ] [ agent_id: | default = '{{ template "wechat.default.agent_id" . }}' ] [ to_user: | default = '{{ template "wechat.default.to_user" . }}' ]