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

Provisioning dashboard with alert rules should create alerts #11247

Closed
marefr opened this issue Mar 14, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@marefr
Copy link
Member

commented Mar 14, 2018

Provisioning of a dashboard that has alert rule(s) fails with an invalid alert data error. Reported in #11227

Similar, when creating a new dashboard that has alert rule(s) it should be possible to save that without failure with invalid alert data error.

@jeremyjpj0916

This comment has been minimized.

Copy link

commented Mar 17, 2018

Looking forward to this fix up, currently am making all dashboards with no alarms and configuring them manually due to this bug. Have the JSON with the alarm data ready once fixed to swap over though!(Granted if the fix does not change the alarm json data format from how it currently looks lol).

-Jeremy

@bergquist bergquist modified the milestones: 5.1, 5.0.4 Mar 28, 2018

daniellee added a commit that referenced this issue Mar 28, 2018

dashboard: allow alerts to be saved for new/provisioned dashboards
This changes the logic for the alert validation in the extractor. Validation
is executed twice, once before attempting to save the alerts and once after
saving the dashboard while saving the alerts to the db. The first validation
will not require that the alert has a dashboard id which allows new dashboards
with alerts to be saved.

Fixes #11247

daniellee added a commit that referenced this issue Mar 28, 2018

dashboard: allow alerts to be saved for new/provisioned dashboards
This changes the logic for the alert validation in the extractor. Validation
is executed twice, once before attempting to save the alerts and once after
saving the dashboard while saving the alerts to the db. The first validation
will not require that the alert has a dashboard id which allows new dashboards
with alerts to be saved.

Fixes #11247

(cherry picked from commit 68833fa)
@jeremyjpj0916

This comment has been minimized.

Copy link

commented Apr 7, 2018

Ooo So is this fixed now? I can use the API to create dashboards with the Alerts built into the json? Can any dev that made the change speak on if the format of the JSON Alert resource changed any during the fix or will I be able to use the same JSON? Going to test it asap if possible!

EDIT - Just tested with my prior dashboards I had stored via json that had alerts embedded in them and it worked! Super stoked yall found some time to fix this, Grafana Team rules!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.