Cloud-native monitoring
Prometheus is the tool of choice from the Cloud Native Computing Foundation, so we’ll discuss it here. Prometheus is an open source monitoring and alerting toolkit that allows multiple types of systems to feed it monitoring data. An open source Prometheus exporter is available for PostgreSQL, though this is not always needed. For example, EDB’s Cloud Native Postgres operator integrates a Prometheus exporter into the Kubernetes operator to provide better security and avoid the need for a separate component in your architecture.
Data from Prometheus is displayed using Grafana. Data from Prometheus can also be stored inside a database and there are various options for storing data inside PostgreSQL or other systems:
Figure 8.1: Grafana view of PostgreSQL metrics
Remember that the key to successful monitoring is not the tool you use but what information you display with it.