dylanht / janusgraph-prometheus

Prometheus setup for JanusGraph

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README

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

This setup uses

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
kubectl create configmap janusgraph-prom-config --namespace=$namespace --from-file=janusgraph/  -o yaml --dry-run | kubectl replace -f -

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

  • datasource in Dashboard json is hard-wired prometheus.
  • Screenshot

About

Prometheus setup for JanusGraph