{“error”:“no handler found for uri [/_prometheus/metrics] and method [GET]”}
Also where we can find the configuration files of plugin.
I faced this issue while using the pristine es exporter
Is this sepearate project fork because of some compatibility issues between opensearch and ES exporter or for any other reason?
Forgot to restart opensearch service. It’s showing up metrics now. But still couldn’t locate how to customize the prefix of metrics or filteration capability. do we need to prepare the plugin with these settings?
% ./bin/opensearch-plugin install -b https://github.com/aiven/prometheus-exporter-plugin-for-opensearch/releases/download/2.1.0.0/prometheus-exporter-2.1.0.0.zip
-> Installing https://github.com/aiven/prometheus-exporter-plugin-for-opensearch/releases/download/2.1.0.0/prometheus-exporter-2.1.0.0.zip
-> Downloading https://github.com/aiven/prometheus-exporter-plugin-for-opensearch/releases/download/2.1.0.0/prometheus-exporter-2.1.0.0.zip
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: plugin requires additional permissions @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* java.lang.RuntimePermission accessClassInPackage.sun.misc
* java.lang.RuntimePermission accessDeclaredMembers
* java.lang.reflect.ReflectPermission suppressAccessChecks
See http://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permissions allow and the associated risks.
-> Installed prometheus-exporter with folder name prometheus-exporter
Verify we have the plugin installed:
% ./bin/opensearch-plugin list
prometheus-exporter
Configure the metric prefix:
echo prometheus.metric_name.prefix: \"test_\" >> config/opensearch.yml
# Verify it has been recorded:
% cat config/opensearch.yml | grep prometheus.metric_name.prefix
prometheus.metric_name.prefix: "test_"
Now start the node and get some Prometheus metrics:
% ./bin/opensearch
# Switch to different terminal session
% curl -s -X GET localhost:9200/_prometheus/metrics | grep indices_get_current_number
# HELP test_indices_get_current_number Current rate of get commands
# TYPE test_indices_get_current_number gauge
test_indices_get_current_number{cluster="opensearch",node="Lukass-MBP",nodeid="A90E4OkkQLiRrBD4iVXueg",} 0.0
As we can see the metric name starts with the “test_” prefix.
Without the custom settings the metric name would have had the default prefix (“opensearch_”) like this:
% curl -s -X GET localhost:9200/_prometheus/metrics | grep indices_get_current_number
# HELP opensearch_indices_get_current_number Current rate of get commands
# TYPE opensearch_indices_get_current_number gauge
opensearch_indices_get_current_number{cluster="opensearch",node="Lukass-MBP",nodeid="A90E4OkkQLiRrBD4iVXueg",} 0.0
As explained here it was forked from specific commit hash and has been developed independently since then.
In particular the metric prefix name configuration option was introduced in 1.3.0.0 release.