Skip to content

Commit a759b9c

Browse files
committed
Added examples for exposing metrics to Prometheus
1 parent c9f86f3 commit a759b9c

File tree

4 files changed

+44
-1
lines changed

4 files changed

+44
-1
lines changed
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
# Metrics
22

3-
TBD
3+
The ArangoDB Kubernetes Operator (`kube-arangodb`) exposes metrics of
4+
its operations in a format that is compatible with [Prometheus](https://prometheus.io).
5+
6+
The metrics are exposed through HTTPS on port `8528` under path `/metrics`.
7+
8+
Look at [examples/metrics](https://github.com/arangodb/kube-arangodb/tree/master/examples/metrics)
9+
for examples of `Services` and `ServiceMonitors` you can use to integrate
10+
with Prometheus through the [Prometheus-Operator by CoreOS](https://github.com/coreos/prometheus-operator).
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This example shows how to integrate with the Prometheus Operator
2+
# to bring metrics from kube-arangodb to Prometheus.
3+
4+
apiVersion: v1
5+
kind: Service
6+
metadata:
7+
name: arango-deployment-operator
8+
labels:
9+
app: arango-deployment-operator
10+
spec:
11+
selector:
12+
app: arango-deployment-operator
13+
ports:
14+
- name: metrics
15+
port: 8528
16+
17+
---
18+
19+
apiVersion: monitoring.coreos.com/v1
20+
kind: ServiceMonitor
21+
metadata:
22+
name: arango-deployment-operator
23+
labels:
24+
team: frontend
25+
spec:
26+
selector:
27+
matchLabels:
28+
app: arango-deployment-operator
29+
endpoints:
30+
- port: metrics
31+
scheme: https
32+
tlsConfig:
33+
insecureSkipVerify: true
34+

manifests/templates/deployment/deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ spec:
1212
metadata:
1313
labels:
1414
name: {{ .Deployment.OperatorDeploymentName }}
15+
app: arango-deployment-operator
1516
spec:
1617
containers:
1718
- name: operator

manifests/templates/storage/deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ spec:
2020
metadata:
2121
labels:
2222
name: {{ .Storage.OperatorDeploymentName }}
23+
app: arango-storage-operator
2324
spec:
2425
serviceAccountName: {{ .Storage.Operator.ServiceAccountName }}
2526
containers:

0 commit comments

Comments
 (0)