In the previous recipe, we saw how Node Exporter can expose several Linux metrics. Now, these metrics need to be collected in regular intervals to build dashboards on Grafana. As we are using Prometheus as a data source, we need to add the Postgres node details to the prometheus.yml file along with the port using which the metrics exposed by node_exporter can be collected. In this recipe, we shall see how we can enable Prometheus to collect these operating system metrics from a Postgres node.
Getting ready
In order to add the collection of metrics exposed by node_exporter to Prometheus, we should have node_exporter running on the PostgreSQL server. The Prometheus server must also be able to access the metrics exposed over the port used by node_exporter.
How to do it...
Let's get started by using the following steps:
- Add the PostgreSQL server IP and the port used by node_exporter to the prometheus.yml file on the...