Full Docs : https://w3.nue.suse.com/~mnapp/2018-11-19/book.caasp.admin/cha.admin.monitoring.html. This version is for a slim version of the original deployment. This requires NFS storage but does not need secrets. This version also enabled alertManager in Prometheus. NFS server is 10.86.1.244:/var/nfs which is behind SUSE VPN.
kubectl create namespace monitoring
kubectl apply -f pv-pvc-monitoring.yaml
kubectl get pvkubectl get pvc -n monitoring
kubectl apply -f test-pod.yaml- check the test-pod
- if you see tes-pod is a pending status, then there is a problem with server connection, configuration to NFS client, or not enough storage space.
kubectl get pod -n monitoring - if you see test-pod is completed, then you are ready to use nfs PVC.
kubectl get pod -n monitoring --show-all
- if you see tes-pod is a pending status, then there is a problem with server connection, configuration to NFS client, or not enough storage space.
- check the NFS-SUCCESS file created by test-pod.yaml
sudo mount -t nfs 10.86.1.244:/var/nfs /mnt- you should see new file name NFS-SUCCESS in
ls -al /mnt sudo rm /mnt/NFS-SUCCESSsudo umount /mnt
helm install stable/prometheus --namespace monitoring --name prometheus --values prometheus-config.yaml
kubectl -n monitoring get po | grep prometheus
export NODE_PORT=$(kubectl get --namespace monitoring -o jsonpath="{.spec.ports[0].nodePort}" services prometheus-server)
export NODE_IP=$(kubectl get nodes --namespace monitoring -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
8. Replace <prometheus.server.ip.address>:<port> in prometheus-grafana-datasource.yaml into <url>:<port> from #7
url: http://<prometheus.server.ip.address>:<port>
kubectl create -f prometheus-grafana-datasource.yaml
helm install stable/grafana --namespace monitoring --name grafana --values grafana-config.yaml
11. Grafana will take up to 10 min if Grafana has a persistent option. check if all the three pods are deployed.
kubectl -n monitoring get po | grep grafana
- Get Grafana url from the following:
export NODE_PORT=$(kubectl get -o jsonpath="{.spec.ports[0].nodePort}" services grafana -n monitoring) export NODE_IP=$(kubectl get nodes -o jsonpath="{.items[0].status.addresses[0].address}") echo http://$NODE_IP:$NODE_PORT/ - Login to grafana web with admin/admin (default username/password), enter new password.
13. Add a new dashboard in the garfana web - "Kubernetes All Nodes" will be shown "System load" panel only.
1. hover your mousecursor over the + button on the left sidebar and click on the importmenuitem.
2. Paste the URL (for example) https://grafana.com/dashboards/3131 into the first input field to import the "Kubernetes All Nodes" Grafana Dashboard. After pasting in the url, the view will change to another form.
3. Now select the "Prometheus" datasource in the prometheus field and click on the import button.
1. git clone https://github.com/kubic-project/monitoring.git
2. kubectl apply -f monitoring/grafana-dashboards-caasp-cluster.yaml
3. kubectl apply -f monitoring/grafana-dashboards-caasp-namespaces.yaml
4. kubectl apply -f monitoring/grafana-dashboards-caasp-nodes.yaml
5. kubectl apply -f monitoring/grafana-dashboards-caasp-pods.yaml