Member-only story
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:
- Node Monitoring
- Database Monitoring
- 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 oftop
.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