Skip to content

feat: add alerting #138

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

Merged
merged 3 commits into from
Oct 18, 2023
Merged

feat: add alerting #138

merged 3 commits into from
Oct 18, 2023

Conversation

Duologic
Copy link
Member

@Duologic Duologic commented Oct 10, 2023

Fixes #69

This PR provides an interface to create Alerting provisioning resources with Grafonnet. I personally don't know if we have a client that can actually do something with these JSON resources but at least we have one part of the puzzle this way.

The Grafonnet API is modelled after the Terraform provider resources. The contactPoint schema is under development so we can't offer that in Grafonnet properly yet.

The schema's for these resources come from the Grafana OpenAPI spec, this opens the door to add more resources that are described in this specification.

As always I tend to make this reviewable commit-by-commit. First commit is the actual code for the generator, the other two are generating the code and docs.

Copy link
Member

@iainlane iainlane 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

wonder if it would be good to make the experimental state of the API more explicit in the type names or something --- or is the whole thing still considered to be subject to change?

},
},

// Add isPaused to ProvisionedAlertRule, this is missing in v9.4.0
Copy link
Member

Choose a reason for hiding this comment

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

do these fixups have issues upstream? be good to include references

Copy link
Member Author

Choose a reason for hiding this comment

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

This is for v9.4.0, so not bothering, schema fixes have generally not been backported in grafana/grafana.

@Duologic
Copy link
Member Author

wonder if it would be good to make the experimental state of the API more explicit in the type names or something --- or is the whole thing still considered to be subject to change?

The whole library is still marked as experimental, the note is just there to say 'we know this is incomplete'.

@Duologic
Copy link
Member Author

rebased

@Duologic Duologic merged commit b8f5ba5 into main Oct 18, 2023
@Duologic Duologic deleted the duologic/alerting branch October 18, 2023 14:04
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.

Adding Alert Provisioning
2 participants