opensearch-project / documentation-website

The documentation for OpenSearch, OpenSearch Dashboards, and their associated plugins.
https://opensearch.org/docs
Apache License 2.0
75 stars 495 forks source link

[DOC] Configuring a data source connection from Prometheus to OpenSearch. Add configuration in Docker container #3681

Open freesky15 opened 1 year ago

freesky15 commented 1 year ago

What do you want to do?

Tell us about your request. Provide a summary of the request and all versions that are affected.

What other resources are available? Provide links to related issues, POCs, steps for testing, etc.

Hello! Could you add information about how to configure datasource(Prometheus) in docker container(maybe how to configure using docker-compose)? Because the example in documentation doesn't work.

freesky15 commented 1 year ago

Here the link: https://opensearch.org/docs/latest/observing-your-data/prometheusmetrics/

Naarcha-AWS commented 1 year ago

Hi @freesky15. Do you have a response or error codes from when you tried to run the script?

freesky15 commented 1 year ago

Thanks for your feedback. I have no errors. I've tried to run the command

docker-compose exec os1 bash -c "/usr/share/opensearch/bin/opensearch-keystore add-file plugins.query.federation.datasources.config /usr/share/opensearch/datasources.json"

in the OpenSearch container. After that I've tried to seen the available metrics in Opensearch Dashboards in Observability but I haven't seen the metrics. My datasources.json file: { "name" : "my_prometheus", "connector": "prometheus", "properties" : { "prometheus.uri" : "http://prometheus:9090" } }