Skip to content

Commit

Permalink
Tag 1.0.0-rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikschulz committed Jun 28, 2017
1 parent 18e171b commit 63177b8
Show file tree
Hide file tree
Showing 5 changed files with 138 additions and 31 deletions.
29 changes: 29 additions & 0 deletions .promu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ repository:
build:
flags: -a -tags netgo
ldflags: |
-s
-X {{repoPath}}/vendor/github.com/prometheus/common/version.Version={{.Version}}
-X {{repoPath}}/vendor/github.com/prometheus/common/version.Revision={{.Revision}}
-X {{repoPath}}/vendor/github.com/prometheus/common/version.Branch={{.Branch}}
Expand All @@ -13,3 +14,31 @@ build:
tarball:
files:
- LICENSE
- README.md
- examples/grafana/dashboard.json
- examples/kubernetes/deployment.yml
- examples/prometheus/elasticsearch.rules
crossbuild:
platforms:
- linux/amd64
- linux/386
- darwin/amd64
- darwin/386
- windows/amd64
- windows/386
- freebsd/amd64
- freebsd/386
- openbsd/amd64
- openbsd/386
- netbsd/amd64
- netbsd/386
- dragonfly/amd64
- linux/arm
- linux/arm64
- freebsd/arm
- openbsd/arm
- netbsd/arm
- linux/ppc64
- linux/ppc64le
- linux/mips64
- linux/mips64le
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,18 @@ build: promu
@echo ">> building binaries"
@$(PROMU) build --prefix $(PREFIX)

crossbuild: promu
@echo ">> cross-building binaries"
@$(PROMU) crossbuild

tarball: promu
@echo ">> building release tarball"
@$(PROMU) tarball --prefix $(PREFIX) $(BIN_DIR)

tarballs: promu
@echo ">> building release tarballs"
@$(PROMU) tarballs --prefix $(PREFIX) $(BIN_DIR)

docker:
@echo ">> building docker image"
@docker build -t "$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" .
Expand Down
61 changes: 31 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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 <matthias.loibl@justwatch.com> @metalmatze
* Dominik Schulz <dominik.schulz@justwatch.com> @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.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.2
1.0.0-rc1
69 changes: 69 additions & 0 deletions examples/kubernetes/deployment.yml
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

0 comments on commit 63177b8

Please sign in to comment.