Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 2.9] [DOC] Add workflowIds parameter #6036

Merged
merged 1 commit into from
Jan 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 15 additions & 62 deletions _observing-your-data/alerting/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
---

## Create a query-level monitor
Introduced 1.0
{: .label .label-purple }

Query-level monitors run the query and check whether or not the results should trigger an alert. Query-level monitors can only trigger one alert at a time. For more information about query-level monitors and bucket-level monitors, see [Creating monitors]({{site.url}}{{site.baseurl}}/monitoring-plugins/alerting/monitors/).

Expand Down Expand Up @@ -256,7 +254,7 @@
}
```

If you want to specify a timezone, you can do so by including a [cron expression]({{site.url}}{{site.baseurl}}/monitoring-plugins/alerting/cron/) with a timezone name in the `schedule` section of your request.
If you want to specify a time zone, you can do so by including a [cron expression]({{site.url}}{{site.baseurl}}/monitoring-plugins/alerting/cron/) with a time zone name in the `schedule` section of your request.

The following example creates a monitor that runs at 12:10 PM Pacific Time on the 1st day of every month.

Expand Down Expand Up @@ -324,7 +322,7 @@
}
```

For a full list of time zone names, refer to [Wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). The alerting plugin uses the Java [TimeZone](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/TimeZone.html) class to convert a [`ZoneId`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZoneId.html) to a valid time zone.
For a full list of time zone names, refer to [Wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). The Alerting plugin uses the Java [TimeZone](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/TimeZone.html) class to convert a [`ZoneId`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZoneId.html) to a valid time zone.

Check failure on line 325 in _observing-your-data/alerting/api.md

View workflow job for this annotation

GitHub Actions / vale

[vale] _observing-your-data/alerting/api.md#L325

[OpenSearch.SubstitutionsError] Use 'time zone' instead of 'TimeZone'.
Raw output
{"message": "[OpenSearch.SubstitutionsError] Use 'time zone' instead of 'TimeZone'.", "location": {"path": "_observing-your-data/alerting/api.md", "range": {"start": {"line": 325, "column": 156}}}, "severity": "ERROR"}

---

Expand Down Expand Up @@ -731,10 +729,8 @@
{: .tip}

## Update monitor
Introduced 1.0
{: .label .label-purple }

When updating a monitor, you can optionally include `seq_no` and `primary_term` as URL parameters. If these numbers don't match the existing monitor or the monitor doesn't exist, the alerting plugin throws an error. OpenSearch increments the version number and the sequence number automatically (see the example response).
When updating a monitor, you can optionally include `seq_no` and `primary_term` as URL parameters. If these numbers don't match the existing monitor or the monitor doesn't exist, the Alerting plugin throws an error. OpenSearch increments the version number and the sequence number automatically (see the example response).

#### Request

Expand Down Expand Up @@ -909,8 +905,6 @@
---

## Get monitor
Introduced 1.0
{: .label .label-purple }

#### Request

Expand Down Expand Up @@ -983,8 +977,6 @@
---

## Monitor stats
Introduced 1.0
{: .label .label-purple }

Returns statistics about the alerting feature. Use `_plugins/_alerting/stats` to find node IDs and metrics. Then you can drill down using those values.

Expand Down Expand Up @@ -1174,8 +1166,6 @@
---

## Delete monitor
Introduced 1.0
{: .label .label-purple }

#### Request

Expand Down Expand Up @@ -1206,8 +1196,6 @@
---

## Search monitors
Introduced 1.0
{: .label .label-purple }

#### Request

Expand Down Expand Up @@ -1305,8 +1293,6 @@
---

## Run monitor
Introduced 1.0
{: .label .label-purple }

You can add the optional `?dryrun=true` parameter to the URL to show the results of a run without actions sending any message.

Expand Down Expand Up @@ -1339,8 +1325,6 @@
---

## Get alerts
Introduced 1.0
{: .label .label-purple }

Returns an array of all alerts.

Expand All @@ -1350,15 +1334,16 @@

| Parameter | Data type | Description
| :--- | :--- | :---
| `sortString` | String | Determines how to sort the results. Defaults to `monitor_name.keyword`.
| `sortOrder` | String | Determines the order of the results. Options are `asc` or `desc`. Defaults to `asc`.
| `missing` | String | Optional.
| `size` | String | Determines the size of the request to be returned. Defaults to `20`.
| `startIndex` | String | The index to start from. Used for paginating results. Defaults to `0`.
| `searchString` | String | A search string used to look for a specific alert. Defaults to an empty string.
| `severityLevel` | String | The severity level to filter for. Defaults to `ALL`.
| `alertState` | String | The alert state to filter for. Defaults to `ALL`.
| `sortString` | String | Defines how to sort the results. Default is `monitor_name.keyword`.
| `sortOrder` | String | Defines the order of the results. Options are `asc` or `desc`. Default is `asc`.
| `missing` | String | Specifies whether to include missing data in the response.
| `size` | String | Defines the size of the request to be returned. Default is `20`.
| `startIndex` | String | Defines the index to start from. Used for paginating results. Default is `0`.
| `searchString` | String | Defines the search string to use for searching a specific alert. Default is an empty string.
| `severityLevel` | String | Defines the severity level to filter for. Default is `ALL`.
| `alertState` | String | Defines the alert state to filter for. Default is `ALL`.
| `monitorId` | String | Filters by monitor ID.
| `workflowIds` | String | Allows for monitoring the status of chained alerts from multiple workflows within a single dashboard. Available in OpenSearch 2.9 or later.

