Skip to content

Commit 63177b8

Browse files
committed
Tag 1.0.0-rc1
1 parent 18e171b commit 63177b8

File tree

5 files changed

+138
-31
lines changed

5 files changed

+138
-31
lines changed

.promu.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ repository:
55
build:
66
flags: -a -tags netgo
77
ldflags: |
8+
-s
89
-X {{repoPath}}/vendor/github.com/prometheus/common/version.Version={{.Version}}
910
-X {{repoPath}}/vendor/github.com/prometheus/common/version.Revision={{.Revision}}
1011
-X {{repoPath}}/vendor/github.com/prometheus/common/version.Branch={{.Branch}}
@@ -13,3 +14,31 @@ build:
1314
tarball:
1415
files:
1516
- LICENSE
17+
- README.md
18+
- examples/grafana/dashboard.json
19+
- examples/kubernetes/deployment.yml
20+
- examples/prometheus/elasticsearch.rules
21+
crossbuild:
22+
platforms:
23+
- linux/amd64
24+
- linux/386
25+
- darwin/amd64
26+
- darwin/386
27+
- windows/amd64
28+
- windows/386
29+
- freebsd/amd64
30+
- freebsd/386
31+
- openbsd/amd64
32+
- openbsd/386
33+
- netbsd/amd64
34+
- netbsd/386
35+
- dragonfly/amd64
36+
- linux/arm
37+
- linux/arm64
38+
- freebsd/arm
39+
- openbsd/arm
40+
- netbsd/arm
41+
- linux/ppc64
42+
- linux/ppc64le
43+
- linux/mips64
44+
- linux/mips64le

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,18 @@ build: promu
4343
@echo ">> building binaries"
4444
@$(PROMU) build --prefix $(PREFIX)
4545

46+
crossbuild: promu
47+
@echo ">> cross-building binaries"
48+
@$(PROMU) crossbuild
49+
4650
tarball: promu
4751
@echo ">> building release tarball"
4852
@$(PROMU) tarball --prefix $(PREFIX) $(BIN_DIR)
4953

54+
tarballs: promu
55+
@echo ">> building release tarballs"
56+
@$(PROMU) tarballs --prefix $(PREFIX) $(BIN_DIR)
57+
5058
docker:
5159
@echo ">> building docker image"
5260
@docker build -t "$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" .

README.md

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,20 @@ https://github.com/justwatchcom/elasticsearch_exporter/releases
1212
#### Docker
1313

1414
```bash
15-
docker pull justwatch/elasticsearch_exporter:0.3.2
16-
docker run --rm -p 9108:9108 justwatch/elasticsearch_exporter:0.3.2
15+
docker pull justwatch/elasticsearch_exporter:1.0.0-rc1
16+
docker run --rm -p 9108:9108 justwatch/elasticsearch_exporter:1.0.0-rc1
17+
```
18+
19+
Example `docker-compose.yml`:
20+
21+
```yaml
22+
elasticsearch_exporter:
23+
image: justwatch/elasticsearch_exporter:1.0.0-rc1
24+
environment:
25+
- '-es.uri=http://elasticsearch:9200'
26+
restart: always
27+
ports:
28+
- "127.0.0.1:9108:9108"
1729
```
1830
1931
### Configuration
@@ -24,7 +36,7 @@ elasticsearch_exporter --help
2436

2537
| Argument | Description |
2638
| -------- | ----------- |
27-
| 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.
39+
| 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.
2840
| es.all | If true, query stats for all nodes in the cluster, rather than just the node we connect to.
2941
| es.timeout | Timeout for trying to get stats from Elasticsearch. (ex: 20s) |
3042
| es.ca | Path to PEM file that contains trusted CAs for the Elasticsearch connection.
@@ -33,11 +45,6 @@ elasticsearch_exporter --help
3345
| web.listen-address | Address to listen on for web interface and telemetry. |
3446
| web.telemetry-path | Path under which to expose metrics. |
3547

36-
__NOTE:__ We support pulling stats for all nodes at once, but in production
37-
this is unlikely to be the way you actually want to run the system. It is much
38-
better to run an exporter on each Elasticsearch node to remove a single point
39-
of failure and improve the connection between operation and reporting.
40-
4148
### Metrics
4249

