0

I want to collect metrics from my opensearch

I've found this plugin https://github.com/aiven/prometheus-exporter-plugin-for-opensearch

but I have no idea how to connect it to my opensearch:

My current definition looks like this:

chart.yaml:

  - name: opensearch
    version: 1.8.0
    repository: https://opensearch-project.github.io/helm-charts/

values.yaml:

opensearch:
  plugins:
    enabled: true
    installList:
      - what should I write here ?

  addIndexedAt: true
  clusterName: ...
  masterService:...
  resources:
    requests:
      cpu: 500m
      memory: 1000Mi
    limits:
      cpu: 3000m
      memory: 2000Mi
  config:
    opensearch.yml: ...

Could you please help me how to connetc plugin to opensearch ?

gstackoverflow
  • 36,709
  • 117
  • 359
  • 710

1 Answers1

1

- what should I write here ?

Try specify the plugin download URL:

...
installList:
- "https://github.com/aiven/prometheus-exporter-plugin-for-opensearch/releases/download/2.1.0.0/prometheus-exporter-2.1.0.0.zip"
...

The url you passed gets to here for installation.

gohm'c
  • 13,492
  • 1
  • 9
  • 16
  • Do I have to do anything in addition ? register any service monitors ? – gstackoverflow Jul 21 '22 at 10:34
  • Yes, see [here](https://github.com/aiven/prometheus-exporter-plugin-for-opensearch#configure-the-prometheus-target). – gohm'c Jul 21 '22 at 10:38
  • Sorry, but full text searcg by word "monitor" doesn't give me any result – gstackoverflow Jul 21 '22 at 10:41
  • Why "search by word monitor" related to plugin installation and configure for scrape? – gohm'c Jul 21 '22 at 10:42
  • Because it is reply to my first commentary. – gstackoverflow Jul 21 '22 at 10:57
  • You need to configure your Prometheus to scrape the plugin endpoint as pointed out in the comment. Start another question if you are not familiar with how to configure Prometheus. – gohm'c Jul 21 '22 at 11:01
  • Maybe you are right. I am novice in such things. In my (short) experience some software responsible for metrics export provides internal service monitor configurable by values.yaml but I don't see it. In our architecture we use service monitors to let prometheus know about metrics – gstackoverflow Jul 21 '22 at 11:17
  • Opensearch as of now does not expose metrics in Prometheus format thus you will not find such settings in the values.yaml. You are probably referring to Prometheus operator ServiceMonitor; you can take a look [here](https://stackoverflow.com/questions/52991038/how-to-create-a-servicemonitor-for-prometheus-operator) how to create one. For now you should be able to do `curl http(s)://:9200/_prometheus/metrics` to check if the plugin is working as expected. – gohm'c Jul 21 '22 at 11:25
  • yes, /_prometheus/metrics works. Marked as resolved – gstackoverflow Jul 21 '22 at 12:07