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 support for adding alerts using amtool #1461

Merged

Conversation

bobmshannon
Copy link
Contributor

Closes #1417

cc @stuartnelson3

Signed-off-by: Bob Shannon <bshannon@palantir.com>
@bobmshannon bobmshannon force-pushed the bs/amtool_add_alert_support branch from 77f66c7 to b7b93b6 Compare July 10, 2018 18:14
Copy link
Contributor

@stuartnelson3 stuartnelson3 left a comment

Choose a reason for hiding this comment

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

Thanks for submitting! I'll give this a better look when I have a chance, I only did a quick look-through of the code.

cli/alert_add.go Outdated
}
}

err = alertAPI.Push(context.Background(), client.Alert{
Copy link
Contributor

Choose a reason for hiding this comment

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

You could just return alertAPI.Push() instead of setting it to err and then returning that.

@simonpasquier simonpasquier self-requested a review July 11, 2018 09:52
Signed-off-by: Bob Shannon <bshannon@palantir.com>
Copy link
Contributor

@stuartnelson3 stuartnelson3 left a comment

Choose a reason for hiding this comment

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

Did a couple manual tests, created and resolved alerts -- looks good. I'll wait a few days to see if @simonpasquier has any comments.

stuartnelson3 added a commit that referenced this pull request Jul 15, 2018
todo: add timeout support to alerts once #1461 is
merged.

Signed-off-by: Stuart Nelson <stuartnelson3@gmail.com>
@simonpasquier
Copy link
Member

👍 thanks for doing this!

@stuartnelson3 stuartnelson3 merged commit 50e2716 into prometheus:master Jul 16, 2018
gabreal pushed a commit to paritytech/alertmanager that referenced this pull request Jul 31, 2018
* Add support for adding alerts using amtool

Signed-off-by: Bob Shannon <bshannon@palantir.com>

* comment: Simplify return in addAlert

Signed-off-by: Bob Shannon <bshannon@palantir.com>
gabreal pushed a commit to paritytech/alertmanager that referenced this pull request Jan 28, 2019
* Add support for adding alerts using amtool

Signed-off-by: Bob Shannon <bshannon@palantir.com>

* comment: Simplify return in addAlert

Signed-off-by: Bob Shannon <bshannon@palantir.com>
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.

3 participants