Make necessary configurations in OpenSearch Dashboards to synchronize OpenSearch alerts to Prometheus so you can use Prometheus to monitor and analyze key performance metrics for OpenSearch clusters in real time.
Prometheus is an open-source monitoring system with a dimensional data model, flexible query language, efficient time series database and modern alerting approach.
Only OpenSearch 2.19.0 clusters support alarm synchronization to Prometheus.
Parameter |
Description |
|---|---|
Name |
Custom channel name. |
Description |
Channel description. |
Channel type |
Select PROMETHEUS. |
Prometheus Endpoint |
Enter the Pushgateway address of the Prometheus monitor server.
|


Parameter |
Description |
|---|---|
Monitor details |
|
Monitor name |
User-defined monitor name |
Monitor type |
Monitor type, which can be:
In this example, Per query monitor is selected. For more information, see Monitors in the OpenSearch official documentation. |
Monitor defining method |
Monitor defining method. Extraction query editor is recommended.
The options of Monitor defining method are determined by the Monitor type you selected. |
Detector |
If Monitor defining method is set to Anomaly detector, select an exception detection task. |
Frequency |
Select the monitoring frequency and set the monitoring interval. The options include:
|
Select data |
|
Index |
When Monitor defining method is set to Visual editor or Extraction query editor, you need to specify the index to be monitored. |
Time field |
When Monitor defining method is set to Visual editor, you need to specify the time field to define counting parameters such as count. |
Query |
|
Metrics |
When Monitor defining method is set to Visual editor, you need to set the metrics range for extracting statistics. |
Time range for the last |
When Monitor defining method is set to Visual editor, you need to set the monitoring time range for plugins. |
Data filter |
When Monitor defining method is set to Visual editor, you need to set filters for data search. |
Group by |
When Monitor defining method is set to Visual editor, you need to specify a field so that each value of the field triggers an alarm. |
Define extraction query |
When Monitor defining method is set to Extraction query editor, you need to enter the query statement to define the monitoring. |
Request type |
When Monitor type is set to Per cluster metrics monitor, you need to specify the request type to monitor cluster metrics, such as the running status and CPU usage. |
Preview query and performance |
Preview the query result and verify query performance under the current configuration. |
Parameter |
Description |
|
|---|---|---|
Define trigger |
Trigger name |
User-defined trigger name. |
Severity level |
Sensitivity of a trigger, that is, the number of alarms that need to be triggered before an alarm message is sent. 1 indicates the highest sensitivity. |
|
Trigger condition |
Trigger condition. An alarm is triggered when the trigger condition is hit. NOTE:
You are advised to set a trigger condition that can almost always be triggered so that the queried metrics will always be synchronized to the Pushgateway. |
|
Configure actions |
Action name |
Trigger action name. |
Destination |
Select the destination created in 5. |
|
Message |
Defines the body of the message to be published, which must use the JSON format. See the following for an example. {
"metricsName":"hits_total_value", //Prometheus metric name
"metricsLabel": {"label_key1":"label_value1","label_key2":"label_value2"}, //Prometheus labels
"metricsValue":{{ctx.results.0.hits.total.value}}, //Prometheus metric values
"jobName":"job_name" //Prometheus monitor task name
"metricsHelp":"***" //Metric explanation. Optional.
}
|
|
throttling |
Message sending frequency. It limits the number of notification messages can be received in a specified period. For example, if this parameter is set to 10 minutes, Prometheus sends only one alert notification in the next 10 minutes even if the trigger condition is met multiple times. After 10 minutes, Prometheus sends another alert notification if the trigger condition is met again. |
|

As shown in Figure 4, Prometheus can receive a triggered message, meaning the trigger is set successfully.