4350
|Name |Type |Cardinality |Help
@@ -119,36 +126,30 @@ of failure and improve the connection between operation and reporting.
119126
| elasticsearch_transport_rx_size_bytes_total | counter | 1 | Total number of bytes received
120127
| elasticsearch_transport_tx_packets_total | counter | 1 | Count of packets sent
121128
| elasticsearch_transport_tx_size_bytes_total | counter | 1 | Total number of bytes sent
122-
### Alerts & Recording Rules
123129

124-
As example alerts and recording rules I have copied my `.rules` file to this repository.
125-
Please check [elasticsearch.rules](examples/prometheus/elasticsearch.rules) in the examples folder.
130+
### Alerts & Recording Rules
126131

127-
### Development
132+
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).
128133

129-
You obviously should get the code
134+
## Credit & License
130135

131-
```bash
132-
go get -u github.com/justwatchcom/elasticsearch_exporter
133-
```
136+
`elasticsearch_exporter` is maintained by the nice folks from [JustWatch](https://www.justwatch.com/)
137+
and licensed under the terms of the Apache license.
134138

135-
Now during development I always run:
139+
This package was originally created and mainted by [Eric Richardson](https://github.com/ewr),
140+
who transferred this repository to us in January 2017.
136141

137-
```bash
138-
make build && ./elasticsearch_exporter
139-
```
142+
Maintainers of this repository:
140143

141-
### Elasticsearch 2.0
144+
* Matthias Loibl <matthias.loibl@justwatch.com> @metalmatze
145+
* Dominik Schulz <dominik.schulz@justwatch.com> @dominikschulz
142146

143-
Parts of the node stats struct changed for Elasticsearch 2.0. For the moment
144-
we'll attempt to report important values for both.
147+
Please refer to the Git commit log for a complete list of contributors.
145148

146-
* `indices.filter_cache` becomes `indices.query_cache`
147-
* `indices.query_cache` becomes `indices.request_cache`
148-
* `process.cpu` lost `user` and `sys` time, so we're now reporting `total`
149-
* Added `process.cpu.max_file_descriptors`
149+
## Contributing
150150

151-
### Original author
151+
We welcome any contributions. Please fork the project on GitHub and open
152+
Pull Requests for any proposed changes.
152153

153-
This package was originally created and mainted by [Eric Richardson](https://github.com/ewr),
154-
who transferred this repository to us in January 2017.
154+
Please note that we will not merge any changes that encourage insecure
155+
behaviour. If in doubt please open an Issue first to discuss your proposal.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.3.2
1+
1.0.0-rc1

examples/kubernetes/deployment.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
apiVersion: extensions/v1beta1
2+
kind: Deployment
3+
metadata:
4+
name: p8s-elastic-exporter
5+
spec:
6+
replicas: 1
7+
strategy:
8+
rollingUpdate:
9+
maxSurge: 1
10+
maxUnavailable: 0
11+
type: RollingUpdate
12+
template:
13+
metadata:
14+
annotations:
15+
prometheus.io/port: "9108"
16+
prometheus.io/scrape: "true"
17+
labels:
18+
app: p8s-elastic-exporter
19+
spec:
20+
securityContext:
21+
runAsNonRoot: true
22+
runAsUser: 1000
23+
containers:
24+
- command:
25+
- /bin/elasticsearch_exporter
26+
- -es.uri=http://elasticsearch:9200
27+
- -es.all=true
28+
image: juswatch/elasticsearch_exporter:0.3.3
29+
securityContext:
30+
capabilities:
31+
drop:
32+
- SETPCAP
33+
- MKNOD
34+
- AUDIT_WRITE
35+
- CHOWN
36+
- NET_RAW
37+
- DAC_OVERRIDE
38+
- FOWNER
39+
- FSETID
40+
- KILL
41+
- SETGID
42+
- SETUID
43+
- NET_BIND_SERVICE
44+
- SYS_CHROOT
45+
- SETFCAP
46+
readOnlyRootFilesystem: true
47+
livenessProbe:
48+
httpGet:
49+
path: /health
50+
port: 9108
51+
initialDelaySeconds: 30
52+
timeoutSeconds: 10
53+
name: p8s-elastic-exporter
54+
ports:
55+
- containerPort: 9108
56+
readinessProbe:
57+
httpGet:
58+
path: /health
59+
port: 9108
60+
initialDelaySeconds: 10
61+
timeoutSeconds: 10
62+
resources:
63+
limits:
64+
cpu: 100m
65+
memory: 128Mi
66+
requests:
67+
cpu: 25m
68+
memory: 64Mi
69+
restartPolicy: Always

0 commit comments

Comments
 (0)