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
Contributor

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.

@Devp00l Devp00l added the dashboard label Mar 29, 2019

@Devp00l Devp00l requested review from LenzGr, tspmelo, votdev and alfonsomthd Mar 29, 2019

@votdev

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor Author

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 ;)

@s0nea s0nea added the needs-rebase label Apr 5, 2019

@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 Devp00l:wip-prometheus-silencing-current branch 2 times, most recently from 208776d to 95d9879 Apr 9, 2019

@s0nea s0nea removed the needs-rebase label Apr 10, 2019

@Devp00l

This comment has been minimized.

Copy link
Contributor Author

commented Apr 10, 2019

jenkins retest this please

@Devp00l Devp00l force-pushed the Devp00l:wip-prometheus-silencing-current branch from 95d9879 to 33b5add Apr 10, 2019

@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 Devp00l:wip-prometheus-silencing-current branch 2 times, most recently from f51039d to ea583cd Apr 18, 2019

@LenzGr LenzGr changed the title [AFTER #27274] mgr/dashboard: Silence Alertmanager alerts mgr/dashboard: Silence Alertmanager alerts May 6, 2019

@LenzGr LenzGr added needs-review needs-rebase and removed DNM labels May 6, 2019

@Devp00l Devp00l force-pushed the Devp00l:wip-prometheus-silencing-current branch from ea583cd to b29ea41 May 15, 2019

@Devp00l

This comment has been minimized.

Copy link
Contributor Author

commented May 16, 2019

jenkins retest this please

@alfonsomthd

This comment has been minimized.

Copy link
Contributor

commented May 17, 2019

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?

@Devp00l Devp00l added feature and removed needs-rebase labels May 17, 2019

@LenzGr

This comment has been minimized.

Copy link
Contributor

commented May 22, 2019

retest this please

Show resolved Hide resolved doc/mgr/dashboard.rst Outdated
@@ -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

This comment has been minimized.

Copy link
@callithea

callithea May 23, 2019

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

@p-na p-na reopened this May 29, 2019

@Devp00l Devp00l force-pushed the Devp00l:wip-prometheus-silencing-current branch 2 times, most recently from 5be4787 to 598c12e Jun 17, 2019

@Devp00l

This comment has been minimized.

Copy link
Contributor Author

commented Jun 18, 2019

jenkins test make check

@tspmelo tspmelo referenced this pull request Jul 3, 2019

Merged

mgr/dashboard: Update bootstrap from 3 to 4 #25188

2 of 2 tasks complete
mgr/dashboard: Add succeeded action labels
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 Devp00l:wip-prometheus-silencing-current branch 2 times, most recently from 340cf0a to 455a7fe Jul 3, 2019

@Devp00l Devp00l removed the needs-rebase label Jul 3, 2019

@Devp00l

This comment has been minimized.

Copy link
Contributor Author

commented Jul 3, 2019

Addressed all comments :)

@tspmelo

This comment has been minimized.

Copy link
Contributor

commented Jul 4, 2019

Please run npm run fix

Devp00l added some commits Feb 4, 2019

mgr/dashboard: Allow test selection overwrite
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>
mgr/dashboard: Silence Alertmanager alerts
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>
mgr/dashboard: Handle unset settings
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>
mgr/dashboard: Time diff service
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 Devp00l:wip-prometheus-silencing-current branch from 455a7fe to 3fb21de Jul 4, 2019

@Devp00l

This comment has been minimized.

Copy link
Contributor Author

commented Jul 4, 2019

Addressed all comments and using the icons enum now.

@tspmelo

tspmelo approved these changes Jul 5, 2019

@Devp00l

This comment has been minimized.

Copy link
Contributor Author

commented Jul 5, 2019

jenkins test dashboard

@votdev

votdev approved these changes Jul 5, 2019

@callithea

This comment has been minimized.

Copy link
Member

commented Jul 8, 2019

jenkins test dashboard

1 similar comment
@tspmelo

This comment has been minimized.

Copy link
Contributor

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

5 of 6 checks passed

ceph dashboard tests ceph dashboard tests failed
Details
Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants
You can’t perform that action at this time.