[Alerting] Renames the "ES query" alert type to "Elasticsearch query" (#93584) (#93758)

Tweaks UX for 7.12
This commit is contained in:
Gidi Meir Morris 2021-03-05 13:54:29 +00:00 committed by GitHub
parent 3eb970d79f
commit 8994adc4c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 22 additions and 22 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 114 KiB

Before After
Before After

View file

@ -1,13 +1,13 @@
[role="xpack"]
[[alert-type-es-query]]
=== ES query
=== {es} query
The ES query alert type runs a user-configured {es} query, compares the number of matches to a configured threshold, and schedules actions to run when the threshold condition is met.
The {es} query alert type runs a user-configured {es} query, compares the number of matches to a configured threshold, and schedules actions to run when the threshold condition is met.
[float]
==== Create the alert
Fill in the <<defining-alerts-general-details, alert details>>, then select *ES query*.
Fill in the <<defining-alerts-general-details, alert details>>, then select *{es} query*.
[float]
==== Define the conditions
@ -19,7 +19,7 @@ image::user/alerting/images/alert-types-es-query-conditions.png[Five clauses def
Index:: This clause requires an *index or index pattern* and a *time field* that will be used for the *time window*.
Size:: This clause specifies the number of documents to pass to the configured actions when the the threshold condition is met.
ES query:: This clause specifies the ES DSL query to execute. The number of documents that match this query will be evaulated against the threshold
{es} query:: This clause specifies the ES DSL query to execute. The number of documents that match this query will be evaulated against the threshold
condition. Aggregations are not supported at this time.
Threshold:: This clause defines a threshold value and a comparison operator (`is above`, `is above or equals`, `is below`, `is below or equals`, or `is between`). The number of documents that match the specified query is compared to this threshold.
Time window:: This clause determines how far back to search for documents, using the *time field* set in the *index* clause. Generally this value should be set to a value higher than the *check every* value in the <<defining-alerts-general-details, general alert details>>, to avoid gaps in detection.
@ -27,7 +27,7 @@ Time window:: This clause determines how far back to search for documents, using
[float]
==== Add action variables
<<defining-alerts-actions-details, Add an action>> to run when the alert condition is met. The following variables are specific to the ES query alert. You can also specify <<defining-alerts-actions-variables, variables common to all alerts>>.
<<defining-alerts-actions-details, Add an action>> to run when the alert condition is met. The following variables are specific to the {es} query alert. You can also specify <<defining-alerts-actions-variables, variables common to all alerts>>.
`context.title`:: A preconstructed title for the alert. Example: `alert term match alert query matched`.
`context.message`:: A preconstructed message for the alert. Example: +
@ -55,9 +55,9 @@ Use the *Test query* feature to verify that your query DSL is valid.
match the query will be displayed.
+
[role="screenshot"]
image::user/alerting/images/alert-types-es-query-valid.png[Test ES query returns number of matches when valid]
image::user/alerting/images/alert-types-es-query-valid.png[Test {es} query returns number of matches when valid]
* An error message is shown if the query is invalid.
+
[role="screenshot"]
image::user/alerting/images/alert-types-es-query-invalid.png[Test ES query shows error when invalid]
image::user/alerting/images/alert-types-es-query-invalid.png[Test {es} query shows error when invalid]

View file

@ -270,7 +270,7 @@ export const EsQueryAlertTypeExpression: React.FunctionComponent<
<h5>
<FormattedMessage
id="xpack.stackAlerts.esQuery.ui.queryPrompt"
defaultMessage="Define the ES query"
defaultMessage="Define the Elasticsearch query"
/>
</h5>
</EuiTitle>
@ -281,7 +281,7 @@ export const EsQueryAlertTypeExpression: React.FunctionComponent<
label={
<FormattedMessage
id="xpack.stackAlerts.esQuery.ui.queryPrompt.label"
defaultMessage="ES query"
defaultMessage="Elasticsearch query"
/>
}
isInvalid={errors.esQuery.length > 0}
@ -290,7 +290,7 @@ export const EsQueryAlertTypeExpression: React.FunctionComponent<
<EuiLink href={docLinks.links.query.queryDsl} target="_blank">
<FormattedMessage
id="xpack.stackAlerts.esQuery.ui.queryPrompt.help"
defaultMessage="ES Query DSL documentation"
defaultMessage="Elasticsearch Query DSL documentation"
/>
</EuiLink>
}
@ -302,7 +302,7 @@ export const EsQueryAlertTypeExpression: React.FunctionComponent<
theme="github"
data-test-subj="queryJsonEditor"
aria-label={i18n.translate('xpack.stackAlerts.esQuery.ui.queryEditor', {
defaultMessage: 'ES query editor',
defaultMessage: 'Elasticsearch query editor',
})}
value={xJson}
onChange={(xjson: string) => {

View file

@ -15,7 +15,7 @@ export function getAlertType(): AlertTypeModel<EsQueryAlertParams> {
return {
id: '.es-query',
description: i18n.translate('xpack.stackAlerts.esQuery.ui.alertType.descriptionText', {
defaultMessage: 'Alert on matches against an ES query.',
defaultMessage: 'Alert on matches against an Elasticsearch query.',
}),
iconClass: 'logoElastic',
documentationUrl: (docLinks) => docLinks.links.alerting.esQuery,
@ -24,7 +24,7 @@ export function getAlertType(): AlertTypeModel<EsQueryAlertParams> {
defaultActionMessage: i18n.translate(
'xpack.stackAlerts.esQuery.ui.alertType.defaultActionMessage',
{
defaultMessage: `ES query alert '\\{\\{alertName\\}\\}' is active:
defaultMessage: `Elasticsearch query alert '\\{\\{alertName\\}\\}' is active:
- Value: \\{\\{context.value\\}\\}
- Conditions Met: \\{\\{context.conditions\\}\\} over \\{\\{params.timeWindowSize\\}\\}\\{\\{params.timeWindowUnit\\}\\}

View file

@ -48,7 +48,7 @@ export const validateExpression = (alertParams: EsQueryAlertParams): ValidationR
if (!esQuery) {
errors.esQuery.push(
i18n.translate('xpack.stackAlerts.esQuery.ui.validation.error.requiredQueryText', {
defaultMessage: 'ES query is required.',
defaultMessage: 'Elasticsearch query is required.',
})
);
} else {

View file

@ -17,7 +17,7 @@ describe('alertType', () => {
it('alert type creation structure is the expected value', async () => {
expect(alertType.id).toBe('.es-query');
expect(alertType.name).toBe('ES query');
expect(alertType.name).toBe('Elasticsearch query');
expect(alertType.actionGroups).toEqual([{ id: 'query matched', name: 'Query matched' }]);
expect(alertType.actionVariables).toMatchInlineSnapshot(`
@ -54,7 +54,7 @@ describe('alertType', () => {
"name": "index",
},
Object {
"description": "The string representation of the ES query.",
"description": "The string representation of the Elasticsearch query.",
"name": "esQuery",
},
Object {

View file

@ -30,7 +30,7 @@ export function getAlertType(
logger: Logger
): AlertType<EsQueryAlertParams, EsQueryAlertState, {}, ActionContext, typeof ActionGroupId> {
const alertTypeName = i18n.translate('xpack.stackAlerts.esQuery.alertTypeTitle', {
defaultMessage: 'ES query',
defaultMessage: 'Elasticsearch query',
});
const actionGroupName = i18n.translate('xpack.stackAlerts.esQuery.actionGroupThresholdMetTitle', {
@ -82,7 +82,7 @@ export function getAlertType(
const actionVariableContextQueryLabel = i18n.translate(
'xpack.stackAlerts.esQuery.actionVariableContextQueryLabel',
{
defaultMessage: 'The string representation of the ES query.',
defaultMessage: 'The string representation of the Elasticsearch query.',
}
);

View file

@ -2,7 +2,7 @@
directory in plugin: `server/alert_types/index_threshold`
The index threshold alert type is designed to run an ES query over indices,
The index threshold alert type is designed to run an Elasticsearch query over indices,
aggregating field values from documents, comparing them to threshold values,
and scheduling actions to run when the thresholds are met.
@ -91,7 +91,7 @@ scheduled against them independently).
The time window is set to 5 seconds. That means, every time the
alert runs it's queries (every second, in the example above), it will run it's
ES query over the last 5 seconds. Thus, the queries, over time, will overlap.
Elasticsearch query over the last 5 seconds. Thus, the queries, over time, will overlap.
Sometimes that's what you want. Other times, maybe you just want to do
sampling, running an alert every hour, with a 5 minute window. Up to the you!

View file

@ -83,7 +83,7 @@ describe('AlertingBuiltins Plugin', () => {
},
],
"id": ".es-query",
"name": "ES query",
"name": "Elasticsearch query",
}
`);

View file

@ -44,7 +44,7 @@ export const SolutionFilter: React.FunctionComponent<SolutionFilterProps> = ({
>
<FormattedMessage
id="xpack.triggersActionsUI.sections.alertForm.solutionFilterLabel"
defaultMessage="Filter by solution"
defaultMessage="Filter by use case"
/>
</EuiFilterButton>
}