Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ This results in an ArangoDB Exporter exposing all statistics of
the ArangoDB server (running at `http://<your-database-host>:8529`)
at `http://<your-host-ip>:9101/metrics`.

## Running in Docker

To run the ArangoDB Exporter in docker, use an image such as
[`arangodb/arangodb-exporter:0.1.3`](https://hub.docker.com/r/arangodb/arangodb-exporter/).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we maybe have a latest tag for the exporter and reference this here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

latest tag does not exist right now.


## Configuring Prometheus

There are several ways to configure Prometheus to fetch metrics from the ArangoDB Exporter.
Expand All @@ -36,6 +41,56 @@ scrape_configs:

For more info on configuring Prometheus go to [its configuration documentation](https://prometheus.io/docs/prometheus/latest/configuration/configuration).

If you're using the [Prometheus Operator](https://github.com/coreos/prometheus-operator)
in Kubernetes, you need to create an additional `Service` and a `ServiceMonitor` resource
like this:

```yaml
kind: Service
apiVersion: v1
metadata:
name: arangodb-exporters-service
labels:
app: arangodb-exporter
spec:
selector:
app: arangodb-exporter
ports:
- name: metrics
port: 9101

---

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: arangodb-exporter
namespace: monitoring
labels:
team: frontend
prometheus: kube-prometheus
spec:
namespaceSelector:
matchNames:
- default
selector:
matchLabels:
app: arangodb-exporter
endpoints:
- port: metrics
scheme: https
tlsConfig:
insecureSkipVerify: true
```

Note 1: that the typical deployment on the Prometheus operator is done in
a namespace called `monitoring`. Make sure to match the `namespace`
of the `ServiceMonitor` to match that.

Note 2: that the `Prometheus` custom resource has a field called `serviceMonitorSelector`.
Make sure that the `matchLabels` selector in there matches the labels of
your `ServiceMonitor`.

## Building

To build this project, you need Go 1.8 or higher and Docker installed.
Expand Down