janusgraph-prometheus
janusgraph-prometheus copied to clipboard
Prometheus setup for JanusGraph
README
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
Dependencies
- JanusGraph
- Kubernetes
- CoreOS Prometheus
Setup
ConfigMap
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
Deployment
kubectl apply -f janusgraph/janusgraph-deployment.yaml
Service
kubectl apply -f janusgraph/janusgraph-service.yaml
ServiceMonitor
---
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
Grafana
datasourcein Dashboard json is hard-wiredprometheus.