Alerting: Docs feedback (#88125)

update OK to Normal label, matching instances to instances
This commit is contained in:
Gilles De Mey 2024-05-21 17:10:12 +02:00 committed by GitHub
parent 3e77768144
commit 8cc944f64f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 5 deletions

View File

@ -243,7 +243,7 @@ You can configure the alert instance state when its evaluation returns no data:
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| No Data | The default option. Sets alert instance state to `No data`. <br/> The alert rule also creates a new alert instance `DatasourceNoData` with the name and UID of the alert rule, and UID of the datasource that returned no data as labels. | | No Data | The default option. Sets alert instance state to `No data`. <br/> The alert rule also creates a new alert instance `DatasourceNoData` with the name and UID of the alert rule, and UID of the datasource that returned no data as labels. |
| Alerting | Sets alert instance state to `Alerting`. It waits until the [pending period](ref:pending-period) has finished. | | Alerting | Sets alert instance state to `Alerting`. It waits until the [pending period](ref:pending-period) has finished. |
| Ok | Sets alert instance state to `Normal`. | | Normal | Sets alert instance state to `Normal`. |
| Keep Last State | Maintains the alert instance in its last state. Useful for mitigating temporary issues, refer to [Keep last state](ref:keep-last-state). | | Keep Last State | Maintains the alert instance in its last state. Useful for mitigating temporary issues, refer to [Keep last state](ref:keep-last-state). |
You can also configure the alert instance state when its evaluation returns an error or timeout. You can also configure the alert instance state when its evaluation returns an error or timeout.
@ -252,7 +252,7 @@ You can also configure the alert instance state when its evaluation returns an e
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Error | The default option. Sets alert instance state to `Error`. <br/> The alert rule also creates a new alert instance `DatasourceError` with the name and UID of the alert rule, and UID of the datasource that returned no data as labels. | | Error | The default option. Sets alert instance state to `Error`. <br/> The alert rule also creates a new alert instance `DatasourceError` with the name and UID of the alert rule, and UID of the datasource that returned no data as labels. |
| Alerting | Sets alert instance state to `Alerting`. It waits until the [pending period](ref:pending-period) has finished. | | Alerting | Sets alert instance state to `Alerting`. It waits until the [pending period](ref:pending-period) has finished. |
| Ok | Sets alert instance state to `Normal`. | | Normal | Sets alert instance state to `Normal`. |
| Keep Last State | Maintains the alert instance in its last state. Useful for mitigating temporary issues, refer to [Keep last state](ref:keep-last-state). | | Keep Last State | Maintains the alert instance in its last state. Useful for mitigating temporary issues, refer to [Keep last state](ref:keep-last-state). |
## Create alerts from panels ## Create alerts from panels

View File

@ -462,7 +462,7 @@ describe('RuleList', () => {
expect(ruleDetails).toHaveTextContent('Expressiontopk ( 5 , foo ) [ 5m ]'); expect(ruleDetails).toHaveTextContent('Expressiontopk ( 5 , foo ) [ 5m ]');
expect(ruleDetails).toHaveTextContent('messagegreat alert'); expect(ruleDetails).toHaveTextContent('messagegreat alert');
expect(ruleDetails).toHaveTextContent('Matching instances'); expect(ruleDetails).toHaveTextContent('Instances');
// finally, check instances table // finally, check instances table
const instancesTable = byTestId('dynamic-table').get(ruleDetails); const instancesTable = byTestId('dynamic-table').get(ruleDetails);

View File

@ -13,7 +13,7 @@ type Props = Omit<SelectBaseProps<GrafanaAlertStateDecision>, 'options'> & {
const options: SelectableValue[] = [ const options: SelectableValue[] = [
{ value: GrafanaAlertStateDecision.Alerting, label: 'Alerting' }, { value: GrafanaAlertStateDecision.Alerting, label: 'Alerting' },
{ value: GrafanaAlertStateDecision.NoData, label: 'No Data' }, { value: GrafanaAlertStateDecision.NoData, label: 'No Data' },
{ value: GrafanaAlertStateDecision.OK, label: 'OK' }, { value: GrafanaAlertStateDecision.OK, label: 'Normal' },
{ value: GrafanaAlertStateDecision.Error, label: 'Error' }, { value: GrafanaAlertStateDecision.Error, label: 'Error' },
{ value: GrafanaAlertStateDecision.KeepLast, label: 'Keep Last State' }, { value: GrafanaAlertStateDecision.KeepLast, label: 'Keep Last State' },
]; ];

View File

@ -53,7 +53,7 @@ export const RuleDetails = ({ rule }: Props) => {
<RuleDetailsDataSources rulesSource={rulesSource} rule={rule} /> <RuleDetailsDataSources rulesSource={rulesSource} rule={rule} />
</div> </div>
</div> </div>
<DetailsField label="Matching instances" horizontal={true}> <DetailsField label="Instances" horizontal={true}>
<RuleDetailsMatchingInstances rule={rule} itemsDisplayLimit={INSTANCES_DISPLAY_LIMIT} /> <RuleDetailsMatchingInstances rule={rule} itemsDisplayLimit={INSTANCES_DISPLAY_LIMIT} />
</DetailsField> </DetailsField>
</div> </div>