Intro to Server Monitoring
How to monitor your server with Prometheus and Grafana
Whether you are a system administrator at a large tech company or a hobbyist with a raspberry pi at home, monitoring your machines is important. It allows you to find out when a server goes down, when it is running low on disk space, or even when it is time to upgrade to something more powerful.
In this article I am going to give a brief overview of how I setup monitoring on my own servers using a combination of Prometheus, Node Exporter, and Grafana.
Overview
- Prometheus is the main piece of this setup, it pulls metrics together from different services across different machines and collects them all in one place.
- Node exporter is a small application that queries the operating system for a variety of metrics and exposes them over HTTP for other services to consume. Prometheus will query one or several Node Exporter instances to aggregate the metrics.
- Grafana is the cherry on top. It takes all the metrics Prometheus has aggregated and displays them as graphs and diagrams organized into dashboards.
Note: In this guide I am using Ubuntu, but these tools are supported on other versions of Linux and even Windows. I will not be providing any guidance on that…