You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are several ways to configure Prometheus to fetch metrics from the ArangoDB Exporter.
@@ -36,6 +41,56 @@ scrape_configs:
36
41
37
42
For more info on configuring Prometheus go to [its configuration documentation](https://prometheus.io/docs/prometheus/latest/configuration/configuration).
38
43
44
+
If you're using the [Prometheus Operator](https://github.com/coreos/prometheus-operator)
45
+
in Kubernetes, you need to create an additional `Service` and a `ServiceMonitor` resource
46
+
like this:
47
+
48
+
```yaml
49
+
kind: Service
50
+
apiVersion: v1
51
+
metadata:
52
+
name: arangodb-exporters-service
53
+
labels:
54
+
app: arangodb-exporter
55
+
spec:
56
+
selector:
57
+
app: arangodb-exporter
58
+
ports:
59
+
- name: metrics
60
+
port: 9101
61
+
62
+
---
63
+
64
+
apiVersion: monitoring.coreos.com/v1
65
+
kind: ServiceMonitor
66
+
metadata:
67
+
name: arangodb-exporter
68
+
namespace: monitoring
69
+
labels:
70
+
team: frontend
71
+
prometheus: kube-prometheus
72
+
spec:
73
+
namespaceSelector:
74
+
matchNames:
75
+
- default
76
+
selector:
77
+
matchLabels:
78
+
app: arangodb-exporter
79
+
endpoints:
80
+
- port: metrics
81
+
scheme: https
82
+
tlsConfig:
83
+
insecureSkipVerify: true
84
+
```
85
+
86
+
Note 1: that the typical deployment on the Prometheus operator is done in
87
+
a namespace called `monitoring`. Make sure to match the `namespace`
88
+
of the `ServiceMonitor` to match that.
89
+
90
+
Note 2: that the `Prometheus` custom resource has a field called `serviceMonitorSelector`.
91
+
Make sure that the `matchLabels` selector in there matches the labels of
92
+
your `ServiceMonitor`.
93
+
39
94
## Building
40
95
41
96
To build this project, you need Go 1.8 or higher and Docker installed.
0 commit comments