Skip to content

Commit 6acdab9

Browse files
committed
Upgrade to ElasticSearch 5.3.0
1 parent ab79963 commit 6acdab9

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Current available metrics are :
2121

2222
| Elasticsearch | Plugin | Release date | Prod ready ? |
2323
| -------------- | -------------- | ------------ | ------------ |
24+
| 5.3.0 | 5.3.0.0 | Mar 29, 2017 | NO |
2425
| 5.2.2 | 5.2.2.0 | Mar 03, 2017 | NO |
2526
| 5.2.1 | 5.2.1.0 | Feb 17, 2017 | NO |
2627
| 5.2.0 | 5.2.0.0 | Feb 03, 2017 | NO |
@@ -43,7 +44,7 @@ Current available metrics are :
4344
## Install
4445

4546
- Since ElasticSearch 5.0.0 :
46-
./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
47+
./bin/elasticsearch-plugin install -b https://github.com/vvanholl/elasticsearch-prometheus-exporter/releases/download/5.3.0.0/elasticsearch-prometheus-exporter-5.3.0.0.zip
4748

4849
- On old 2.x.x versions :
4950
./bin/plugin install https://github.com/vvanholl/elasticsearch-prometheus-exporter/releases/download/2.4.1.0/elasticsearch-prometheus-exporter-2.4.1.0.zip

plugin-descriptor.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
description=Prometheus Exporter
3535
#
3636
# 'version': plugin's version
37-
version=5.2.2.0
37+
version=5.3.0.0
3838
#
3939
# 'name': the plugin name
4040
name=prometheus-exporter
@@ -68,5 +68,5 @@ java.version=1.8
6868
# elasticsearch release. This version is checked when the plugin
6969
# is loaded so Elasticsearch will refuse to start in the presence of
7070
# plugins with the incorrect elasticsearch.version.
71-
elasticsearch.version=5.2.2
71+
elasticsearch.version=5.3.0
7272
#

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</scm>
2828

2929
<properties>
30-
<elasticsearch.version>5.2.2</elasticsearch.version>
30+
<elasticsearch.version>5.3.0</elasticsearch.version>
3131
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3232
</properties>
3333

src/main/java/org/elasticsearch/plugin/prometheus/PrometheusExporterPlugin.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
package org.elasticsearch.plugin.prometheus;
22

33
import org.apache.logging.log4j.Logger;
4+
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
5+
import org.elasticsearch.cluster.node.DiscoveryNodes;
46
import org.elasticsearch.common.inject.Inject;
57
import org.elasticsearch.common.logging.Loggers;
8+
import org.elasticsearch.common.settings.ClusterSettings;
9+
import org.elasticsearch.common.settings.IndexScopedSettings;
610
import org.elasticsearch.common.settings.Settings;
11+
import org.elasticsearch.common.settings.SettingsFilter;
712
import org.elasticsearch.index.IndexModule;
813
import org.elasticsearch.plugins.ActionPlugin;
914
import org.elasticsearch.plugins.Plugin;
15+
import org.elasticsearch.rest.RestController;
1016
import org.elasticsearch.rest.RestHandler;
1117
import org.elasticsearch.rest.prometheus.RestPrometheusMetricsAction;
1218

19+
import java.util.Arrays;
1320
import java.util.List;
14-
15-
import static java.util.Collections.singletonList;
21+
import java.util.function.Supplier;
1622

1723
public class PrometheusExporterPlugin extends Plugin implements ActionPlugin {
1824

@@ -29,8 +35,10 @@ public void onIndexModule(IndexModule indexModule) {
2935
}
3036

3137
@Override
32-
public List<Class<? extends RestHandler>> getRestHandlers() {
33-
return singletonList(RestPrometheusMetricsAction.class);
38+
public List<RestHandler> getRestHandlers(Settings settings, RestController restController, ClusterSettings clusterSettings, IndexScopedSettings indexScopedSettings, SettingsFilter settingsFilter, IndexNameExpressionResolver indexNameExpressionResolver, Supplier<DiscoveryNodes> nodesInCluster) {
39+
return Arrays.asList(
40+
new RestPrometheusMetricsAction(settings, restController)
41+
);
3442
}
3543

3644
}

0 commit comments

Comments
 (0)