Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Wechat configuration #977

Merged
merged 3 commits into from
May 2, 2018
Merged

Conversation

simonpasquier
Copy link
Member

@simonpasquier simonpasquier commented Feb 20, 2018

Fixes #1005.


```yaml
# Whether or not to notify about resolved alerts.
[ send_resolved: <boolean> | default = true ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we sending resolved messages to a chat system?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be changed too.


# API request data as defined by the Wechat API.
[ message: <string> | default = '{{ template "wechat.default.message" . }}' ]
[ agent_id: <string> | default = '{{ template "wechat.default.agent_id" . }}' ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem right, this field isn't templated so why does it have that default?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, you're right.

Ping @stuartnelson3 @berlinsaint @songjiayang

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, in work WeChat, a agent_id means a chat room, so I think agent_id should be a categoric value, no need template, right ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I've got prometheus/alertmanager#1253 to remove those.


## `<wechat_config>`

Wechat notifications are sent via the [Wechat
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Wechat" -> "WeChat"

# Whether or not to notify about resolved alerts.
[ send_resolved: <boolean> | default = false ]

# The API key to use when talking to the Wechat API.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Wechat" -> "WeChat"

# The API key to use when talking to the Wechat API.
[ api_secret: <secret> | default = global.wechat_secret_url ]

# The Wechat API URL.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Wechat" -> "WeChat"

# The corp id for authentication
[ corp_id: <string> | default = global.wechat_api_corp_id ]

# API request data as defined by the Wechat API.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Wechat" -> "WeChat"

# The Wechat API URL.
[ api_url: <string> | default = global.wechat_api_url ]

# The corp id for authentication
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Period at end of comment line.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
@simonpasquier
Copy link
Member Author

@juliusv thanks for the review!

@stuartnelson3
Copy link
Contributor

I'll wait for @juliusv to approve/merge

@juliusv juliusv merged commit d1e0134 into prometheus:master May 2, 2018
@simonpasquier simonpasquier deleted the add-wechat-config branch May 3, 2018 07:28
aylei pushed a commit to aylei/docs that referenced this pull request Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants