mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 15:42:13 +08:00
ui(alerting): Add NeedHelp
section for the Missing series evaluations to resolve
setting (#105456)
* ui(alerting): Add NeedHelpInfo UI for `Missing series evaluations` setting * Run `make i18n-extract` * fix URL linke
This commit is contained in:
@ -371,30 +371,62 @@ export function GrafanaEvaluationBehaviorStep({
|
|||||||
label={t('alerting.alert.missing-series-resolve', 'Missing series evaluations to resolve')}
|
label={t('alerting.alert.missing-series-resolve', 'Missing series evaluations to resolve')}
|
||||||
description={t(
|
description={t(
|
||||||
'alerting.alert.description-missing-series-evaluations',
|
'alerting.alert.description-missing-series-evaluations',
|
||||||
'How many consecutive evaluation intervals with no data for a dimension must pass before the alert state is considered stale and automatically resolved. If no value is provided, the value will default to 2.'
|
'The number of consecutive evaluation intervals a dimension must be missing before the alert instance becomes stale, and is then automatically resolved and evicted. Defaults to 2 if empty.'
|
||||||
)}
|
)}
|
||||||
invalid={!!errors.missingSeriesEvalsToResolve?.message}
|
invalid={!!errors.missingSeriesEvalsToResolve?.message}
|
||||||
error={errors.missingSeriesEvalsToResolve?.message}
|
error={errors.missingSeriesEvalsToResolve?.message}
|
||||||
className={styles.inlineField}
|
className={styles.inlineField}
|
||||||
htmlFor="missing-series-resolve"
|
htmlFor="missing-series-resolve"
|
||||||
>
|
>
|
||||||
<Input
|
<Stack direction="row" gap={0.5} alignItems="center">
|
||||||
placeholder={t(
|
<Input
|
||||||
'alerting.grafana-evaluation-behavior-step.missing-series-resolve-placeholder',
|
placeholder={t(
|
||||||
'Default: 2'
|
'alerting.grafana-evaluation-behavior-step.missing-series-resolve-placeholder',
|
||||||
)}
|
'Default: 2'
|
||||||
id="missing-series-resolve"
|
)}
|
||||||
{...register('missingSeriesEvalsToResolve', {
|
id="missing-series-resolve"
|
||||||
pattern: {
|
{...register('missingSeriesEvalsToResolve', {
|
||||||
value: /^\d+$/,
|
pattern: {
|
||||||
message: t(
|
value: /^\d+$/,
|
||||||
'alerting.grafana-evaluation-behavior-step.message.must-be-a-positive-integer',
|
message: t(
|
||||||
'Must be a positive integer.'
|
'alerting.grafana-evaluation-behavior-step.message.must-be-a-positive-integer',
|
||||||
),
|
'Must be a positive integer.'
|
||||||
},
|
),
|
||||||
})}
|
},
|
||||||
width={21}
|
})}
|
||||||
/>
|
width={21}
|
||||||
|
/>
|
||||||
|
<NeedHelpInfo
|
||||||
|
contentText={
|
||||||
|
<>
|
||||||
|
<p>
|
||||||
|
{t(
|
||||||
|
'alerting.alert-missing-evaluations-to-stale.help-info.text1',
|
||||||
|
'An alert instance is considered stale if the alert rule query returns data, but the specific dimension (or series) for that alert instance is missing for several consecutive evaluation intervals.'
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
{t(
|
||||||
|
'alerting.alert-missing-evaluations-to-stale.help-info.text2',
|
||||||
|
'A stale alert instance is resolved and then evicted.'
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
{t(
|
||||||
|
'alerting.alert-missing-evaluations-to-stale.help-info.text3',
|
||||||
|
'This setting defines how many consecutive evaluation intervals must pass without data before an alert instance is considered stale. Defaults to 2 if empty.'
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
externalLink={
|
||||||
|
'https://grafana.com/docs/grafana/latest/alerting/fundamentals/alert-rule-evaluation/stale-alert-instances/'
|
||||||
|
}
|
||||||
|
linkText={t(
|
||||||
|
'alerting.alert-missing-evaluations-to-stale.help-info.link-text',
|
||||||
|
`Read more about stale alert instances`
|
||||||
|
)}
|
||||||
|
title={t('alerting.alert-missing-evaluations-to-stale.help-info.title', 'Stale alert instances')}
|
||||||
|
/>
|
||||||
|
</Stack>
|
||||||
</Field>
|
</Field>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
@ -165,7 +165,7 @@ export const Details = ({ rule }: DetailsProps) => {
|
|||||||
value={missingSeriesEvalsToResolve}
|
value={missingSeriesEvalsToResolve}
|
||||||
tooltipValue={t(
|
tooltipValue={t(
|
||||||
'alerting.alert.description-missing-series-evaluations',
|
'alerting.alert.description-missing-series-evaluations',
|
||||||
'How many consecutive evaluation intervals with no data for a dimension must pass before the alert state is considered stale and automatically resolved. If no value is provided, the value will default to 2.'
|
'The number of consecutive evaluation intervals a dimension must be missing before the alert instance becomes stale, and is then automatically resolved and evicted. Defaults to 2 if empty.'
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
@ -352,7 +352,7 @@
|
|||||||
"alert": {
|
"alert": {
|
||||||
"alert-state": "Alert state",
|
"alert-state": "Alert state",
|
||||||
"annotations": "Annotations",
|
"annotations": "Annotations",
|
||||||
"description-missing-series-evaluations": "How many consecutive evaluation intervals with no data for a dimension must pass before the alert state is considered stale and automatically resolved. If no value is provided, the value will default to 2.",
|
"description-missing-series-evaluations": "The number of consecutive evaluation intervals a dimension must be missing before the alert instance becomes stale, and is then automatically resolved and evicted. Defaults to 2 if empty.",
|
||||||
"evaluation": "Evaluation",
|
"evaluation": "Evaluation",
|
||||||
"evaluation-paused": "Alert evaluation currently paused",
|
"evaluation-paused": "Alert evaluation currently paused",
|
||||||
"evaluation-paused-description": "Notifications for this rule will not fire and no alert instances will be created until the rule is un-paused.",
|
"evaluation-paused-description": "Notifications for this rule will not fire and no alert instances will be created until the rule is un-paused.",
|
||||||
@ -450,6 +450,15 @@
|
|||||||
"silence-notifications": "Silence notifications",
|
"silence-notifications": "Silence notifications",
|
||||||
"with-modifications": "With modifications"
|
"with-modifications": "With modifications"
|
||||||
},
|
},
|
||||||
|
"alert-missing-evaluations-to-stale": {
|
||||||
|
"help-info": {
|
||||||
|
"link-text": "Read more about stale alert instances",
|
||||||
|
"text1": "An alert instance is considered stale if the alert rule query returns data, but the specific dimension (or series) for that alert instance is missing for several consecutive evaluation intervals.",
|
||||||
|
"text2": "A stale alert instance is resolved and then evicted.",
|
||||||
|
"text3": "This setting defines how many consecutive evaluation intervals must pass without data before an alert instance is considered stale. Defaults to 2 if empty.",
|
||||||
|
"title": "Stale alert instances"
|
||||||
|
}
|
||||||
|
},
|
||||||
"alert-recording-rule-form": {
|
"alert-recording-rule-form": {
|
||||||
"evaluation-behaviour": {
|
"evaluation-behaviour": {
|
||||||
"description": {
|
"description": {
|
||||||
|
Reference in New Issue
Block a user