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

mgr/dashboard: Silence Alertmanager alerts #27277

Merged
merged 5 commits into from Jul 8, 2019

Conversation

Devp00l
Copy link

@Devp00l Devp00l commented Mar 29, 2019

Now you can silence alerts through the dashboard. You can now create,
recreate, edit and expire a silence. You can create a silence based on a
selected alert.

The silence form will help you create a silence that silences an alert.
It is provided with functionality to check if the silences, that
you are about to create, will or will not match an active alert or even
a rule.

It also provides help choosing the right values for the right chosen
matcher attribute name, through the use of type ahead values.

The dashboard will now use the Prometheus and the Alertmanager API

Fixes: https://tracker.ceph.com/issues/36722
Signed-off-by: Stephan Müller smueller@suse.com

create_from-edit-expire-recreate

This PR can be merged after #27274. It is not directly related but will cause merge conflicts.

@votdev
Copy link
Member

votdev commented Apr 1, 2019

Wow, that's a big PR. Is it by intention that this PR contains the code of another PR (i assume it's something with the back button)?

@Devp00l
Copy link
Author

Devp00l commented Apr 1, 2019

I only have the commits left that are in use to get it working in order to review the result in the first place. And I know it really big - but the most changes are tests ;)

@Devp00l Devp00l added the DNM label Apr 9, 2019
@Devp00l Devp00l changed the title mgr/dashboard: Silence Alertmanager alerts [AFTER #27274, #27348] mgr/dashboard: Silence Alertmanager alerts Apr 9, 2019
@Devp00l Devp00l force-pushed the wip-prometheus-silencing-current branch 2 times, most recently from 208776d to 95d9879 Compare April 9, 2019 11:24
@Devp00l
Copy link
Author

Devp00l commented Apr 10, 2019

jenkins retest this please

@Devp00l Devp00l force-pushed the wip-prometheus-silencing-current branch from 95d9879 to 33b5add Compare April 10, 2019 14:04
@Devp00l Devp00l changed the title [AFTER #27274, #27348] mgr/dashboard: Silence Alertmanager alerts [AFTER #27274] mgr/dashboard: Silence Alertmanager alerts Apr 18, 2019
@Devp00l Devp00l force-pushed the wip-prometheus-silencing-current branch 2 times, most recently from f51039d to ea583cd Compare April 18, 2019 15:56
@LenzGr LenzGr changed the title [AFTER #27274] mgr/dashboard: Silence Alertmanager alerts mgr/dashboard: Silence Alertmanager alerts May 6, 2019
@Devp00l Devp00l force-pushed the wip-prometheus-silencing-current branch from ea583cd to b29ea41 Compare May 15, 2019 11:43
@Devp00l
Copy link
Author

Devp00l commented May 16, 2019

jenkins retest this please

@alfonsomthd
Copy link
Contributor

Great work!

Just 1 observation:
When this notification appeared: "Please add your prometheus host to the dashboard configuration",
I did it, I created a silence, I clicked on "Recreate Silence" and the notification appeared again.
I canceled, I refreshed the dashboard (F5), I clicked again on "Recreate Silence" and this time
the notification didn't appear.
Is it possible to avoid the 2nd notification?

@LenzGr
Copy link
Contributor

LenzGr commented May 22, 2019

retest this please

doc/mgr/dashboard.rst Outdated Show resolved Hide resolved
@@ -523,18 +524,28 @@ twice if you use both sources.
configuration checkout the `<http_config> documentation
<https://prometheus.io/docs/alerting/configuration/#%3Chttp_config%3E>`_.

#. Use the API of the Prometheus Alertmanager
#. Use the API of the Prometheus and Alertmanager
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
#. Use the API of the Prometheus and Alertmanager
#. Use the API of Prometheus and the Alertmanager

@p-se p-se closed this May 29, 2019
@p-se p-se reopened this May 29, 2019
@Devp00l Devp00l force-pushed the wip-prometheus-silencing-current branch 2 times, most recently from 5be4787 to 598c12e Compare June 18, 2019 08:50
@Devp00l
Copy link
Author

Devp00l commented Jun 18, 2019

jenkins test make check

Succeeded action labels can be used in order to show the right tense
for a succeeded action in a success notification.

Fixes: https://tracker.ceph.com/issues/36722
Signed-off-by: Stephan Müller <smueller@suse.com>
@Devp00l Devp00l force-pushed the wip-prometheus-silencing-current branch 2 times, most recently from 340cf0a to 455a7fe Compare July 3, 2019 14:08
@Devp00l
Copy link
Author

Devp00l commented Jul 3, 2019

Addressed all comments :)

@tspmelo
Copy link
Contributor

tspmelo commented Jul 4, 2019

Please run npm run fix

Stephan Müller added 4 commits July 4, 2019 16:19
Now you can silence alerts through the dashboard. You can now create,
recreate, edit and expire a silence. You can create a silence based on a
selected alert.

The silence form will help you create a silence that silences an alert.
It is provided with functionality to check if the silences, that
you are about to create, will or will not match an active alert or even
a rule.

It also provides help choosing the right values for the right chosen
matcher attribute name, through the use of type ahead values.

The dashboard will now use the Prometheus and the Alertmanager API

Fixes: https://tracker.ceph.com/issues/36722
Signed-off-by: Stephan Müller <smueller@suse.com>
It's now easy to deal with unset settings.

Fixes: https://tracker.ceph.com/issues/36722
Signed-off-by: Stephan Müller <smueller@suse.com>
Currently it's not easily possible to mock a selection during table
action tests, that's why I added a method that is used to create the
selection that is used through out the table action scenario tests.
You can simply overwrite it to get a different base object as selection.

Fixes: https://tracker.ceph.com/issues/36722
Signed-off-by: Stephan Müller <smueller@suse.com>
The time diff service can easily calculate the difference between two
dates and print it out in a human readable duration format. It also can
calculate a end or start date based on a date and a duration string.

Fixes: https://tracker.ceph.com/issues/36722
Signed-off-by: Stephan Müller <smueller@suse.com>
@Devp00l Devp00l force-pushed the wip-prometheus-silencing-current branch from 455a7fe to 3fb21de Compare July 4, 2019 14:19
@Devp00l
Copy link
Author

Devp00l commented Jul 4, 2019

Addressed all comments and using the icons enum now.

@Devp00l
Copy link
Author

Devp00l commented Jul 5, 2019

jenkins test dashboard

@callithea
Copy link
Member

jenkins test dashboard

1 similar comment
@tspmelo
Copy link
Contributor

tspmelo commented Jul 8, 2019

jenkins test dashboard

@ceph ceph deleted a comment from tspmelo Jul 8, 2019
@ceph ceph deleted a comment from tspmelo Jul 8, 2019
@LenzGr LenzGr merged commit d613747 into ceph:master Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants