Coder Social home page Coder Social logo

elasticsearch-prometheus-exporter's Introduction

CI

Prometheus Exporter Plugin for Elasticsearch

This is a builtin exporter from Elasticsearch to Prometheus. It collects all relevant metrics and makes them available to Prometheus via the Elasticsearch REST API.

Currently, the available metrics are:

  • Cluster status
  • Nodes status:
    • JVM
    • Indices (global)
    • Transport
    • HTTP
    • Scripts
    • Process
    • Operating System
    • File System
    • Circuit Breaker
  • Indices status
  • Cluster settings (selected disk allocation settings only)

Compatibility matrix

Version 7.X

Elasticsearch Plugin Release date
7.17.7 7.17.7.0 Oct 26, 2022
7.17.6 7.17.6.0 Aug 31, 2022
7.17.5 7.17.5.0 Jul 06, 2022
7.17.4 7.17.4.0 May 24, 2022
7.17.3 7.17.3.0 Apr 22, 2022
7.17.2 7.17.2.0 Apr 08, 2022
7.17.1 7.17.1.0 Mar 11, 2022
7.17.0 7.17.0.0 Feb 01, 2022
7.16.3 7.16.3.0 Jan 14, 2022
7.16.2 7.16.2.0 Dec 20, 2021
7.16.1 7.16.1.0 Dec 13, 2021
7.16.0 7.16.0.0 Dec 09, 2021
7.15.2 7.15.2.0 Nov 13, 2021
7.15.1 7.15.1.0 Oct 16, 2021
7.15.0 7.15.0.0 Oct 02, 2021
7.14.1 7.14.1.0 Sep 04, 2021
7.14.0 7.14.0.0 Aug 07, 2021
7.13.4 7.13.4.0 Jul 21, 2021
7.13.3 7.13.3.0 Jul 07, 2021
7.13.2 7.13.2.0 Jun 15, 2021
7.13.1 7.13.1.0 Jun 12, 2021
7.13.0 7.13.0.0 May 27, 2021
7.12.1 7.12.1.0 May 01, 2021
7.12.0 7.12.0.0 Apr 04, 2021
7.11.2 7.11.2.0 Mar 20, 2021
7.11.1 7.11.1.0 Feb 22, 2021
7.10.2 7.10.2.0 Jan 24, 2021
7.10.1 7.10.1.0 Dec 13, 2020
7.10.0 7.10.0.0 Nov 15, 2020
7.9.3 7.9.3.0 Oct 22, 2020
7.9.2 7.9.2.0 Oct 04, 2020
7.9.1 7.9.1.0 Sep 06, 2020
7.9.0 7.9.0.0 Aug 18, 2020
7.8.1 7.8.1.0 Aug 10, 2020
7.8.0 7.8.0.0 Jun 22, 2020
7.7.1 7.7.1.0 Jun 04, 2020
7.7.0 7.7.0.0 May 14, 2020
7.6.2 7.6.2.0 Apr 06, 2020
7.6.1 7.6.1.0 Mar 30, 2020
7.6.0 7.6.0.0 Feb 12, 2020
7.5.2 7.5.2.0 Jan 25, 2020
7.5.1 7.5.1.0 Jan 21, 2020
7.5.0 7.5.0.0 Jan 16, 2020
7.4.2 7.4.2.0 Jan 13, 2020
7.4.1 7.4.1.0 Jan 13, 2020
7.4.0 7.4.0.0 Jan 07, 2020
7.3.2 7.3.2.0 Oct 05, 2019
7.3.1 7.3.1.0 Sep 18, 2019
7.3.0 7.3.0.0 Sep 17, 2019
7.2.1 7.2.1.0 Jul 31, 2019
7.2.0 7.2.0.0 Jul 12, 2019
7.1.1 7.1.1.0 May 31, 2019
7.1.0 7.1.0.0 May 23, 2019
7.0.1 7.0.1.0 May 08, 2019
7.0.0 7.0.0.0 Apr 11, 2019

Install

./bin/elasticsearch-plugin install -b https://github.com/vvanholl/elasticsearch-prometheus-exporter/releases/download/7.17.7.0/prometheus-exporter-7.17.7.0.zip

Do not forget to restart the node after the installation!

Note that the plugin needs the following special permissions:

  • java.lang.RuntimePermission accessClassInPackage.sun.misc
  • java.lang.RuntimePermission accessDeclaredMembers
  • java.lang.reflect.ReflectPermission suppressAccessChecks

If you have a lot of indices and think this data is irrelevant, you can disable in the main configuration file:

prometheus.indices: false

To disable exporting cluster settings use:

prometheus.cluster.settings: false

These settings can be also updated dynamically.

Uninstall

./bin/elasticsearch-plugin remove prometheus-exporter

Do not forget to restart the node after installation!

Usage

Metrics are directly available at:

http://<your-elasticsearch-host>:9200/_prometheus/metrics

As a sample result, you get:

# HELP es_process_mem_total_virtual_bytes Memory used by ES process
# TYPE es_process_mem_total_virtual_bytes gauge
es_process_mem_total_virtual_bytes{cluster="develop",node="develop01",} 3.626733568E9
# HELP es_indices_indexing_is_throttled_bool Is indexing throttling ?
# TYPE es_indices_indexing_is_throttled_bool gauge
es_indices_indexing_is_throttled_bool{cluster="develop",node="develop01",} 0.0
# HELP es_jvm_gc_collection_time_seconds Time spent for GC collections
# TYPE es_jvm_gc_collection_time_seconds counter
es_jvm_gc_collection_time_seconds{cluster="develop",node="develop01",gc="old",} 0.0
es_jvm_gc_collection_time_seconds{cluster="develop",node="develop01",gc="young",} 0.0
# HELP es_indices_requestcache_memory_size_bytes Memory used for request cache
# TYPE es_indices_requestcache_memory_size_bytes gauge
es_indices_requestcache_memory_size_bytes{cluster="develop",node="develop01",} 0.0
# HELP es_indices_search_open_contexts_number Number of search open contexts
# TYPE es_indices_search_open_contexts_number gauge
es_indices_search_open_contexts_number{cluster="develop",node="develop01",} 0.0
# HELP es_jvm_mem_nonheap_used_bytes Memory used apart from heap
# TYPE es_jvm_mem_nonheap_used_bytes gauge
es_jvm_mem_nonheap_used_bytes{cluster="develop",node="develop01",} 5.5302736E7

...

Configure the Prometheus target

On your Prometheus servers, configure a new job as usual.

For example, if you have a cluster of 3 nodes:

- job_name: elasticsearch
  scrape_interval: 10s
  metrics_path: "/_prometheus/metrics"
  static_configs:
  - targets:
    - node1:9200
    - node2:9200
    - node3:9200

Of course, you could use the service discovery service instead of a static config.

Just keep in mind that metrics_path must be /_prometheus/metrics, otherwise Prometheus will find no metric.

Project sources

The Maven project site is available at GitHub.

Testing

Project contains integration tests implemented using rest layer framework.

To run everything similar to the GitHub Actions pipeline you can do:

