Add Exporter Plugin to Opensearch

Hi Gnarly,

A quick question: which Elasticsearch exporter do you compare it to? It does not sound to me that you are actually comparing OpenSearch exporter to GitHub - vvanholl/elasticsearch-prometheus-exporter: Prometheus exporter plugin for Elasticsearch but to some other implementation (perhaps to a “side-car” exporter).

Let me have a look at your input and I will get back to you.

Lukáš

1 Like

Hi Gnarly,

in the meantime I am going to add new config for nodes filter option so that you can get all metrics from a single node as well.

Lukáš

Hi @GnarlyCapricorne,

Prometheus exporter for OpenSearch 1.3.0 has been just released (see Prometheus exporter plugin 1.3.0.0 released!).
It brings some new features, specifically, it allows to configure “nodes filter” settings. I think you might be interested in this feature. Please see release notes for more details.

Regards,
Lukáš

1 Like

based on the description i’m pretty sure this exporter here was meant:

which is not an ES plugin but a standalone component talking to ES APIs:

Hi,
Is there any documentation to build this project https://github.com/aparo/opensearch-prometheus-exporter from source code ?

Hi Manoj,

We have a documentation on how to build the prometheus exporter plugin from the source in this repo:
https://github.com/aiven/prometheus-exporter-plugin-for-opensearch#build-from-source

I believe similar approach should be possible with the Alberto’s repo as well.
BTW, are you trying to build the plugin for OpenSearch 1.x version or more recent one?

Regards,
Lukáš

Hi Lukas,
I’m trying to build the plugin for OpenSearch 1.2.4
And does building this project requires JDK 14 ?
And can I use latest gradle (7.4.2) in my local to build this ?

This is what I tried.
Used JDK 14 and Gradle 7.4.2. Got this below error while executing “gradle clean”

FAILURE: Build failed with an exception.

* Where:
Build file '/local/opensearch-prometheus-exporter/build.gradle' line: 35

* What went wrong:
A problem occurred evaluating root project 'prometheus-exporter'.
> Failed to apply plugin class 'org.opensearch.gradle.info.GlobalBuildInfoPlugin'.
   > Could not create plugin of type 'GlobalBuildInfoPlugin'.
      > Could not generate a decorated class for type GlobalBuildInfoPlugin.
         > org/gradle/jvm/toolchain/JavaInstallation

Used JDK 14 and Gradle 6.8. Executing “gradle clean init wrapper” successfully created gradlew file in local.
Got this below error while executing “./gradlew build”

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':dependencyLicenses'.
> Licences dir /local/opensearch-prometheus-exporter/licenses does not exist, but there are dependencies: simpleclient-0.8.0.jar
  simpleclient_common-0.8.0.jar

Manually created licenses directory and tried again.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':dependencyLicenses'.
> Missing SHA for simpleclient-0.8.0.jar. Run "gradle updateSHAs" to create them

Then, tried “gradle updateSHAs && ./gradlew build”. Now I’m getting this error.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':dependencyLicenses'.
> Missing LICENSE for simpleclient-0.8.0.jar, expected in simpleclient-LICENSE.txt

Hi @lukas-vlcek @aparo ,

Any update on this ?
Building OpenSearch Exporter from it’s source code.

Thanks and Regards,
Manoj

Hi Majon,

please notice that my availability during the next week will be limited. I will probably get back to this thread on next Tuesday.

Thanks for understanding,
Lukáš

For me it wont work with Opensearch v2.0.1

sh-4.2$ ./bin/opensearch-plugin install -b https://github.com/aparo/opensearch-prometheus-exporter/releases/download/1.2.3/prometheus-exporter-1.2.3.zip
-> Installing https://github.com/aparo/opensearch-prometheus-exporter/releases/download/1.2.3/prometheus-exporter-1.2.3.zip
-> Downloading https://github.com/aparo/opensearch-prometheus-exporter/releases/download/1.2.3/prometheus-exporter-1.2.3.zip
-> Failed installing https://github.com/aparo/opensearch-prometheus-exporter/releases/download/1.2.3/prometheus-exporter-1.2.3.zip
-> Rolling back https://github.com/aparo/opensearch-prometheus-exporter/releases/download/1.2.3/prometheus-exporter-1.2.3.zip
-> Rolled back https://github.com/aparo/opensearch-prometheus-exporter/releases/download/1.2.3/prometheus-exporter-1.2.3.zip
Exception in thread "main" java.lang.IllegalArgumentException: Plugin [prometheus-exporter] was built for OpenSearch version 1.2.3 but version 2.0.1 is running

oke so Aiven’s plugin does work, Aparo’s does not since it’s not maintained.

@lukas-vlcek Hello to others I will write in Czech because it will be much easier for me to understand.
Ahoj, mám rozjetý Opensearch ve verzi 1.3.3, mám dva clustery, jeden tří nodový testovací, kde mám všechny nody se všemi rolemi a pak mám produkční kde mám 3 master, 3 ingest,data,hot nody a 3 data,warm nody. Mám ty stroje monitorované Node exporterem, ale kvůli heapu a lepšímu monitorování aplikace bych rád měl ještě tento prometheus-exporter.
Opensearch mi běží v docker-composu.
Stáhnul jsem si odsud zip

Jaké mám možnosti instalace prosím? Je možnost že bych ho připojil do docker-compose yamlu aby startoval automaticky se zapnutím dockeru a nebo to musím instalovat tak, že si ten zip natáhnu dovnitř do kontejneru a tam budu spouštět (asi ručně?) pomocí
./bin/opensearch-plugin install -b prometheus-exporter-1.3.3.zip
A máte svůj dashboard nebo v grafaně pak mohu použít např. tento?

Translated by google:
Hello, I have Opensearch in version 1.3.3 running, I have two clusters, one three-node test, where I have all nodes with all roles, and then I have a production one where I have 3 master, 3 ingest, data, hot nodes and 3 data, warm nodes. I have those machines monitored by Node exporter, but for heap and better application monitoring, I would like to have this prometheus-exporter.
Opensearch is running for me in docker-compos.
I downloaded the zip from here

What are my installation options please? Is it possible to connect it to docker-compose yaml so that it starts automatically when docker is turned on, or I have to install it by pulling the zip inside the container and starting it there (perhaps manually?) using
./bin/opensearch-plugin install -b prometheus-exporter-1.3.3.zip
And do you have your dashboard or can I use, for example, this one in grafana?