... | ... | @@ -68,3 +68,10 @@ Now we need to make Prometheus aware of this new target. For this we will use Se |
|
|
To export metrics from `frontend` we will use [nginx-prometheus-exporter](https://github.com/nginxinc/nginx-prometheus-exporter). Since nginx exporter is a docker container, it is easiest to add it to our frontend pod as a [sidecar](https://medium.com/bb-tutorials-and-thoughts/kubernetes-learn-sidecar-container-pattern-6d8c21f873d). Next we edit our `nginx.conf` to return [stub-stats](http://nginx.org/en/docs/http/ngx_http_stub_status_module.html) at specified port, and that should be it.
|
|
|
|
|
|
#### Preview
|
|
|
Now we should see our two new targets in Prometheus UI:
|
|
|
![image](uploads/d29f564530a493039ae3b15c2ccf7447/image.png)
|
|
|
*Prometheus targets*
|
|
|
![image](uploads/b4b73977c7c83d8bc9b15b5d358c4c27/image.png)
|
|
|
*Grafana showing resource utilization on node*
|
|
|
![image](uploads/1e9b7bf9465720c7e84c06101b2df820/image.png)
|
|
|
*Custom charts* |
|
|
\ No newline at end of file |