docker run -v $(pwd):/home/gradle gradle:7.0.2-jdk16 su gradle -c 'gradle check'

NOTE: Please keep version in sync with .github/workflows/ci.yml

Complete test suite is run using:

gradle clean check

To run individual test file use:

gradle :integTest \
  -Dtests.class=org.elasticsearch.rest.PrometheusRestHandlerClientYamlTestSuiteIT \
  -Dtests.method="test {yaml=resthandler/20_metrics/Prometheus metrics can be pulled}"

Credits

This plugin mainly uses the Prometheus JVM Client.

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

elasticsearch-prometheus-exporter's People

Contributors

benlangfeld avatar cmur2 avatar davidkarlsen avatar djsly avatar dmivankov avatar dustinchaloupka avatar duxet avatar foxdalas avatar kbecic avatar lruslan avatar lukas-vlcek avatar maratkalibek avatar martbhell avatar mattias- avatar michael-kuss avatar mmcgarr avatar nikolay avatar pay-inni-sfree avatar psalaberria002 avatar rsmilyanov avatar therealdwright avatar vvanholl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elasticsearch-prometheus-exporter's Issues

Add Relocating Shards

Unless I've missed it there seem to be a couple of metrics missing, specifically the ones available from _cluster/health which include relocating shards, initialing shards etc. Please could these be added to the exporter.

promtool issues

Hi @vvanholl,

please consider using promtool for metrics validation.

See,

$ curl -s http://elk.domain:9200/_prometheus/metrics | promtool check-metrics
es_circuitbreaker_tripped_count: non-histogram and non-summary metrics should not have "_count" suffix
es_http_open_total_count: non-histogram and non-summary metrics should not have "_count" suffix
es_index_fielddata_evictions_count: non-histogram and non-summary metrics should not have "_count" suffix
es_index_flush_total_count: non-histogram and non-summary metrics should not have "_count" suffix
es_index_get_count: non-histogram and non-summary metrics should not have "_count" suffix
es_index_get_exists_count: non-histogram and non-summary metrics should not have "_count" suffix
es_index_get_missing_count: non-histogram and non-summary metrics should not have "_count" suffix
es_index_indexing_delete_count: non-histogram and non-summary metrics should not have "_count" suffix
es_index_indexing_index_count: non-histogram and non-summary metrics should not have "_count" suffix
es_index_indexing_index_failed_count: non-histogram and non-summary metrics should not have "_count" suffix
es_index_indexing_noop_update_count: non-histogram and non-summary metrics should not have "_count" suffix
es_index_merges_total_docs_count: non-histogram and non-summary metrics should not have "_count" suffix
es_index_querycache_cache_count: non-histogram and non-summary metrics should not have "_count" suffix
es_index_querycache_evictions_count: non-histogram and non-summary metrics should not have "_count" suffix
es_index_querycache_hit_count: non-histogram and non-summary metrics should not have "_count" suffix
es_index_refresh_total_count: non-histogram and non-summary metrics should not have "_count" suffix
es_index_requestcache_evictions_count: non-histogram and non-summary metrics should not have "_count" suffix
es_index_requestcache_hit_count: non-histogram and non-summary metrics should not have "_count" suffix
es_index_requestcache_miss_count: non-histogram and non-summary metrics should not have "_count" suffix
es_index_search_fetch_count: non-histogram and non-summary metrics should not have "_count" suffix
es_index_search_query_count: non-histogram and non-summary metrics should not have "_count" suffix
es_index_search_scroll_count: non-histogram and non-summary metrics should not have "_count" suffix
es_index_suggest_count: non-histogram and non-summary metrics should not have "_count" suffix
es_index_warmer_count: non-histogram and non-summary metrics should not have "_count" suffix
es_indices_fielddata_evictions_count: non-histogram and non-summary metrics should not have "_count" suffix
es_indices_flush_total_count: non-histogram and non-summary metrics should not have "_count" suffix
es_indices_get_count: non-histogram and non-summary metrics should not have "_count" suffix
es_indices_get_exists_count: non-histogram and non-summary metrics should not have "_count" suffix
es_indices_get_missing_count: non-histogram and non-summary metrics should not have "_count" suffix
es_indices_indexing_delete_count: non-histogram and non-summary metrics should not have "_count" suffix
es_indices_indexing_index_count: non-histogram and non-summary metrics should not have "_count" suffix
es_indices_indexing_index_failed_count: non-histogram and non-summary metrics should not have "_count" suffix
es_indices_indexing_noop_update_count: non-histogram and non-summary metrics should not have "_count" suffix
es_indices_merges_total_docs_count: non-histogram and non-summary metrics should not have "_count" suffix
es_indices_querycache_cache_count: non-histogram and non-summary metrics should not have "_count" suffix
es_indices_querycache_evictions_count: non-histogram and non-summary metrics should not have "_count" suffix
es_indices_querycache_hit_count: non-histogram and non-summary metrics should not have "_count" suffix
es_indices_refresh_total_count: non-histogram and non-summary metrics should not have "_count" suffix
es_indices_requestcache_evictions_count: non-histogram and non-summary metrics should not have "_count" suffix
es_indices_requestcache_hit_count: non-histogram and non-summary metrics should not have "_count" suffix
es_indices_requestcache_miss_count: non-histogram and non-summary metrics should not have "_count" suffix
es_indices_search_fetch_count: non-histogram and non-summary metrics should not have "_count" suffix
es_indices_search_query_count: non-histogram and non-summary metrics should not have "_count" suffix
es_indices_search_scroll_count: non-histogram and non-summary metrics should not have "_count" suffix
es_indices_suggest_count: non-histogram and non-summary metrics should not have "_count" suffix
es_jvm_gc_collection_count: non-histogram and non-summary metrics should not have "_count" suffix
es_script_cache_evictions_count: non-histogram and non-summary metrics should not have "_count" suffix
es_script_compilations_count: non-histogram and non-summary metrics should not have "_count" suffix
es_threadpool_threads_count: non-histogram and non-summary metrics should not have "_count" suffix
es_transport_rx_bytes_count: non-histogram and non-summary metrics should not have "_count" suffix
es_transport_rx_packets_count: non-histogram and non-summary metrics should not have "_count" suffix
es_transport_tx_bytes_count: non-histogram and non-summary metrics should not have "_count" suffix
es_transport_tx_packets_count: non-histogram and non-summary metrics should not have "_count" suffix

You can install promtool as follows:
go get -u github.com/prometheus/prometheus/cmd/promtool

Why using node name instead of node ID for label?

I have a question and I did not find any link to community forum, hence creating a ticket.

My question: Why is this plugin using node name instead of unique node ID for metric label?
Relevant code can be found in PrometheusMetricsCollector ctor:

node = nodesStatsResponse.getNodes().get(0).getNode().getName();

Theoretically, nodes in ES cluster can be given the same name while they are physically different nodes (but they always have different and very unique node id generated by Elasticsearch itself).

I can understand that it makes it more easy to filter the metrics later when querying the data but this comes with risk. Should the node id be actually included into metric label as well? It can be pulled from NodeStat object like this:

nodeId =  nodesStatsResponse.getNodes().get(0).getNode().getId();

Support for ES >2.4.1

Hi all,
I'm running 2.4.4 and the plugin does not work for that version.
Any plan to update the compatibility?

No disk io when use glusterfs

Hi,
I am using glusterfs to store data on my elasticserach cluster, The disk io is always 0, Is there any metric about glusterfs io and read-write bytes?

Support 2.4.4

Please release a version to support 2.4.4 in order to pull in #64

Could not find plugin class. version 2.4.1

Installed plugin within this Dockerfile
https://github.com/commercetools/docker-elasticsearch-kubernetes/blob/a7f5b4e9b1596dd650ae55c5ae4601df5626c907/Dockerfile
Build log: https://hub.docker.com/r/imelnik/docker-elasticsearch-kubernetes/builds/brzpwudjamraxdechd5xnak/

Other plugins seem bo work fine this way.
ES Version: 2.4.1
Plugin Version 2.4.1.0

2016-10-10T14:19:56.912502418Z [2016-10-10 14:19:56,911][INFO ][node                     ] [Marsha Rosenberg] version[2.4.1], pid[14], build[c67dc32/2016-09-27T18:57:55Z]
2016-10-10T14:19:56.912601670Z [2016-10-10 14:19:56,912][INFO ][node                     ] [Marsha Rosenberg] initializing ...
2016-10-10T14:19:57.666756004Z Exception in thread "main" ElasticsearchException[Could not find plugin class [org.elasticsearch.plugin.prometheus.PrometheusExporterPlugin]]; nested: ClassNotFoundException[org.elasticsearch.plugin.prometheus.PrometheusExporterPlugin];
2016-10-10T14:19:57.666847786Z Likely root cause: java.lang.ClassNotFoundException: org.elasticsearch.plugin.prometheus.PrometheusExporterPlugin
2016-10-10T14:19:57.667031174Z  at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
2016-10-10T14:19:57.667071579Z  at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
2016-10-10T14:19:57.667151415Z  at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:814)
2016-10-10T14:19:57.667163731Z  at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
2016-10-10T14:19:57.667217839Z  at org.elasticsearch.plugins.PluginsService.loadPluginClass(PluginsService.java:463)
2016-10-10T14:19:57.667280618Z  at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:431)
2016-10-10T14:19:57.667322592Z  at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:129)
2016-10-10T14:19:57.667344989Z  at org.elasticsearch.node.Node.<init>(Node.java:158)
2016-10-10T14:19:57.667392522Z  at org.elasticsearch.node.Node.<init>(Node.java:140)
2016-10-10T14:19:57.667430781Z  at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:143)
2016-10-10T14:19:57.667490911Z  at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:194)
2016-10-10T14:19:57.667502420Z  at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:286)
2016-10-10T14:19:57.667588931Z  at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)
2016-10-10T14:19:57.667600980Z Refer to the log for complete error details.

Any ideas on how do I fix that?

Can not increment metric indices_segments_number with value [negative], skipping

Hi,

today I've noticed log entries like this in my elasticsearch log:

Aug 23 09:30:27 XXXX elasticsearch[27249]: [2016-08-23 09:30:27,085][ERROR][RestPrometheusMetricsAction]\
Can not increment metric indices_segments_number with value -19.000000, skipping

I took a look at the Prometheus metrics and found metric es_indices_segments_number (prefix "es_") of type Counter - which is only allowed to increment:

# HELP es_indices_segments_number Current number of segments
# TYPE es_indices_segments_number counter

Should the metric type be changed from Counter to Gauge?

Metric get a value -0.000000

I got this error log while the rest interface invoked.

[2017-01-11T15:59:04,808][ERROR][RestPrometheusMetricsAction] Can not increment metric indices_merges_total_throttled_time_seconds with value -0.000000, skipping

versions :

elasticsearch: 5.0.2
elasticsearch-prometheus-exporter: 5.0.1
prometheus: 1.2.1

What about 5.0 version?

Hello,

ES 5.0 was delivered last monday... Do you know when it will be compatible with 5.0??

Marc

Request: Determine if index is read only

Hey - great plugin! Friendly request,

We have an ES cluster under serious stress at work and there has been a couple of occasions a file system on the vm when the nodes persistence goes above 95% and the index goes read only. It would be great if there was a metric for this.

We have resorted (rightfully) to monitoring this at a box level, but would be great if we could catch it here too.

ES 5.1.1 support

Just got around to updating my ES cluster from 2.4 to the latest, which is now 5.1.1

This plugin is unfortunately not compatible

Consider adding per-index stats to 2.x branch

Knowing that many people still using es 2.x and even 1.x (and many of them hesitate upgrading because of many breaking changes in es), would you consider adding registerPerIndexMetrics() to 2.x branch? At first, is it possible?

ElasticSearch errors for index_search_fetch_time_*

ES 5.4.0 cluster configured with 3 masters, 2 data & 3 clients.

Seeing a lot of errors in the logs - can anyone suggest what is causing them?

es-client-1335634847-6j78q es-client [2017-06-08T05:56:53,522][ERROR][RestPrometheusMetricsAction] Can not increment metric index_warmer_time_seconds with value -5.000000, skipping
es-client-1335634847-6j78q es-client [2017-06-08T05:56:53,522][ERROR][RestPrometheusMetricsAction] Can not increment metric index_warmer_time_seconds with value -6.000000, skipping
es-client-1335634847-6j78q es-client [2017-06-08T05:56:53,522][ERROR][RestPrometheusMetricsAction] Can not increment metric index_warmer_time_seconds with value -1.000000, skipping
es-client-1335634847-6j78q es-client [2017-06-08T05:56:53,522][ERROR][RestPrometheusMetricsAction] Can not increment metric index_warmer_time_seconds with value -3.000000, skipping
es-client-1335634847-6j78q es-client [2017-06-08T05:56:53,522][ERROR][RestPrometheusMetricsAction] Can not increment metric index_warmer_time_seconds with value -3.000000, skipping
es-client-1335634847-6j78q es-client [2017-06-08T05:56:53,522][ERROR][RestPrometheusMetricsAction] Can not increment metric index_warmer_time_seconds with value -3.000000, skipping
es-client-1335634847-6j78q es-client [2017-06-08T05:56:53,522][ERROR][RestPrometheusMetricsAction] Can not increment metric index_search_fetch_count with value -10.000000, skipping
es-client-1335634847-6j78q es-client [2017-06-08T05:56:53,522][ERROR][RestPrometheusMetricsAction] Can not increment metric index_search_fetch_time_seconds with value -11.835000, s

elasticsearch prometheus exporter SSL Error

@vvanholl

We are using the prometheus elasticsearch exporter plugin to send prmotheus elasticsearch metrics from sysdig agent(dragent) to sysdigserver we are getting below error.

We are able to push to if elasticsearch runs on HTTP ...the problem occurs with HTTPS of elasticsearch ...any idea?

2018-02-02 05:13:40.128, 8045, Information, sdchecks[8048] Skip retries for Prometheus error: ('Connection aborted.', error(97, 'Address family not supported by protocol'))
2018-02-02 05:13:40.128, 8045, Error, sdchecks[8048] Exception on running check prometheus.9200: ('Connection aborted.', error(97, 'Address family not supported by protocol'))
2018-02-02 05:13:40.144, 8045, Warning, sdchecks[8048] Error while trying to get Elasticsearch version from https://<>:9200 [Errno 2] No such file or directory
2018-02-02 05:13:40.149, 8045, Error, sdchecks[8048] Exception on running check elasticsearch: SSLError(SSLError(IOError(2, 'No such file or directory'),),)
2018-02-02 05:13:40.149, 8045, Error, sdchecks, Traceback (most recent call last):
2018-02-02 05:13:40.149, 8045, Error, sdchecks, File "/opt/draios/lib/python/sdchecks.py", line 246, in run
2018-02-02 05:13:40.149, 8045, Error, sdchecks, self.check_instance.check(self.instance_conf)
2018-02-02 05:13:40.149, 8045, Error, sdchecks, File "/opt/draios/lib/python/checks.d/elastic.py", line 409, in check
2018-02-02 05:13:40.149, 8045, Error, sdchecks, stats_data = self._get_data(stats_url, config)
2018-02-02 05:13:40.149, 8045, Error, sdchecks, File "/opt/draios/lib/python/checks.d/elastic.py", line 579, in _get_data
2018-02-02 05:13:40.149, 8045, Error, sdchecks, cert=cert
2018-02-02 05:13:40.149, 8045, Error, sdchecks, File "/opt/draios/lib/python-deps/requests/api.py", line 68, in get
2018-02-02 05:13:40.149, 8045, Error, sdchecks, return request('get', url, **kwargs)
2018-02-02 05:13:40.149, 8045, Error, sdchecks, File "/opt/draios/lib/python-deps/requests/api.py", line 50, in request
2018-02-02 05:13:40.149, 8045, Error, sdchecks, response = session.request(method=method, url=url, **kwargs)
2018-02-02 05:13:40.149, 8045, Error, sdchecks, File "/opt/draios/lib/python-deps/requests/sessions.py", line 465, in request
2018-02-02 05:13:40.149, 8045, Error, sdchecks, resp = self.send(prep, **send_kwargs)
2018-02-02 05:13:40.149, 8045, Error, sdchecks, File "/opt/draios/lib/python-deps/requests/sessions.py", line 573, in send
2018-02-02 05:13:40.149, 8045, Error, sdchecks, r = adapter.send(request, **kwargs)
2018-02-02 05:13:40.149, 8045, Error, sdchecks, File "/opt/draios/lib/python-deps/requests/adapters.py", line 431, in send
2018-02-02 05:13:40.149, 8045, Error, sdchecks, raise SSLError(e, request=request)
2018-02-02 05:13:40.149, 8045, Error, sdchecks, SSLError: [Errno 2] No such file or directory
2018-02-02 05:13:40.149, 8045, Error, sdchecks,

`
customerid: xxxxxx
tags: node:ELK_DEV
collector: <<IP_OF_SYSDIG_Server>>
collector_port: 6443
ssl_verify_certificate: false
prometheus:
enabled: true
interval: 10
log_errors: true
max_metrics: 1000
max_metrics_per_process: 100
max_tags_per_metric: 20

process_filter:
- include:
process.cmdline: "elasticsearch"
conf:
port: 9200
path: "/_prometheus/metrics"
app_checks:

  • name: elasticsearch
    check_module: elastic
    pattern:
    port: 9200
    comm: java
    conf:
    username: xxxx
    password: xxxx
    url: https://<<IP_of_elastic_machine>>:9200/
    ssl_cert: XXXX.crt
    ssl_key: XXXX.key
    ssl_verify: true
    `

Could not install plugin v.2.4.1.0

Hi therecd.
I have tried to install plugin using locally downloaded zip package and got following error:

E:\elastic-client\bin>plugin.bat install d:\Distrib\elasticsearch-prometheus-exporter-2.4.1.0.zip
-> Installing d:\Distrib\elasticsearch-prometheus-exporter-2.4.1.0.zip...
ERROR: Invalid prefix or suffix

Is there any way to fix it?

[Discussion] Integration tests for ES 5.x and above

The PR #64 introduced integration tests for this plugin using officially documented ESIntegTestCase support for the 2.x branch. The question is how integration tests should be implemented for ES 5.x and above. While the official documentation still refers to integration tests there is actually strong evidence that Elastic team itself is not recommending this approach going forward. See elastic/elasticsearch#21544, elastic/elasticsearch#21119 or elastic/elasticsearch#24528.

Based on my understanding there might be some alternative support when using gradle, see elastic/elasticsearch#21119 (comment) and that is what I am going to investigate first. However, if there are any other ideas feel free to comment below.

Elasticsearch version 2.4.4 compatibility

I need to use for Elasticsearch version 2.4.4 and it fails. Can you help?

Verifying https://github.com/vvanholl/elasticsearch-prometheus-exporter/releases/download/2.4.1.0/elasticsearch-prometheus-exporter-2.4.1.0.zip checksums if available ...
NOTE: Unable to verify checksum for downloaded plugin (unable to find .sha1 or .md5 file to verify)
ERROR: Plugin [prometheus-exporter] is incompatible with Elasticsearch [2.4.4]. Was designed for version [2.4.1]

Do we have something as a workaround?

per-index metrics use the "total" stats instead of the "primaries" stats

Description

In the output of elasticsearch /_stat route, the per-index metrics are grouped either by "total" or by "primaries". The current code seems to be using the "total" variant while I am expecting to use the "primaries" variant.

Possible solutions

Either:

  • use the "primaries" variant instead of the "total" variant for all per-index metrics
  • export both "primaries" and "total" metrics with the variant stored in a special label

Example

For example, the index_doc_number metric for an index is found in the "total/docs/count" of the index in the output of the /$INDEX/_stats route.

Sample document counts:

$ curl -s 10.130.0.66:9200/_cat/indices/myapp.fr.assets
green open myapp.fr.assets VJpAJyC2TZybRMkipMG58w 3 2 322587 6657 2.7gb 943.5mb

$ curl -s 10.130.0.66:9200/myapp.fr.assets/_stats | jq . | grep -C3 '"docs"'
  },
  "_all": {
    "primaries": {
      "docs": {
        "count": 322587,
        "deleted": 6657
      },
--
      }
    },
    "total": {
      "docs": {
        "count": 967761,
        "deleted": 12157
      },
--
  "indices": {
    "myapp.fr.assets": {
      "primaries": {
        "docs": {
          "count": 322587,
          "deleted": 6657
        },
--
        }
      },
      "total": {
        "docs": {
          "count": 967761,
          "deleted": 12157
        },

$ curl -s 10.130.0.66:9200/_prometheus/metrics | grep index_doc_number.*wisdom.rtlbelgium.fr.assets
es_index_doc_number{cluster="elasticsearch",node="elasticsearch-0",index="myapp.fr.assets",} 967761.0

In the above outputs, the current value of the es_index_doc_number metric is 967761.0. That value is the same as the one in the "total/docs/count" field. I would expect to see 322587, which is the value of the "primaries/docs/count" field and also the value listed "for humans" by the /cat/indices route.

get_current_number metric should be a gauge

Currently this metric is set up as a counter, but should be a gauge. The plugin is logging these errors:

[2017-05-22T15:38:08,748][ERROR][RestPrometheusMetricsAction] Can not increment metric index_get_current_number with value -4.000000, skipping
[2017-05-22T15:38:09,668][ERROR][RestPrometheusMetricsAction] Can not increment metric indices_get_current_number with value -2.000000, skipping

ES 5.4.0 + plugin version: 5.4.0.0

per-index metrics on deleted index

Bug description

Per-index statistics continue to output per-index metrics for an index after that index has been deleted.

Scenario

  1. Create an index
  2. Render /_prometheus/metrics, grep for the index name (the index should be listed in per-index metrics such as index_doc_number)
  3. Delete the index
  4. Verify that the deleted index is not listed anymore in the output of /_stats
  5. Render /_prometheus/metrics again, the index name is still there.

Workaround

Restart the elasticsearch process.

Explanation

I believe that there is some memoization effect at work: The loop in the updatePerIndexMetrics method iterates on the current indexes to update each per-index metric, but there is no code to remove existing metrics about an index which was not listed by isr.getIndices().entrySet().

5.4.3.0 Plugin archive contains wrong plugin descriptor

The 5.4.3.0 Archive (https://distfiles.compuscene.net/elasticsearch/elasticsearch-prometheus-exporter-5.4.3.0.zip) contains the plugin descriptor for version 5.4.2.0.

It's not possible to install it

-> Downloading https://distfiles.compuscene.net/elasticsearch/elasticsearch-prometheus-exporter-5.4.3.0.zip
[=================================================] 100%?? 
Exception in thread "main" java.lang.IllegalArgumentException: plugin [prometheus-exporter] is incompatible with version [5.4.3]; was designed for version [5.4.2]

ES v5.2.0 support?

Could we get a release of this plugin compatible with ElasticSearch v5.2.0 (just released)?
Thank you in advance.

Node label contains IP address

Every metric contains node label. But value is IP address instead of node.name.

The problem appears when es cluster architecture contains multiple nodes on same machine(e.g. to not cross 32GB RAM). Then there are multiple metrics of different nodes, with same IP and its hard to analyze

Below is sample configuration:

$ cat Dockerfile 
FROM elasticsearch:5.2.2

RUN ./bin/elasticsearch-plugin install -b https://github.com/vvanholl/elasticsearch-prometheus-exporter/releases/download/5.2.2.0/elasticsearch-prometheus-exporter-5.2.2.0.zip

$ docker build -t es-prometheus .; docker run -d -p 9200:9200 es-prometheus
Sending build context to Docker daemon 2.048 kB
Step 1/2 : FROM elasticsearch:5.2.2
 ---> bc2d5d579ce5
Step 2/2 : RUN ./bin/elasticsearch-plugin install -b https://github.com/vvanholl/elasticsearch-prometheus-exporter/releases/download/5.2.2.0/elasticsearch-prometheus-exporter-5.2.2.0.zip
 ---> Using cache
 ---> af93c886d2bf
Successfully built af93c886d2bf
d314453bd97a0f1920a17163dc9bdc182513254d9dbef5788ff87898135a8c1d

And output of _prometheus/metrics endpoint:

$ curl http://localhost:9200/_prometheus/metrics
# HELP es_os_load_average_fifteen_minutes CPU load
# TYPE es_os_load_average_fifteen_minutes gauge
es_os_load_average_fifteen_minutes{cluster="elasticsearch",node="127.0.0.1",} 0.41
....

$ curl http://localhost:9200/_cat/nodes?v
ip        heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name
127.0.0.1           21          62   1    0.03    0.32     0.41 mdi       *      mgWR54f

support es 5.6.5

do you have a branchpoint to continue support for the 5.6.x series?

5.3.2 plugin archive is not available

$ curl -v https://distfiles.compuscene.net/elasticsearch/elasticsearch-prometheus-exporter-5.3.2.0.zip
*   Trying 54.192.192.146...
* Connected to distfiles.compuscene.net (54.192.192.146) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate: *.compuscene.net
* Server certificate: Go Daddy Secure Certificate Authority - G2
* Server certificate: Go Daddy Root Certificate Authority - G2
> GET /elasticsearch/elasticsearch-prometheus-exporter-5.3.2.0.zip HTTP/1.1
> Host: distfiles.compuscene.net
> User-Agent: curl/7.43.0
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Content-Type: application/xml
< Transfer-Encoding: chunked
< Connection: keep-alive
< Date: Fri, 28 Apr 2017 17:10:49 GMT
< Server: AmazonS3
< Age: 8
< X-Cache: Error from cloudfront
< Via: 1.1 956f08c47df12e572d602e89820e87f2.cloudfront.net (CloudFront)
< X-Amz-Cf-Id: Cyhmd0obuaKtf643pbUHNaSwj2KUQxWk98iQVE25lR0jHmVyxHE4VA==
<
<?xml version="1.0" encoding="UTF-8"?>
* Connection #0 to host distfiles.compuscene.net left intact
<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>elasticsearch/elasticsearch-prometheus-exporter-5.3.2.0.zip</Key><RequestId>CFE6DB6B75DB60A4</RequestId><HostId>2Y/wAYMtj7EvBIVpsjE7QsS1ra1hkS9BNXCYTRLtSYEriUINwMwuXyiN6sxFvhGpVHHPpFxcQF0=</HostId></Error>

Elasticsearch 2.4.0 compatible package

Could you please provide a package compatible with Elasticsearch 2.4.0?

I just started a rolling-upgrade from ES 2.3.5 to 2.4.0 on my test cluster and the first node fails during startup with the following error message:

[2016-09-01 11:01:50,988][ERROR][bootstrap                ] Exception
java.lang.IllegalArgumentException: Plugin [prometheus-exporter] is incompatible with Elasticsearch [2.4.0]. Was designed for version [2.3.5]
        at org.elasticsearch.plugins.PluginInfo.readFromProperties(PluginInfo.java:118)
        at org.elasticsearch.plugins.PluginsService.getPluginBundles(PluginsService.java:378)
        at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:128)
        at org.elasticsearch.node.Node.<init>(Node.java:158)
        at org.elasticsearch.node.Node.<init>(Node.java:140)
        at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:143)
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:194)
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:286)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)

So, I had to disable the prometheus-exporter temporarily.

NullPointerException when trying to access

On a freshly installed node with ES 2.3.5 and plugin build 2.3.5 (other plugins installed - cloud-aws, kopf, head), when trying to access the endpoint I get

{"error":{"root_cause":[{"type":"null_pointer_exception","reason":null}],"type":"null_pointer_exception","reason":null},"status":500}

with the following stack trace:

[2016-08-15 08:45:54,192][WARN ][rest.suppressed          ] path: /_prometheus/metrics, params: {}
java.lang.NullPointerException
        at org.compuscene.metrics.prometheus.PrometheusMetricsCollector.updateFsMetrics(PrometheusMetricsCollector.java:500)
        at org.compuscene.metrics.prometheus.PrometheusMetricsCollector.updateMetrics(PrometheusMetricsCollector.java:536)
        at org.elasticsearch.rest.prometheus.RestPrometheusMetricsAction.handleRequest(RestPrometheusMetricsAction.java:36)
        at org.elasticsearch.rest.BaseRestHandler.handleRequest(BaseRestHandler.java:54)
        at org.elasticsearch.rest.RestController.executeHandler(RestController.java:205)
        at org.elasticsearch.rest.RestController.dispatchRequest(RestController.java:166)
        at org.elasticsearch.http.HttpServer.internalDispatchRequest(HttpServer.java:128)
        at org.elasticsearch.http.HttpServer$Dispatcher.dispatchRequest(HttpServer.java:86)
        at org.elasticsearch.http.netty.NettyHttpServerTransport.dispatchRequest(NettyHttpServerTransport.java:449)
        at org.elasticsearch.http.netty.HttpRequestHandler.messageReceived(HttpRequestHandler.java:61)
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
        at org.elasticsearch.http.netty.pipelining.HttpPipeliningHandler.messageReceived(HttpPipeliningHandler.java:60)
        at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:88)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
        at org.jboss.netty.handler.codec.http.HttpChunkAggregator.messageReceived(HttpChunkAggregator.java:145)
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
        at org.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived(HttpContentDecoder.java:108)
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
        at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:459)
        at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:536)
        at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435)
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
        at org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(OpenChannelsHandler.java:75)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
        at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
        at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
        at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
        at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
        at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

Unable to install on Easticsearch 6.2.0 with plugin-descriptor.properties, Unknown properties in plugin descriptor: [jvm, site]

[root@elasticsearch01 bin]# /usr/share/elasticsearch/bin/elasticsearch-plugin install https://distfiles.compuscene.net/elasticsearch/elasticsearch-prometheus-exporter-6.2.0.0.zip -> Downloading https://distfiles.compuscene.net/elasticsearch/elasticsearch-prometheus-exporter-6.2.0.0.zip [=================================================] 100%   Exception in thread "main" java.lang.IllegalArgumentException: Unknown properties in plugin descriptor: [jvm, site] at org.elasticsearch.plugins.PluginInfo.readFromProperties(PluginInfo.java:284) at org.elasticsearch.plugins.InstallPluginCommand.loadPluginInfo(InstallPluginCommand.java:571) at org.elasticsearch.plugins.InstallPluginCommand.installPlugin(InstallPluginCommand.java:707) at org.elasticsearch.plugins.InstallPluginCommand.install(InstallPluginCommand.java:623) at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:223) at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:212) at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:75) at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) at org.elasticsearch.cli.Command.main(Command.java:90) at org.elasticsearch.plugins.PluginCli.main(PluginCli.java:48)

I downloaded, unzip and removed the lines jvm=true site=false and then it installed properly and works as well.
I don't see the jvm=true and site=false on the elastic official site https://www.elastic.co/guide/en/elasticsearch/plugins/current/plugin-authors.html#_plugin_descriptor_file

Support ES 2.4.3

This is one of last 2.X-Versions and many clusters will stay on it for a long time, so please support it

Want to have slowlog stats

I think elasticsearch doesn't have that feature directly, but we can use log appender to count the slowlog?

like

package org.compuscene.metrics.prometheus;

import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.core.LogEvent;
import org.apache.logging.log4j.core.LoggerContext;
import org.apache.logging.log4j.core.appender.AbstractAppender;
import org.apache.logging.log4j.core.config.Configuration;

public class SlowLogAppender extends AbstractAppender {

    private static final String METRIC_NAME = "indices_slowlog_count";
    private final String node;
    private final PrometheusMetricsCatalog catalog;

    SlowLogAppender(String node,
                    PrometheusMetricsCatalog catalog) {
        super("SlowLogAppender", null, null);
        this.node = node;
        this.catalog = catalog;
    }

    @Override
    public void append(LogEvent logEvent) {
        catalog.incCounter("indices_slowlog_count", 1, node, logEvent.getLoggerName(),
                           logEvent.getLevel().name());
    }

    @Override
    public void start() {
        super.start();
        catalog.registerCounter(METRIC_NAME, "Count of slowlog", "node", "logger_name", "level");

        LoggerContext context = (LoggerContext) LogManager.getContext(false);
        Configuration config = context.getConfiguration();
        addAppenderToLoggerConfig(config, "index.search.slowlog.query");
        addAppenderToLoggerConfig(config, "index.search.slowlog.fetch");
        addAppenderToLoggerConfig(config, "index.indexing.slowlog.index");
        context.updateLoggers(config);
    }

    private void addAppenderToLoggerConfig(Configuration configuration, String loggerName) {
        configuration.getLoggerConfig(loggerName).addAppender(this, null, null);
        catalog.setCounter(METRIC_NAME, 0, node, loggerName, Level.WARN.toString());
        catalog.setCounter(METRIC_NAME, 0, node, loggerName, Level.INFO.toString());
        catalog.setCounter(METRIC_NAME, 0, node, loggerName, Level.DEBUG.toString());
        catalog.setCounter(METRIC_NAME, 0, node, loggerName, Level.TRACE.toString());
    }
}

Support for ElasticSearch 1.7.1

Hi,
I know we are using a very old version of ElasticSearch. But have some difficulties in migrating the schemas to the new version. We use Prometheus for monitoring and Alerting for all of our system expect ElasticSearch. is there a way i can use this plugin with the ES version 1.7.1?
Thank you

Not working with 6.2.1 + 6.2.2 when audit logging of elasticsearch is enabled

I just reported a bug to Elasticsearch where the /_cat/health/ is not working anymore after enabling Audit in Elasticsearch. The /_prometheus/metrics/ endpoint is bugged as well.

When audit is enabled, i get the following:

curl -u  elastic:test localhost:9200/_prometheus/metrics?pretty=true
{
  "error" : {
    "root_cause" : [
      {
        "type" : "exception",
        "reason" : "Cluster health request failed"
      }
    ],
    "type" : "exception",
    "reason" : "Cluster health request failed",
    "caused_by" : {
      "type" : "null_pointer_exception",
      "reason" : null
    }
  },
  "status" : 500
}

In Elasticsearch Log:

[2018-02-21T14:18:06,276][WARN ][r.suppressed             ] path: /_prometheus/metrics, params: {pretty=true}
org.elasticsearch.ElasticsearchException: Cluster health request failed
        at org.elasticsearch.action.TransportNodePrometheusMetricsAction$AsyncAction$2.onFailure(TransportNodePrometheusMetricsAction.java:66) ~[?:?]
        at org.elasticsearch.action.support.TransportAction$1.onFailure(TransportAction.java:91) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.action.support.ContextPreservingActionListener.onFailure(ContextPreservingActionListener.java:50) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.action.ActionListener$1.onFailure(ActionListener.java:68) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.xpack.security.authz.AuthorizationUtils$AsyncAuthorizer.maybeRun(AuthorizationUtils.java:185) ~[?:?]
        at org.elasticsearch.xpack.security.authz.AuthorizationUtils$AsyncAuthorizer.setRunAsRoles(AuthorizationUtils.java:177) ~[?:?]
        at org.elasticsearch.xpack.security.authz.AuthorizationUtils$AsyncAuthorizer.authorize(AuthorizationUtils.java:165) ~[?:?]
        at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.authorizeRequest(SecurityActionFilter.java:190) ~[?:?]
        at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.lambda$applyInternal$3(SecurityActionFilter.java:166) ~[?:?]
        at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:60) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.lambda$authenticateAsync$2(AuthenticationService.java:184) ~[?:?]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.lambda$lookForExistingAuthentication$4(AuthenticationService.java:217) ~[?:?]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.lookForExistingAuthentication(AuthenticationService.java:228) ~[?:?]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.authenticateAsync(AuthenticationService.java:182) ~[?:?]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.access$000(AuthenticationService.java:143) ~[?:?]
        at org.elasticsearch.xpack.security.authc.AuthenticationService.authenticate(AuthenticationService.java:113) ~[?:?]
        at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.applyInternal(SecurityActionFilter.java:165) ~[?:?]
        at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.apply(SecurityActionFilter.java:124) ~[?:?]
        at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:165) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:139) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:81) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.client.node.NodeClient.executeLocally(NodeClient.java:83) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.client.node.NodeClient.doExecute(NodeClient.java:72) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:405) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.client.support.AbstractClient$ClusterAdmin.execute(AbstractClient.java:712) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.client.support.AbstractClient$ClusterAdmin.health(AbstractClient.java:733) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.action.TransportNodePrometheusMetricsAction$AsyncAction.start(TransportNodePrometheusMetricsAction.java:77) ~[?:?]
        at org.elasticsearch.action.TransportNodePrometheusMetricsAction$AsyncAction.access$100(TransportNodePrometheusMetricsAction.java:38) ~[?:?]
        at org.elasticsearch.action.TransportNodePrometheusMetricsAction.doExecute(TransportNodePrometheusMetricsAction.java:35) ~[?:?]
        at org.elasticsearch.action.TransportNodePrometheusMetricsAction.doExecute(TransportNodePrometheusMetricsAction.java:20) ~[?:?]
        at org.elasticsearch.action.support.TransportAction.doExecute(TransportAction.java:143) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:167) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.lambda$apply$0(SecurityActionFilter.java:103) ~[?:?]
        at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:60) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.lambda$authorizeRequest$4(SecurityActionFilter.java:188) ~[?:?]
        at org.elasticsearch.xpack.security.authz.AuthorizationUtils$AsyncAuthorizer.maybeRun(AuthorizationUtils.java:183) ~[?:?]
        at org.elasticsearch.xpack.security.authz.AuthorizationUtils$AsyncAuthorizer.setRunAsRoles(AuthorizationUtils.java:177) ~[?:?]
        at org.elasticsearch.xpack.security.authz.AuthorizationUtils$AsyncAuthorizer.authorize(AuthorizationUtils.java:165) ~[?:?]
        at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.authorizeRequest(SecurityActionFilter.java:190) ~[?:?]
        at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.lambda$applyInternal$3(SecurityActionFilter.java:166) ~[?:?]
        at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:60) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.lambda$authenticateAsync$2(AuthenticationService.java:184) ~[?:?]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.lambda$lookForExistingAuthentication$4(AuthenticationService.java:217) ~[?:?]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.lookForExistingAuthentication(AuthenticationService.java:228) ~[?:?]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.authenticateAsync(AuthenticationService.java:182) ~[?:?]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.access$000(AuthenticationService.java:143) ~[?:?]
        at org.elasticsearch.xpack.security.authc.AuthenticationService.authenticate(AuthenticationService.java:113) ~[?:?]
        at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.applyInternal(SecurityActionFilter.java:165) ~[?:?]
        at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.apply(SecurityActionFilter.java:124) ~[?:?]
        at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:165) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:139) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:81) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.client.node.NodeClient.executeLocally(NodeClient.java:83) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.client.node.NodeClient.doExecute(NodeClient.java:72) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:405) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.rest.prometheus.RestPrometheusMetricsAction.lambda$prepareRequest$0(RestPrometheusMetricsAction.java:46) ~[?:?]
        at org.elasticsearch.rest.BaseRestHandler.handleRequest(BaseRestHandler.java:97) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.xpack.security.rest.SecurityRestFilter.lambda$handleRequest$0(SecurityRestFilter.java:73) ~[?:?]
        at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:60) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.lambda$writeAuthToContext$23(AuthenticationService.java:443) ~[?:?]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.writeAuthToContext(AuthenticationService.java:452) ~[?:?]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.finishAuthentication(AuthenticationService.java:433) ~[?:?]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.consumeUser(AuthenticationService.java:375) ~[?:?]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.lambda$consumeToken$14(AuthenticationService.java:306) ~[?:?]
        at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:60) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.xpack.core.common.IteratingActionListener.onResponse(IteratingActionListener.java:114) ~[?:?]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.lambda$consumeToken$11(AuthenticationService.java:279) ~[?:?]
        at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:60) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealm.authenticateWithCache(CachingUsernamePasswordRealm.java:112) ~[?:?]
        at org.elasticsearch.xpack.security.authc.support.CachingUsernamePasswordRealm.authenticate(CachingUsernamePasswordRealm.java:85) ~[?:?]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.lambda$consumeToken$13(AuthenticationService.java:274) ~[?:?]
        at org.elasticsearch.xpack.core.common.IteratingActionListener.run(IteratingActionListener.java:93) ~[?:?]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.consumeToken(AuthenticationService.java:310) ~[?:?]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.lambda$extractToken$9(AuthenticationService.java:246) ~[?:?]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.extractToken(AuthenticationService.java:256) ~[?:?]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.lambda$authenticateAsync$0(AuthenticationService.java:190) ~[?:?]
        at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:60) ~[elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.xpack.security.authc.TokenService.getAndValidateToken(TokenService.java:313) ~[x-pack-security-6.2.2.jar:6.2.2]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.lambda$authenticateAsync$2(AuthenticationService.java:186) ~[x-pack-security-6.2.2.jar:6.2.2]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.lambda$lookForExistingAuthentication$4(AuthenticationService.java:217) ~[x-pack-security-6.2.2.jar:6.2.2]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.lookForExistingAuthentication(AuthenticationService.java:228) [x-pack-security-6.2.2.jar:6.2.2]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.authenticateAsync(AuthenticationService.java:182) [x-pack-security-6.2.2.jar:6.2.2]
        at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.access$000(AuthenticationService.java:143) [x-pack-security-6.2.2.jar:6.2.2]
        at org.elasticsearch.xpack.security.authc.AuthenticationService.authenticate(AuthenticationService.java:96) [x-pack-security-6.2.2.jar:6.2.2]
        at org.elasticsearch.xpack.security.rest.SecurityRestFilter.handleRequest(SecurityRestFilter.java:70) [x-pack-security-6.2.2.jar:6.2.2]
        at org.elasticsearch.rest.RestController.dispatchRequest(RestController.java:240) [elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.rest.RestController.tryAllHandlers(RestController.java:336) [elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.rest.RestController.dispatchRequest(RestController.java:174) [elasticsearch-6.2.2.jar:6.2.2]
        at org.elasticsearch.http.netty4.Netty4HttpServerTransport.dispatchRequest(Netty4HttpServerTransport.java:500) [transport-netty4-6.2.2.jar:6.2.2]
        at org.elasticsearch.http.netty4.Netty4HttpRequestHandler.channelRead0(Netty4HttpRequestHandler.java:80) [transport-netty4-6.2.2.jar:6.2.2]
        at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at org.elasticsearch.http.netty4.pipelining.HttpPipeliningHandler.channelRead(HttpPipeliningHandler.java:68) [transport-netty4-6.2.2.jar:6.2.2]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) [netty-codec-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) [netty-codec-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) [netty-codec-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) [netty-codec-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) [netty-codec-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284) [netty-codec-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) [netty-handler-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1359) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:935) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:545) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:499) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459) [netty-transport-4.1.16.Final.jar:4.1.16.Final]
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [netty-common-4.1.16.Final.jar:4.1.16.Final]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_161]
Caused by: java.lang.NullPointerException
        at java.util.Objects.requireNonNull(Objects.java:203) ~[?:1.8.0_161]
        at java.util.Optional.<init>(Optional.java:96) ~[?:1.8.0_161]
        at java.util.Optional.of(Optional.java:108) ~[?:1.8.0_161]
        at org.elasticsearch.xpack.security.audit.logfile.LoggingAuditTrail.indices(LoggingAuditTrail.java:529) ~[?:?]
        at org.elasticsearch.xpack.security.audit.logfile.LoggingAuditTrail.accessGranted(LoggingAuditTrail.java:319) ~[?:?]
        at org.elasticsearch.xpack.security.audit.AuditTrailService.accessGranted(AuditTrailService.java:148) ~[?:?]
        at org.elasticsearch.xpack.security.authz.AuthorizationService.grant(AuthorizationService.java:572) ~[?:?]
        at org.elasticsearch.xpack.security.authz.AuthorizationService.authorize(AuthorizationService.java:198) ~[?:?]
        at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.lambda$authorizeRequest$4(SecurityActionFilter.java:176) ~[?:?]
        at org.elasticsearch.xpack.security.authz.AuthorizationUtils$AsyncAuthorizer.maybeRun(AuthorizationUtils.java:183) ~[?:?]
        ... 130 more

Production release

Hello,
when do you think to release a version which is ready for production?

Edit:
We tried to install your plugin on my elastic cluster enviroment

when I changed the following option
[2016-08-24 11:49:18,731][INFO ][cluster.routing.allocation.decider] [$HOSTNAME] updating [cluster.routing.allocation.enable] from [NONE] to [ALL]

the node stopped responding and I was also not able to stop elasticsearch.

I could find these entries in the logfile

[2016-08-24 11:57:36,341][ERROR][RestPrometheusMetricsAction] Can not increment metric indices_doc_deleted_count with value -3.000000, skipping [2016-08-24 11:57:46,440][ERROR][RestPrometheusMetricsAction] Can not increment metric indices_doc_deleted_count with value -15.000000, skipping [2016-08-24 11:57:56,349][ERROR][RestPrometheusMetricsAction] Can not increment metric indices_doc_deleted_count with value -13.000000, skipping [2016-08-24 11:58:06,441][ERROR][RestPrometheusMetricsAction] Can not increment metric indices_doc_deleted_count with value -1.000000, skipping [2016-08-24 11:58:16,346][ERROR][RestPrometheusMetricsAction] Can not increment metric indices_doc_deleted_count with value -10.000000, skipping [2016-08-24 11:58:26,349][ERROR][RestPrometheusMetricsAction] Can not increment metric indices_doc_deleted_count with value -2.000000, skipping [2016-08-24 11:59:06,444][ERROR][RestPrometheusMetricsAction] Can not increment metric indices_doc_deleted_count with value -24.000000, skipping [2016-08-24 11:59:16,344][ERROR][RestPrometheusMetricsAction] Can not increment metric indices_doc_deleted_count with value -8.000000, skipping [2016-08-24 11:59:26,336][ERROR][RestPrometheusMetricsAction] Can not increment metric indices_doc_deleted_count with value -50.000000, skipping [2016-08-24 11:59:36,443][ERROR][RestPrometheusMetricsAction] Can not increment metric indices_doc_deleted_count with value -46.000000, skipping [2016-08-24 11:59:46,335][ERROR][RestPrometheusMetricsAction] Can not increment metric indices_doc_deleted_count with value -32.000000, skipping

Best

Support for ES 1.7.X

Although ES 1.7 is quite old it still might be used in some places. Would it be a big deal to support those older versions of ES too?

[Warning] Do not execute a blocking operation on a networking thread

I am currently implementing integration test for this plugin based on ESIntegTestCase. See docs about integration tests for more details. (PS: I am about to send PR soon)

Within that integration test, when doing HTTP request to ES node pointing to /_prometheus/metrics endpoint I am getting the following assertion error:

10 03, 2017 4:22:20 午後 org.elasticsearch.rest.prometheus.SmokeElasticsearchIntegrationTest testClusterIsEmpty
INFO: Node http address: 127.0.0.1:19301
10 03, 2017 4:22:20 午後 org.elasticsearch.rest.BytesRestResponse convert
WARNING: path: /_prometheus/metrics, params: {}
java.lang.AssertionError: Expected current thread [Thread[elasticsearch[node_s1][http_server_worker][T#1]{New I/O worker #6},5,TGRP-SmokeElasticsearchIntegrationTest]] to not be a transport thread. Reason: [Blocking operation]
	at org.elasticsearch.transport.Transports.assertNotTransportThread(Transports.java:62)
	at org.elasticsearch.common.util.concurrent.BaseFuture.get(BaseFuture.java:119)
	at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:42)
	at org.compuscene.metrics.prometheus.PrometheusMetricsCollector.<init>(PrometheusMetricsCollector.java:35)
...

This can happen when calls like the following one are made (taken from PrometheusMetricsCollector.java)

NodesStatsResponse nodesStatsResponse = this.client.admin().cluster().nodesStats(nodesStatsRequest).actionGet();

I think this is similar problem that is discussed in elastic/elasticsearch#17865

As explained in the ticket this assertion error is not thrown when ES is run standalone (unless enabled) but in general I think this might be a good indication the internals of the plugin should not use blocking calls but should be reimplemented to async fashion.

Expose whole cluster logs

I'd like to monitor data and master nodes JVM logs, but nor data neither master have enabled 9200 HTTP port. Only client pods have it. And metrics of the client show only client related metrics. Is it possible to server whole cluster metrics without enabling HTTP port on data and master nodes? Kopf plugin already provide this info.

Does it sound reasonable to implement this feature?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.