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

Grafana alerts #111

Merged
merged 26 commits into from
Oct 22, 2023
Merged

Grafana alerts #111

merged 26 commits into from
Oct 22, 2023

Conversation

mirii1994
Copy link
Contributor

In this PR:

  • Add support for Grafana Alert Rule API.

@mirii1994 mirii1994 requested a review from yotamloe October 16, 2023 07:35
Copy link
Contributor

@yotamloe yotamloe left a comment

Choose a reason for hiding this comment

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

Amazing! few minor comments, for your considiration

deleteGrafanaAlertServiceSuccess = http.StatusNoContent
// NOTE: the grafana api returns 204 even when you try to delete with a uid that doesn't exist,
// so the following line is just for compatibility with the CallLogzioApi object
deleteGrafanaAlertNotFound = http.StatusNotFound
Copy link
Contributor

Choose a reason for hiding this comment

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

Value duplication in delete get list crate update may be worth unifying those. Not critical for your consideration :)


const (
getGrafanaAlertServiceUrl = grafanaAlertServiceEndpoint + "/%s"
getGrafanaAlertServiceMethod = http.MethodGet
Copy link
Contributor

Choose a reason for hiding this comment

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

Value duplication in get list may be worth unifying those. Not critical for your consideration :)

const (
listGrafanaAlertServiceUrl = grafanaAlertServiceEndpoint
listGrafanaAlertServiceMethod = http.MethodGet
listGrafanaAlertServiceSuccess = http.StatusOK
Copy link
Contributor

Choose a reason for hiding this comment

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

Value duplication in get list update may be worth unifying those. Not critical for your consideration :)

@mirii1994 mirii1994 merged commit 252bb97 into master Oct 22, 2023
1 check passed
@mirii1994 mirii1994 deleted the grafana_alerts branch October 22, 2023 09:23
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