Testing Prometheus for monitoring and a bit of routing
Later, I want to have a complete solution with monitoring. So today I investigated some monitoring solutions, reading lengthy threads of text. To summarize, admins are favoring cloud solutions like DataDog and the only solution on premise that has no opposition is Prometheus. So I decided to start a container with it to try it myself.
Except monitoring, I modified the configuration of bird routing daemon. After my migration from libvirt routing network, I noticed the local network is not announced. The solution was to hardcode the value (not very impacting as I have only 2 nodes).
Prometheus
Central prometheus poll agents installed on nodes. Agents present metrics to central and all metrics are collected in 1 connection. By default, polling is done every 15 seconds.
The Prometheus container is hosted on quay.io, as usual with containers, starting it is trivial
The port 9090 serve a local website, used to view and query the time series database. The query language is quite powerful, it can be used to apply mathematical functions to series (sum, nth percentile,…).
Once the container is running, I need to setup agents. On Debian, the agent is only available on backports.
Install backports
Add the iptables rule
On the server part, I need to indicate what nodes the server should poll. This is done in the prometheus.yml
Grafana
For visualisation support, one can use Grafana. Again, I used a container to test the app.
Once logged into grafana, add prometheus as data source and enjoy viewing metrics