Following are instructions for using prometheus / grafana to monitor a Kubernetes cluster that is running Apache Qpid Dispatch Router.
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.
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.
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
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:
$ 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
$ 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
$ 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
$ kubectl apply -f ./monitoring/grafana.yaml -n myproject
$ kubectl rollout status deployment/grafana -w -n myproject
$ kubectl create -f ./monitoring/route-grafana.yaml -n myproject