Skip to content

interconnectedcloud/qdr-monitoring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monitor routers with prometheus

Following are instructions for using prometheus / grafana to monitor a Kubernetes cluster that is running Apache Qpid Dispatch Router.

Notes

These examples are provided for developers to quickly get started with monitoring the dispatch router and are not intended for use in production environments.

These instruction will only setup monitoring of the routers in the cluster. It will not monitor any user applications that connect to those routers.

Prerequisites / assumptions

You will need access to a Kubernetes cluster running a deployment of the router. See qdr-operator for instructions on how to install the qdr-operator into your cluster.

This guide assumes you are using a project named 'myproject'. If not, change all namespace definitions to your current project name.

Router network

After the qdr-operator is installed, the router network used in this example is deployed using:

$ kubectl apply -f mesh-3.yaml

Check to ensure the router network is available:

$ kubectl rollout status deployment/example-interconnect -w -n myproject

Deploy prometheus / grafana

All of the commands needed to install prometheus/grafana monitoring are in the deploy-monitoring script:

$ ./deploy-monitoring.sh

If you recieve any errors, you can run the individual command separately:

Create the prometheus deployment and alertmanager

$ kubectl apply -f ./monitoring/alerting-interconnect.yaml -n myproject
$ kubectl apply -f ./monitoring/prometheus.yaml -n myproject
$ kubectl apply -f ./monitoring/alertmanager.yaml -n myproject

Wait for Prometheus server to be ready

$ kubectl rollout status deployment/prometheus -w -n myproject
$ kubectl rollout status deployment/alertmanager -w -n myproject
$ kubectl create -f ./monitoring/route-alertmanager.yaml -n myproject
$ kubectl create -f ./monitoring/route-prometheus.yaml -n myproject

Prepare Grafana datasource and dashboards

$ kubectl create configmap grafana-config \
    --from-file=datasource.yaml=./monitoring/dashboards/datasource.yaml \
    --from-file=grafana-dashboard-provider.yaml=./monitoring/grafana-dashboard-provider.yaml \
    --from-file=interconnect-dashboard.json=./monitoring/dashboards/interconnect-raw.json \
    --from-file=interconnect-dashboard-delayed.json=./monitoring/dashboards/interconnect-delayed.json \
    -n myproject

Deploy grafana

$ kubectl apply -f ./monitoring/grafana.yaml -n myproject

Wait for Grafana server to be ready

$ kubectl rollout status deployment/grafana -w -n myproject
$ kubectl create -f ./monitoring/route-grafana.yaml -n myproject

About

Prometheus/Grafana deployments for kubernetes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •