Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added examples for exposing metrics to Prometheus #113

Merged
merged 1 commit into from
Apr 5, 2018
Merged
Show file tree
Hide file tree
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
9 changes: 8 additions & 1 deletion docs/Manual/Deployment/Kubernetes/Metrics.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Metrics

TBD
The ArangoDB Kubernetes Operator (`kube-arangodb`) exposes metrics of
its operations in a format that is compatible with [Prometheus](https://prometheus.io).

The metrics are exposed through HTTPS on port `8528` under path `/metrics`.

Look at [examples/metrics](https://github.com/arangodb/kube-arangodb/tree/master/examples/metrics)
for examples of `Services` and `ServiceMonitors` you can use to integrate
with Prometheus through the [Prometheus-Operator by CoreOS](https://github.com/coreos/prometheus-operator).
34 changes: 34 additions & 0 deletions examples/metrics/deployment-operator-servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This example shows how to integrate with the Prometheus Operator
# to bring metrics from kube-arangodb to Prometheus.

apiVersion: v1
kind: Service
metadata:
name: arango-deployment-operator
labels:
app: arango-deployment-operator
spec:
selector:
app: arango-deployment-operator
ports:
- name: metrics
port: 8528

---

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: arango-deployment-operator
labels:
team: frontend
spec:
selector:
matchLabels:
app: arango-deployment-operator
endpoints:
- port: metrics
scheme: https
tlsConfig:
insecureSkipVerify: true

1 change: 1 addition & 0 deletions manifests/templates/deployment/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ spec:
metadata:
labels:
name: {{ .Deployment.OperatorDeploymentName }}
app: arango-deployment-operator
spec:
containers:
- name: operator
Expand Down
1 change: 1 addition & 0 deletions manifests/templates/storage/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ spec:
metadata:
labels:
name: {{ .Storage.OperatorDeploymentName }}
app: arango-storage-operator
spec:
serviceAccountName: {{ .Storage.Operator.ServiceAccountName }}
containers:
Expand Down