Skip to content

Conversation

@w0rm
Copy link
Member

@w0rm w0rm commented Apr 27, 2019

custom-grouping

Show alert groups from the alertmanager config by default and hide the custom grouping behind the checkbox.

  • If customGrouping is present in the url, then fetch alerts from the /alerts endpoint and group on the frontend
  • Otherwise (this is now the default) show alert groups from the /alerts/groups endpoint

closes #868

Andrey Kuzmin added 4 commits April 27, 2019 12:14
Signed-off-by: Andrey Kuzmin <andrey.kuzmin@soundcloud.com>
Signed-off-by: Andrey Kuzmin <andrey.kuzmin@soundcloud.com>
Signed-off-by: Andrey Kuzmin <andrey.kuzmin@soundcloud.com>
Signed-off-by: Andrey Kuzmin <andrey.kuzmin@soundcloud.com>
@w0rm w0rm force-pushed the default-grouping-in-ui branch from 77973c3 to 9ddadb8 Compare April 27, 2019 10:14
@w0rm w0rm requested a review from stuartnelson3 April 27, 2019 10:15
Andrey Kuzmin added 2 commits April 27, 2019 12:21
Signed-off-by: Andrey Kuzmin <andrey.kuzmin@soundcloud.com>
Signed-off-by: Andrey Kuzmin <andrey.kuzmin@soundcloud.com>
@w0rm w0rm force-pushed the default-grouping-in-ui branch from 372e38c to eb8345e Compare April 27, 2019 10:31
Signed-off-by: Andrey Kuzmin <andrey.kuzmin@soundcloud.com>
@w0rm
Copy link
Member Author

w0rm commented Apr 27, 2019

@stuartnelson3 I'm not sure why the circle ci tests are failing.

@stuartnelson3
Copy link
Contributor

Not sure, will take a look at it soon (probably Monday)

thanks for doing this!

@w0rm
Copy link
Member Author

w0rm commented Apr 29, 2019

@beorn7 does it make you happy? :D

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.

couple questions, but otherwise looks good

required:
- labels
- receiver
- alerts
Copy link
Contributor

Choose a reason for hiding this comment

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

thanks for fixing the openapi definition!

type alias Filter =
{ text : Maybe String
, group : Maybe String
, customGrouping : Bool
Copy link
Contributor

Choose a reason for hiding this comment

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

Whenever I look at boolean flags/query strings, I wonder if it would be better to have a concrete setting, like grouping=default or grouping=custom. It helps keep things from ballooning to ever larger sizes. For example, I'm not super thrilled with how I introduced silenced=true and inhibited=true, but I wasn't sure if it would be better or worse to have alert_state=silenced|inhibited.

Any thoughts on this? Stay with the boolean flag, or move use a groups query string? @mxinden @simonpasquier @w0rm

Copy link
Member Author

Choose a reason for hiding this comment

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

@stuartnelson3 I think the missing parameter should be the default. Because this is how you open it anyways. So grouping=default is not really needed.

@beorn7
Copy link
Member

beorn7 commented Apr 29, 2019

UI-wise, this looks good to me. Thank you very much. I haven't looked at the code.

One feature request (which might or might not already work) is to be able to deep-link one group (with the idea to link back to that group from a notification rather than to all alerts of the receiver, as we do it now). If that's not already possible, it could also be added in a later PR (perhaps backend changes are necessary). Just saying it so that we keep it in mind.

@stuartnelson3
Copy link
Contributor

One feature request (which might or might not already work) is to be able to deep-link one group (with the idea to link back to that group from a notification rather than to all alerts of the receiver, as we do it now). If that's not already possible, it could also be added in a later PR (perhaps backend changes are necessary). Just saying it so that we keep it in mind.

Yeah, we should be able to add the alert groups fingerprint to the response and "link" to it that way. There would be a few backend changes, nothing major, but enough to warrant a new pr. thanks for the reminder!

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.

Looks good to me! Will wait until thursday to see if @mxinden or @simonpasquier have something to say.

Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
@stuartnelson3 stuartnelson3 merged commit c63d4b7 into master Apr 30, 2019
@stuartnelson3 stuartnelson3 deleted the default-grouping-in-ui branch April 30, 2019 13:50
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.

Display "natural" grouping (and make groups linkable)

4 participants