gguttikonda / janusgraph-prometheus

Prometheus setup for JanusGraph
17 stars 10 forks source link
grafana janusgraph prometheus

README

A simple setup to export JanusGraph JMX metrics as Prometheus endpoint and a utility Grafana dashboard to read metrics.

This setup uses

Dependencies

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