Skip to main content
Version: Next

Monitoring

Dragonfly is recommending to use prometheus for monitoring. Prometheus and grafana configurations are maintained in the dragonflyoss/monitoring repository.

Grafana dashboards are published in grafana.com, and the address of the dashboards are Manager, Scheduler and Peer.

The following dragonfly monitoring example is based on kubernetes, and uses the prometheus-community/kube-prometheus-stack charts to deploy prometheus and grafana.

Step 1: Install prometheus and grafana

Install prometheus and grafana based on kube-prometheus-stack

  • Get Repo Info
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
  • Install kube-prometheus-stack charts
helm install prometheus prometheus-community/kube-prometheus-stack -f https://raw.githubusercontent.com/dragonflyoss/monitoring/main/prometheus/values.yaml
  • Expose the grafana port at address localhost:8080
kubectl port-forward svc/prometheus-grafana 8080:80
  • Visit address localhost:8080 to see the grafana dashboard. You can login with username admin and password prom-operator

grafana-login

Step 2: Install dragonfly with ServiceMonitor

Install dragonfly based on dragonfly.

  • Get Repo Info
helm repo add dragonfly https://dragonflyoss.github.io/helm-charts/
helm repo update
  • Configure dragonfly charts with ServiceMonitor, refer to serviceMonitor in chart values. Generate dragonfly charts configuration values.yaml is as follows:
scheduler:
image: d7yio/scheduler
tag: latest
metrics:
enable: true
serviceMonitor:
enable: true

seedPeer:
image: d7yio/dfdaemon
tag: latest
metrics:
enable: true
serviceMonitor:
enable: true

dfdaemon:
image: d7yio/dfdaemon
tag: latest
metrics:
enable: true
serviceMonitor:
enable: true

manager:
image: d7yio/manager
tag: latest
metrics:
enable: true
serviceMonitor:
enable: true
  • Install dragonfly charts with ServiceMonitor
helm install --create-namespace --namespace dragonfly-system dragonfly dragonfly/dragonfly -f values.yaml

Step 3: Validate metrics

Visit grafana explore page at localhost:8080/explore and query dragonfly_manager_requests_total to validate that dragonfly metrics have been collected.

grafana-validate-metrics

Step 4: Import dragonfly grafana dashboards

Dragonfly grafana dashboard info is:

NameIDLinkDescription
Dragonfly Manager15945https://grafana.com/grafana/dashboards/15945Granafa dashboard for dragonfly manager.
Dragonfly Scheduler15944https://grafana.com/grafana/dashboards/15944Granafa dashboard for dragonfly scheduler.
Dragonfly Peer15946https://grafana.com/grafana/dashboards/15946Granafa dashboard for dragonfly peer.
  • Import dragonfly grafana dashboard using ID, IDs are 15945, 15944 and 15946, refer to export-import

grafana-import-dashboard

  • Import dragonfly grafana dashboard successfully, you can visit the dashboard

grafana-manager

grafana-scheduler

grafana-peer