Member-only story

Monitoring PostgreSQL Cluster: Server, Database and Logs

Oz
9 min readMar 26, 2025

In today’s fast-paced IT environment, system performance and uptime are non-negotiable. In this guide, we break down the art of Linux monitoring into three essential parts — node monitoring, database monitoring, and log monitoring. We’ll start by exploring basic yet powerful Linux commands like top and htop, then dive into modern tools such as Prometheus, Grafana, and Node Exporter for detailed system insights. Next, we cover database monitoring with hands-on techniques using pg_activity and Postgres Exporter, ensuring your PostgreSQL environment is fully observed. Finally, we tackle log monitoring by combining traditional commands with advanced solutions like Loki and Promtail, integrated seamlessly with Grafana for a complete, real-time overview. This comprehensive approach not only helps you keep a pulse on your systems but also empowers you to proactively address potential issues before they impact your operations. Whether you’re a seasoned sysadmin or just getting started, this guide provides the tools and techniques needed to achieve peak performance and reliability. This guide is divided into three key parts:

  1. Node Monitoring
  2. Database Monitoring
  3. Log Monitoring

1. Node Monitoring

Basic Linux Monitoring Commands

Before diving into advanced tools, it’s essential to understand the fundamental Linux commands for system monitoring:

  • top – Displays real-time system information including CPU and memory usage.
  • htop – A more user-friendly version of top.
  • vmstat – Reports on system performance, including memory, CPU, and I/O statistics.
  • iostat – Monitors CPU load and disk usage.

Setting Up Prometheus and Grafana for Node Monitoring

Install Grafana

dnf install grafana
systemctl start grafana

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Oz
Oz

Written by Oz

Database Administrator 🐘

No responses yet

Write a response