weaveworks / grafanalib

Python library for building Grafana dashboards
Apache License 2.0
1.86k stars 309 forks source link

ALERTRULE_STATE_DATA_NODATA contains incorrect value for AlertRulev9 #601

Open andreas-aman opened 1 year ago

andreas-aman commented 1 year ago

What you expected to happen?

I expect the AlertRule to contain correct value for no_data_state

What happened?

When I use ALERTRULE_STAT_DATA_NODATA and upload the alertgroup it returns the following error

{"message":"invalid rule specification at index [0]: unknown NoData state option No Data","traceID":""}%

How to reproduce it?

Create an AlertRulev9 with noDataAlertState=ALERTRULE_STAT_DATA_NODATA and upload it to grafana.

verti9 commented 11 months ago

ValueError: could not upload alert. failed with status code: 500. message: unknown NoData state option No Data

Still getting the above error when alert is created using AlertRulev9. Can you please test and merge this MR to fix this issue?