#### Request

Expand Down Expand Up @@ -1425,8 +1410,6 @@
---

## Acknowledge alert
Introduced 1.0
{: .label .label-purple }

[After getting your alerts](#get-alerts), you can acknowledge any number of active alerts in one call. If the alert is already in an ERROR, COMPLETED, or ACKNOWLEDGED state, it appears in the `failed` array.

Expand Down Expand Up @@ -1454,8 +1437,6 @@
---

## Create destination
Introduced 1.0
{: .label .label-purple }

#### Requests

Expand Down Expand Up @@ -1532,10 +1513,8 @@
---

## Update destination
Introduced 1.0
{: .label .label-purple }

When updating a destination, you can optionally include `seq_no` and `primary_term` as URL parameters. If these numbers don't match the existing destination or the destination doesn't exist, the alerting plugin throws an error. OpenSearch increments the version number and the sequence number automatically (see the example response).
When updating a destination, you can optionally include `seq_no` and `primary_term` as URL parameters. If these numbers don't match the existing destination or the destination doesn't exist, the Alerting plugin throws an error. OpenSearch increments the version number and the sequence number automatically (see the example response).

#### Request

Expand Down Expand Up @@ -1582,8 +1561,6 @@
---

## Get destination
Introduced 1.0
{: .label .label-purple }

Retrieve one destination.

Expand Down Expand Up @@ -1629,8 +1606,6 @@
---

## Get destinations
Introduced 1.0
{: .label .label-purple }

Retrieve all destinations.

Expand Down Expand Up @@ -1676,8 +1651,6 @@
---

## Delete destination
Introduced 1.0
{: .label .label-purple }

#### Request

Expand Down Expand Up @@ -1707,8 +1680,6 @@
---

## Create email account
Introduced 1.0
{: .label .label-purple }

#### Request
```json
Expand Down Expand Up @@ -1741,10 +1712,8 @@
```

## Update email account
Introduced 1.0
{: .label .label-purple }

When updating an email account, you can optionally include `seq_no` and `primary_term` as URL parameters. If these numbers don't match the existing email account or the email account doesn't exist, the alerting plugin throws an error. OpenSearch increments the version number and the sequence number automatically (see the example response).
When updating an email account, you can optionally include `seq_no` and `primary_term` as URL parameters. If these numbers don't match the existing email account or the email account doesn't exist, the Alerting plugin throws an error. OpenSearch increments the version number and the sequence number automatically (see the example response).

#### Request
```json
Expand Down Expand Up @@ -1785,8 +1754,6 @@
```

## Get email account
Introduced 1.0
{: .label .label-purple }

#### Request
```json
Expand Down Expand Up @@ -1818,8 +1785,6 @@
```

## Delete email account
Introduced 1.0
{: .label .label-purple }

#### Request
```
Expand All @@ -1846,8 +1811,6 @@
```

## Search email account
Introduced 1.0
{: .label .label-purple }

#### Request

Expand Down Expand Up @@ -1914,8 +1877,6 @@
---

## Create email group
Introduced 1.0
{: .label .label-purple }

#### Request

Expand Down Expand Up @@ -1950,10 +1911,8 @@
```

## Update email group
Introduced 1.0
{: .label .label-purple }

When updating an email group, you can optionally include `seq_no` and `primary_term` as URL parameters. If these numbers don't match the existing email group or the email group doesn't exist, the alerting plugin throws an error. OpenSearch increments the version number and the sequence number automatically (see the example response).
When updating an email group, you can optionally include `seq_no` and `primary_term` as URL parameters. If these numbers don't match the existing email group or the email group doesn't exist, the Alerting plugin throws an error. OpenSearch increments the version number and the sequence number automatically (see the example response).

#### Request

Expand Down Expand Up @@ -1995,8 +1954,6 @@
```

## Get email group
Introduced 1.0
{: .label .label-purple }

#### Request
```json
Expand Down Expand Up @@ -2029,8 +1986,6 @@
```

## Delete email group
Introduced 1.0
{: .label .label-purple }

#### Request
```
Expand All @@ -2057,8 +2012,6 @@
```

## Search email group
Introduced 1.0
{: .label .label-purple }

#### Request

Expand Down
Loading