A simple setup to export JanusGraph JMX metrics as Prometheus endpoint and a utility Grafana dashboard to read metrics.
This setup uses
- JanusGraph as Kubernetes service deployment.
- JanusGraph JMX metrics
- JMX Prometheus exporter.
- Prometheus Operator
- JanusGraph
- Kubernetes
- CoreOS Prometheus
Upload the jmx_exporter and config.yml as ConfigMap
namespace='database'
kubectl create configmap janusgraph-prom-config --namespace=$namespace --from-file=janusgraph/config.yml --from-file=janusgraph/jmx_prometheus_javaagent-0.3.1.jar
kubectl apply -f janusgraph/janusgraph-deployment.yaml
kubectl apply -f janusgraph/janusgraph-service.yaml
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
namespace: monitoring
name: jg-metrics-reader
labels:
team: backend
spec:
jobLabel: team
selector:
matchLabels:
team: backend
namespaceSelector:
matchNames:
- database
endpoints:
- port: jg-prom-port
interval: 15s
path: /metrics
datasource
in Dashboard json is hard-wiredprometheus
.