Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
OpenSearch Version : 2.16.0
OpenSearch Dashboard Version : 2.16.0
Browser : Firefox / 116.0
Describe the issue:
When i try the OpenSearch Dashboard alerting for Prometheus Metrics or Metrics Graph there are not working.
I have a Prometheus, OpenSearch and OpenSearch Dashboard.
So i open the OpenSearch Dashboard and i Go to the Dev tools the path of Dev tool is “OpenSearch Dashboard > Management > Dev Tools” and i open the Dev Tools.
And i run this below code for automatic make the Prometheus Data source.
POST _plugins/_query/_datasources
{
"name" : "my_prometheus",
"connector": "prometheus",
"properties" : {
"prometheus.uri" : "http://prometheus-server.default.svc.cluster.local:80"
},
"allowedRoles" : ["all_access"]
}
When i run this code i go to the Data Sources the path of Data Sources is “OpenSearch Dashboard > Management > Dashboard Management > Data Sources” there are add new Data source name is “my_prometheus”. this is the Image of Data source:
And than i see the Indexes the path of Indexes is “OpenSearch Dashboard > Management > Index Management > Indexes” and i see one indexes “.ql-Datasource” add one Document like below image :
And than i see the Metrics of “my_prometheus” the path of Metrics “OpenSearch Dashboard > Observability > Metrics” and select the Drop down Metrics Source “Prometheus” and there are lots of Prometheus metrics are open in Available Metrics like below image :
And than i see the Alerting and create a Monitor in Alerting the path of Create Monitor is “OpenSearch Dashboard > OpenSearch Plugins > Alerting > Monitors > Create Monitor” in the Form “Select Data” i select indexes “.ql-datasources” and i try the query for show all fields of “my_prometheus” but there are not any response see the below image :
Configuration:
I try this above way but there are not any solution for alerting with Prometheus Data source and indexes
And i want the metrics of “my_prometheus” cpu usage metrics “container_cpu_usage_seconds_total” is up to 500 than there are hits alerting me via mail or slack.