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 alertmanager provider #258

Merged
merged 1 commit into from
Oct 19, 2021
Merged

Conversation

Alan01252
Copy link
Contributor

This commit adds the alertmanager provider. The provider adds some
generic labels based on the event which should be enough to configure
appropraite routes within alertmanager.

The alert is annotated with the message by default and optionally by the
summary field given in the event.

@stefanprodan stefanprodan added area/alerting Alerting related issues and PRs enhancement New feature or request labels Oct 11, 2021
@Alan01252 Alan01252 force-pushed the feature/alertmanager branch 2 times, most recently from 169f4a0 to 5ed5de8 Compare October 11, 2021 07:44
@Alan01252
Copy link
Contributor Author

Should be good now @stefanprodan apologies for the many rebases again...

docs/spec/v1beta1/provider.md Show resolved Hide resolved
docs/spec/v1beta1/provider.md Outdated Show resolved Hide resolved
@Alan01252 Alan01252 marked this pull request as draft October 11, 2021 12:28

| Label | Description |
| ----------- | ------------------------------------------------------------------------------ |
| alertname | The string FluxNotification |
Copy link
Member

Choose a reason for hiding this comment

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

I think the alertname should be the controller name set in event.ReportingController.

Copy link
Contributor Author

@Alan01252 Alan01252 Oct 11, 2021

Choose a reason for hiding this comment

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

I took inspiration from how other alertmanager alerts are configured in things like the KubePrometheus stack where the name of the alert is more akin to a description of the alert rather than the resource that triggered it

For example:

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think instead the report controller should be a label inside the alert rather than the alertname.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm ok so maybe the alertname should be the reason? FluxNotification doesn't seem ok to me.

Copy link
Contributor Author

@Alan01252 Alan01252 Oct 11, 2021

Choose a reason for hiding this comment

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

Perhaps add the reason to the word flux?

See how the thanos people have named theirs for example for the ThanosCompact component/app their rules look like.

image

So

FluxNotificationProgressing or FluxProgressing? or Flux(Kustomization|HelmRelease)Progressing?

Copy link
Member

Choose a reason for hiding this comment

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

Flux(Kustomization|HelmRelease)Progressing looks good to me 💯

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will push new commits probably tomorrow now, but this is what it looks like in alertmanager as an example.
I agree this is better than just FluxNotification :) ty
image

Copy link
Member

Choose a reason for hiding this comment

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

Nice! Thanks

@Alan01252 Alan01252 marked this pull request as ready for review October 12, 2021 07:14
@Alan01252
Copy link
Contributor Author

Hmm not sure why DCO is hanging now.

@Alan01252
Copy link
Contributor Author

Hmm not sure why DCO is hanging now.

tried another push seems to be still be busted...

@stefanprodan
Copy link
Member

The Probot DCO bot was down the whole day... it's back up now, please rebase with upstream and force push.

This commit adds the alertmanager provider. The provider adds some
generic labels based on the event which should be enough to configure
appropraite routes within alertmanager.

The alert is annotated with the message by default and optionally by the
summary field given in the event.

Signed-off-by: Alan Hollis <me@alanhollis.com>
@Alan01252
Copy link
Contributor Author

Done ty

@Alan01252
Copy link
Contributor Author

@stefanprodan just checking that there's nothing more you'd like me to do here? Happy to continue until we can get this merged :)

Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks @Alan01252 🎖️

@stefanprodan stefanprodan merged commit b1060df into fluxcd:main Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/alerting Alerting related issues and PRs enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants