We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When trying to create panels with alerts, Client.SetDashboard returns HTTP error 422: returns alert validation error: Panel id is not correct...
Client.SetDashboard
HTTP error 422: returns alert validation error: Panel id is not correct...
Below is how I created the Alert, I have filled in all the fields available.
Alert
resultAlert := sdk.Alert{ AlertRuleTags: map[string]string{}, Conditions: []sdk.AlertCondition{alertCondition}, ExecutionErrorState: panel.ExecutionErrorState, Frequency: DefaultAlert.Frequency, Handler: 1, Name: alertName, NoDataState: panel.NoDataState, Notifications: []sdk.AlertNotification{alertNotification}, Message: panel.AlertMessage, For: panel.ForDuration, }
Let me know if you require details regarding each of the variables.
I found this line in Grafana: https://github.com/grafana/grafana/blob/0124dc8e6b0fb6cd881bb51c98391f2efe203b78/pkg/models/alert.go#L93 Through some testing, I found that adding a PanelID field to Alert in panel.go, then assigning a value to it fixes the problem.
PanelID
panel.go
May I know if this is indeed what should be added to the Alert struct or am I using it wrong?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When trying to create panels with alerts,
Client.SetDashboard
returnsHTTP error 422: returns alert validation error: Panel id is not correct...
Below is how I created the
Alert
, I have filled in all the fields available.Let me know if you require details regarding each of the variables.
I found this line in Grafana: https://github.com/grafana/grafana/blob/0124dc8e6b0fb6cd881bb51c98391f2efe203b78/pkg/models/alert.go#L93
Through some testing, I found that adding a
PanelID
field toAlert
inpanel.go
, then assigning a value to it fixes the problem.May I know if this is indeed what should be added to the
Alert
struct or am I using it wrong?The text was updated successfully, but these errors were encountered: