-
Notifications
You must be signed in to change notification settings - Fork 796
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
18e171b
commit 63177b8
Showing
5 changed files
with
138 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,20 @@ https://github.com/justwatchcom/elasticsearch_exporter/releases | |
#### Docker | ||
|
||
```bash | ||
docker pull justwatch/elasticsearch_exporter:0.3.2 | ||
docker run --rm -p 9108:9108 justwatch/elasticsearch_exporter:0.3.2 | ||
docker pull justwatch/elasticsearch_exporter:1.0.0-rc1 | ||
docker run --rm -p 9108:9108 justwatch/elasticsearch_exporter:1.0.0-rc1 | ||
``` | ||
|
||
Example `docker-compose.yml`: | ||
|
||
```yaml | ||
elasticsearch_exporter: | ||
image: justwatch/elasticsearch_exporter:1.0.0-rc1 | ||
environment: | ||
- '-es.uri=http://elasticsearch:9200' | ||
restart: always | ||
ports: | ||
- "127.0.0.1:9108:9108" | ||
``` | ||
### Configuration | ||
|
@@ -24,7 +36,7 @@ elasticsearch_exporter --help | |
|
||
| Argument | Description | | ||
| -------- | ----------- | | ||
| es.uri | Address (host and port) of the Elasticsearch node we should connect to. This could be a local node (`localhost:8500`, for instance), or the address of a remote Elasticsearch server. | ||
| es.uri | Address (host and port) of the Elasticsearch node we should connect to. This could be a local node (`localhost:9200`, for instance), or the address of a remote Elasticsearch server. | ||
| es.all | If true, query stats for all nodes in the cluster, rather than just the node we connect to. | ||
| es.timeout | Timeout for trying to get stats from Elasticsearch. (ex: 20s) | | ||
| es.ca | Path to PEM file that contains trusted CAs for the Elasticsearch connection. | ||
|
@@ -33,11 +45,6 @@ elasticsearch_exporter --help | |
| web.listen-address | Address to listen on for web interface and telemetry. | | ||
| web.telemetry-path | Path under which to expose metrics. | | ||
|
||
__NOTE:__ We support pulling stats for all nodes at once, but in production | ||
this is unlikely to be the way you actually want to run the system. It is much | ||
better to run an exporter on each Elasticsearch node to remove a single point | ||
of failure and improve the connection between operation and reporting. | ||
|
||
### Metrics | ||
|
||
|Name |Type |Cardinality |Help | ||
|
@@ -119,36 +126,30 @@ of failure and improve the connection between operation and reporting. | |
| elasticsearch_transport_rx_size_bytes_total | counter | 1 | Total number of bytes received | ||
| elasticsearch_transport_tx_packets_total | counter | 1 | Count of packets sent | ||
| elasticsearch_transport_tx_size_bytes_total | counter | 1 | Total number of bytes sent | ||
### Alerts & Recording Rules | ||
|
||
As example alerts and recording rules I have copied my `.rules` file to this repository. | ||
Please check [elasticsearch.rules](examples/prometheus/elasticsearch.rules) in the examples folder. | ||
### Alerts & Recording Rules | ||
|
||
### Development | ||
We provide examples for [Prometheus](http://prometheus.io) [alerts and recording rules](examples/prometheus/elasticsearch.rules) as well as an [Grafana](http://www.grafana.org) [Dashboard](examples/grafana/dashboard.json) and a [Kubernetes](http://kubernetes.io) [Deployment](examples/kubernetes/deployment.yml). | ||
|
||
You obviously should get the code | ||
## Credit & License | ||
|
||
```bash | ||
go get -u github.com/justwatchcom/elasticsearch_exporter | ||
``` | ||
`elasticsearch_exporter` is maintained by the nice folks from [JustWatch](https://www.justwatch.com/) | ||
and licensed under the terms of the Apache license. | ||
|
||
Now during development I always run: | ||
This package was originally created and mainted by [Eric Richardson](https://github.com/ewr), | ||
who transferred this repository to us in January 2017. | ||
|
||
```bash | ||
make build && ./elasticsearch_exporter | ||
``` | ||
Maintainers of this repository: | ||
|
||
### Elasticsearch 2.0 | ||
* Matthias Loibl <[email protected]> @metalmatze | ||
* Dominik Schulz <[email protected]> @dominikschulz | ||
|
||
Parts of the node stats struct changed for Elasticsearch 2.0. For the moment | ||
we'll attempt to report important values for both. | ||
Please refer to the Git commit log for a complete list of contributors. | ||
|
||
* `indices.filter_cache` becomes `indices.query_cache` | ||
* `indices.query_cache` becomes `indices.request_cache` | ||
* `process.cpu` lost `user` and `sys` time, so we're now reporting `total` | ||
* Added `process.cpu.max_file_descriptors` | ||
## Contributing | ||
|
||
### Original author | ||
We welcome any contributions. Please fork the project on GitHub and open | ||
Pull Requests for any proposed changes. | ||
|
||
This package was originally created and mainted by [Eric Richardson](https://github.com/ewr), | ||
who transferred this repository to us in January 2017. | ||
Please note that we will not merge any changes that encourage insecure | ||
behaviour. If in doubt please open an Issue first to discuss your proposal. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.3.2 | ||
1.0.0-rc1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: p8s-elastic-exporter | ||
spec: | ||
replicas: 1 | ||
strategy: | ||
rollingUpdate: | ||
maxSurge: 1 | ||
maxUnavailable: 0 | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
annotations: | ||
prometheus.io/port: "9108" | ||
prometheus.io/scrape: "true" | ||
labels: | ||
app: p8s-elastic-exporter | ||
spec: | ||
securityContext: | ||
runAsNonRoot: true | ||
runAsUser: 1000 | ||
containers: | ||
- command: | ||
- /bin/elasticsearch_exporter | ||
- -es.uri=http://elasticsearch:9200 | ||
- -es.all=true | ||
image: juswatch/elasticsearch_exporter:0.3.3 | ||
securityContext: | ||
capabilities: | ||
drop: | ||
- SETPCAP | ||
- MKNOD | ||
- AUDIT_WRITE | ||
- CHOWN | ||
- NET_RAW | ||
- DAC_OVERRIDE | ||
- FOWNER | ||
- FSETID | ||
- KILL | ||
- SETGID | ||
- SETUID | ||
- NET_BIND_SERVICE | ||
- SYS_CHROOT | ||
- SETFCAP | ||
readOnlyRootFilesystem: true | ||
livenessProbe: | ||
httpGet: | ||
path: /health | ||
port: 9108 | ||
initialDelaySeconds: 30 | ||
timeoutSeconds: 10 | ||
name: p8s-elastic-exporter | ||
ports: | ||
- containerPort: 9108 | ||
readinessProbe: | ||
httpGet: | ||
path: /health | ||
port: 9108 | ||
initialDelaySeconds: 10 | ||
timeoutSeconds: 10 | ||
resources: | ||
limits: | ||
cpu: 100m | ||
memory: 128Mi | ||
requests: | ||
cpu: 25m | ||
memory: 64Mi | ||
restartPolicy: Always |