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

How to get Alert of Prometheus metrics in OpenSearch Dashboard? #2076

Open
Ommkwn2001 opened this issue Aug 16, 2024 · 4 comments
Open

How to get Alert of Prometheus metrics in OpenSearch Dashboard? #2076

Ommkwn2001 opened this issue Aug 16, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Ommkwn2001
Copy link

Ommkwn2001 commented Aug 16, 2024

Describe the bug

When i try the OpenSearch Dashboard alerting for Prometheus Metrics or Metrics Graph there are not working.
The Indexes are not working in the Alerting Create Monitor.

To Reproduce
Steps to reproduce the behavior:

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:

dataso

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 :

OpenInde

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 :

Metrics

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 :

alert2

I try this above way but there are not any solution for alerting with Prometheus Data source and indexes

Expected behavior
A clear and concise description of what you expected to happen.

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.

OpenSearch Version
OpenSearch Version : 2.16.0

Dashboards Version
Dashboard Version : 2.16.0

Plugins

opensearch-alerting
opensearch-anomaly-detection
opensearch-asynchronous-search
opensearch-cross-cluster-replication
opensearch-custom-codecs
opensearch-flow-framework
opensearch-geospatial
opensearch-index-management
opensearch-job-scheduler
opensearch-knn
opensearch-ml
opensearch-neural-search
opensearch-notifications
opensearch-notifications-core
opensearch-observability
opensearch-performance-analyzer
opensearch-reports-scheduler
opensearch-security
opensearch-security-analytics
opensearch-skills
opensearch-sql
query-insights

Host/Environment (please complete the following information):

  • Browser and version [e.g. 22]
  • Browser : Firefox
  • Browser Version : 116.0
@Ommkwn2001 Ommkwn2001 added bug Something isn't working untriaged labels Aug 16, 2024
@LDrago27
Copy link

@opensearch-project/admin move it to dashboards-observability

@gaiksaya gaiksaya transferred this issue from opensearch-project/OpenSearch-Dashboards Aug 20, 2024
@vinylen
Copy link

vinylen commented Aug 28, 2024

I am also wondering how to actually use any of the metrics in Prometheus after we've created the datasource in OpenSearch. For example, we want to use it for Anomaly Detection.

@dblock
Copy link
Member

dblock commented Sep 9, 2024

[Catch All Triage - 1, 2, 3, 4, 5]

@dblock dblock removed the untriaged label Sep 9, 2024
@dblock
Copy link
Member

dblock commented Sep 9, 2024

@Ommkwn2001 want to try to ask about this on the public slack in #observability, and turn it into a feature request if it's not possible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants