Alerting: Change default alert state to Error on execution error or timeout (#55345)

This commit is contained in:
George Robinson 2022-09-19 10:42:04 +01:00 committed by GitHub
parent 96b032e103
commit 4a1ca7e32f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -294,7 +294,7 @@ describe('RuleEditor', () => {
grafana_alert: { grafana_alert: {
condition: 'B', condition: 'B',
data: getDefaultQueries(), data: getDefaultQueries(),
exec_err_state: 'Alerting', exec_err_state: 'Error',
no_data_state: 'NoData', no_data_state: 'NoData',
title: 'my great new rule', title: 'my great new rule',
}, },
@ -447,7 +447,7 @@ describe('RuleEditor', () => {
namespace_id: 1, namespace_id: 1,
condition: 'B', condition: 'B',
data: getDefaultQueries(), data: getDefaultQueries(),
exec_err_state: GrafanaAlertStateDecision.Alerting, exec_err_state: GrafanaAlertStateDecision.Error,
no_data_state: GrafanaAlertStateDecision.NoData, no_data_state: GrafanaAlertStateDecision.NoData,
title: 'my great new rule', title: 'my great new rule',
}, },
@ -505,7 +505,7 @@ describe('RuleEditor', () => {
uid, uid,
condition: 'B', condition: 'B',
data: getDefaultQueries(), data: getDefaultQueries(),
exec_err_state: 'Alerting', exec_err_state: 'Error',
no_data_state: 'NoData', no_data_state: 'NoData',
title: 'my great new rule', title: 'my great new rule',
}, },

View File

@ -56,7 +56,7 @@ export const getDefaultFormValues = (): RuleFormValues => {
queries: [], queries: [],
condition: '', condition: '',
noDataState: GrafanaAlertStateDecision.NoData, noDataState: GrafanaAlertStateDecision.NoData,
execErrState: GrafanaAlertStateDecision.Alerting, execErrState: GrafanaAlertStateDecision.Error,
evaluateEvery: '1m', evaluateEvery: '1m',
evaluateFor: '5m', evaluateFor: '5m',