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 --id flag to amtool silence query #3241

Merged
merged 1 commit into from
Feb 22, 2023

Conversation

sinkingpoint
Copy link
Contributor

In the Web UI, we have a UI to get information on a given silence through its ID. This functionality is missing from amtool however, leading to the necessity to pull all the silenced, and filter with grep or similar.

This commit adds in a --id flag to the silence query command, which allows specifying an ID to match on, matching the functionality of the Web UI.

Signed-off-by: sinkingpoint [email protected]

In the Web UI, we have a UI to get information on a given silence
through its ID. This functionality is missing from amtool however,
leading to the necessity to pull _all_ the silenced, and filter with
`grep` or similar.

This commit adds in a `--id` flag to the `silence query` command, which
allows specifying an ID to match on, matching the functionality of the Web UI.

Signed-off-by: sinkingpoint <[email protected]>
@gotjosh
Copy link
Member

gotjosh commented Feb 22, 2023

This looks great!

~> ./amtool --alertmanager.url=http://localhost:9093 silence --id 89809b26-fe30-4879-8a02-661a4420e086
ID                                    Matchers                    Ends At                  Created By  Comment  
89809b26-fe30-4879-8a02-661a4420e086  env="production" foo="bar"  2023-02-22 13:45:58 UTC  Josh        Hello  

Thank you very much for your contribution.

@gotjosh gotjosh merged commit a66692f into prometheus:main Feb 22, 2023
@gotjosh
Copy link
Member

gotjosh commented Feb 22, 2023

Opps - I merged too fast, wanted to approve first.

hoperays pushed a commit to hoperays/alertmanager that referenced this pull request Apr 23, 2023
In the Web UI, we have a UI to get information on a given silence
through its ID. This functionality is missing from amtool however,
leading to the necessity to pull _all_ the silenced, and filter with
`grep` or similar.

This commit adds in a `--id` flag to the `silence query` command, which
allows specifying an ID to match on, matching the functionality of the Web UI.

Signed-off-by: sinkingpoint <[email protected]>
radek-ryckowski pushed a commit to goldmansachs/alertmanager that referenced this pull request Nov 6, 2023
In the Web UI, we have a UI to get information on a given silence
through its ID. This functionality is missing from amtool however,
leading to the necessity to pull _all_ the silenced, and filter with
`grep` or similar.

This commit adds in a `--id` flag to the `silence query` command, which
allows specifying an ID to match on, matching the functionality of the Web UI.

Signed-off-by: sinkingpoint <[email protected]>
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.

2 participants