nginx metrics + dashboards
This commit is contained in:
parent
0df8b4449c
commit
8e4d3eab28
31
README.md
31
README.md
@ -25,6 +25,8 @@
|
|||||||
* [Cluster monitoring](#cluster-monitoring)
|
* [Cluster monitoring](#cluster-monitoring)
|
||||||
* [Log correlation with Loki-stack](#loki-stack)
|
* [Log correlation with Loki-stack](#loki-stack)
|
||||||
* [Metrics with Prometheus-stack + Grafana](#prometheus-grafana)
|
* [Metrics with Prometheus-stack + Grafana](#prometheus-grafana)
|
||||||
|
* [Nginx ingress controller](#prometheus-nginx-ingress)
|
||||||
|
* [Grafana dashboard for Node exporter full](#prometheus-node-exporter)
|
||||||
* [HELM charts](#helm)
|
* [HELM charts](#helm)
|
||||||
* [Create a chart](#helm-create)
|
* [Create a chart](#helm-create)
|
||||||
* [Install local chart without packaging](#helm-install-without-packaging)
|
* [Install local chart without packaging](#helm-install-without-packaging)
|
||||||
@ -608,6 +610,35 @@ Access grafana web ui via port-forwarding at http://localhost:8080 (or configure
|
|||||||
kubectl -n monitoring port-forward service/prom-stack-grafana 8080:80
|
kubectl -n monitoring port-forward service/prom-stack-grafana 8080:80
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Metrics/Dashboard for Nginx ingress controller <a name="user-content-prometheus-nginx-ingress"></a>
|
||||||
|
If you want to monitor the NGINX ingress-controller as well, you´ll have to redeploy the nginx-ingress helm chart as follows:
|
||||||
|
|
||||||
|
```
|
||||||
|
helm -n ingress-nginx upgrade ingress-nginx ingress-nginx/ingress-nginx \
|
||||||
|
--set controller.metrics.enabled=true \
|
||||||
|
--set controller.metrics.serviceMonitor.enabled=true \
|
||||||
|
--set controller.metrics.serviceMonitor.additionalLabels.release="prom-stack"
|
||||||
|
```
|
||||||
|
**Note:** *controller.metrics.serviceMonitor.additionalLabels.release* must match the helm release/name of your prometheus-stack deployment:
|
||||||
|
```
|
||||||
|
helm -n monitoring ls
|
||||||
|
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
|
||||||
|
[...]
|
||||||
|
prom-stack monitoring 18 2022-10-09 23:38:07.258368513 +0200 CEST deployed kube-prometheus-stack-40.3.1 0.59.2
|
||||||
|
```
|
||||||
|
Eventually a re-deployment of prometheus will be needed:
|
||||||
|
```
|
||||||
|
kubectl -n monitoring rollout restart deployment prom-stack-kube-state-metrics
|
||||||
|
kubectl -n monitoring rollout restart statefulset prometheus-prom-stack-kube-prometheus-prometheus
|
||||||
|
```
|
||||||
|
Next, import the official Nginx-ingress dashboard into grafana.
|
||||||
|
1. Go to https://grafana.com/grafana/dashboards/9614-nginx-ingress-controller and get the id of the dashboard template. In this example it will be `9614`.
|
||||||
|
1. In the Grafana-UI navigate to `Dashboard` -> `+ New folder` panel and create a new folder named `NGINX ingress controller`.
|
||||||
|
1. In the Grafana-UI navigate to `Dashboard` -> `+ Import` panel, fill in the Grafana.com-ID=`9614`. Import the dashboard into the newly created folder `NGINX ingress controller`.
|
||||||
|
|
||||||
|
## Grafana dashboard for Node exporter <a name="user-content-prometheus-node-exporter"></a>
|
||||||
|
https://grafana.com/grafana/dashboards/10242-node-exporter-full/
|
||||||
|
|
||||||
# HELM charts <a name="user-content-helm"></a>
|
# HELM charts <a name="user-content-helm"></a>
|
||||||
Docs:
|
Docs:
|
||||||
* https://helm.sh/docs/intro/using_helm/
|
* https://helm.sh/docs/intro/using_helm/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user