1
- ![ CI ] ( https://github.com/vvanholl/elasticsearch-prometheus-exporter/workflows/CI/badge.svg?branch=master )
1
+ # Prometheus Exporter Plugin for OpenSearch
2
2
3
- # Prometheus Exporter Plugin for Elasticsearch
4
-
5
- This is a builtin exporter from Elasticsearch to Prometheus.
6
- It collects all relevant metrics and makes them available to Prometheus via the Elasticsearch REST API.
3
+ This is a builtin exporter from OpenSearch to Prometheus based on the code of Vincent Van Hollebeke and others at https://github.com/vvanholl/elasticsearch-prometheus-exporter .
4
+ It collects all relevant metrics and makes them available to Prometheus via the OpenSearch REST API.
7
5
8
6
** Currently, the available metrics are:**
9
7
@@ -19,54 +17,19 @@ It collects all relevant metrics and makes them available to Prometheus via the
19
17
- File System
20
18
- Circuit Breaker
21
19
- Indices status
22
- - Cluster settings (selected [ disk allocation settings ] ( https://www.elastic.co/guide/en/elasticsearch/reference/master/disk-allocator.html ) only)
20
+ - Cluster settings
23
21
24
22
## Compatibility matrix
25
23
26
- ### Version 7.X
27
-
28
- | Elasticsearch | Plugin | Release date |
29
- | -------------- | -------------- | ------------ |
30
- | 7.13.2 | 7.13.2.0 | Jun 15, 2021 |
31
- | 7.13.1 | 7.13.1.0 | Jun 12, 2021 |
32
- | 7.13.0 | 7.13.0.0 | May 27, 2021 |
33
- | 7.12.1 | 7.12.1.0 | May 01, 2021 |
34
- | 7.12.0 | 7.12.0.0 | Apr 04, 2021 |
35
- | 7.11.2 | 7.11.2.0 | Mar 20, 2021 |
36
- | 7.11.1 | 7.11.1.0 | Feb 22, 2021 |
37
- | 7.10.2 | 7.10.2.0 | Jan 24, 2021 |
38
- | 7.10.1 | 7.10.1.0 | Dec 13, 2020 |
39
- | 7.10.0 | 7.10.0.0 | Nov 15, 2020 |
40
- | 7.9.3 | 7.9.3.0 | Oct 22, 2020 |
41
- | 7.9.2 | 7.9.2.0 | Oct 04, 2020 |
42
- | 7.9.1 | 7.9.1.0 | Sep 06, 2020 |
43
- | 7.9.0 | 7.9.0.0 | Aug 18, 2020 |
44
- | 7.8.1 | 7.8.1.0 | Aug 10, 2020 |
45
- | 7.8.0 | 7.8.0.0 | Jun 22, 2020 |
46
- | 7.7.1 | 7.7.1.0 | Jun 04, 2020 |
47
- | 7.7.0 | 7.7.0.0 | May 14, 2020 |
48
- | 7.6.2 | 7.6.2.0 | Apr 6, 2020 |
49
- | 7.6.1 | 7.6.1.0 | Mar 30, 2020 |
50
- | 7.6.0 | 7.6.0.0 | Feb 12, 2020 |
51
- | 7.5.2 | 7.5.2.0 | Jan 25, 2020 |
52
- | 7.5.1 | 7.5.1.0 | Jan 21, 2020 |
53
- | 7.5.0 | 7.5.0.0 | Jan 16, 2020 |
54
- | 7.4.2 | 7.4.2.0 | Jan 13, 2020 |
55
- | 7.4.1 | 7.4.1.0 | Jan 13, 2020 |
56
- | 7.4.0 | 7.4.0.0 | Jan 07, 2020 |
57
- | 7.3.2 | 7.3.2.0 | Oct 05, 2019 |
58
- | 7.3.1 | 7.3.1.0 | Sep 18, 2019 |
59
- | 7.3.0 | 7.3.0.0 | Sep 17, 2019 |
60
- | 7.2.1 | 7.2.1.0 | Jul 31, 2019 |
61
- | 7.2.0 | 7.2.0.0 | Jul 12, 2019 |
62
- | 7.1.1 | 7.1.1.0 | May 31, 2019 |
63
- | 7.1.0 | 7.1.0.0 | May 23, 2019 |
64
- | 7.0.1 | 7.0.1.0 | May 08, 2019 |
65
- | 7.0.0 | 7.0.0.0 | Apr 11, 2019 |
24
+ ### Versions
25
+
26
+ | OpenSearch | Plugin | Release date |
27
+ | ----------- | -------------- | ------------ |
28
+ | 1.0.0-RC1 | 1.0.0-RC1 | Jun 24, 2021 |
66
29
67
30
## Install
68
31
69
- ` ./bin/elasticsearch -plugin install -b https://github.com/vvanholl/elasticsearch -prometheus-exporter/releases/download/7.13.2.0 /prometheus-exporter-7.13.2.0 .zip `
32
+ ` ./bin/opensearch -plugin install -b https://github.com/aparo/opensearch -prometheus-exporter/releases/download/1.0.0-RC1 /prometheus-exporter-1.0.0-RC1 .zip `
70
33
71
34
** Do not forget to restart the node after the installation!**
72
35
@@ -87,19 +50,19 @@ To disable exporting cluster settings use:
87
50
prometheus.cluster.settings: false
88
51
```
89
52
90
- These settings can be also [ updated dynamically] ( https://www.elastic.co/guide/en/elasticsearch /reference/master/cluster-update-settings.html ) .
53
+ These settings can be also [ updated dynamically] ( https://www.elastic.co/guide/en/opensearch /reference/master/cluster-update-settings.html ) .
91
54
92
55
## Uninstall
93
56
94
- ` ./bin/elasticsearch -plugin remove prometheus-exporter `
57
+ ` ./bin/opensearch -plugin remove prometheus-exporter `
95
58
96
59
Do not forget to restart the node after installation!
97
60
98
61
## Usage
99
62
100
63
Metrics are directly available at:
101
64
102
- http://<your-elasticsearch -host>:9200/_prometheus/metrics
65
+ http://<your-opensearch -host>:9200/_prometheus/metrics
103
66
104
67
As a sample result, you get:
105
68
@@ -134,7 +97,7 @@ On your Prometheus servers, configure a new job as usual.
134
97
For example, if you have a cluster of 3 nodes:
135
98
136
99
``` YAML
137
- - job_name : elasticsearch
100
+ - job_name : opensearch
138
101
scrape_interval : 10s
139
102
metrics_path : " /_prometheus/metrics"
140
103
static_configs :
@@ -148,34 +111,7 @@ Of course, you could use the service discovery service instead of a static confi
148
111
149
112
Just keep in mind that ` metrics_path` must be `/_prometheus/metrics`, otherwise Prometheus will find no metric.
150
113
151
- # # Project sources
152
-
153
- The Maven project site is available at [GitHub](https://github.com/vvanholl/elasticsearch-prometheus-exporter).
154
-
155
- # # Testing
156
-
157
- Project contains [integration tests](src/test/resources/rest-api-spec) implemented using
158
- [rest layer](https://github.com/elastic/elasticsearch/blob/master/TESTING.asciidoc#testing-the-rest-layer)
159
- framework.
160
-
161
- To run everything similar to the GitHub Actions pipeline you can do :
162
- ` ` `
163
- docker run -v $(pwd):/home/gradle gradle:7.0.2-jdk16 su gradle -c 'gradle check'
164
- ` ` `
165
- NOTE : Please keep version in sync with .github/workflows/ci.yml
166
-
167
-
168
- Complete test suite is run using :
169
- ` ` `
170
- gradle clean check
171
- ` ` `
172
-
173
- To run individual test file use :
174
- ` ` `
175
- gradle :integTest \
176
- -Dtests.class=org.elasticsearch.rest.PrometheusRestHandlerClientYamlTestSuiteIT \
177
- -Dtests.method="test {yaml=resthandler/20_metrics/Prometheus metrics can be pulled}"
178
- ` ` `
114
+ If you enable security in OpenSearch, remember to set up the credentials also in Prometheus configuration.
179
115
180
116
# # Credits
181
117
0 commit comments