Why this monitoring stack belongs on AlmaLinux 9
The Install Grafana, Prometheus, and Node Exporter on AlmaLinux 9 setup gives you a clear view of server health without adding much overhead. Prometheus collects system metrics, Node Exporter exposes Linux host details, and Grafana turns that data into dashboards you can read quickly. On a dedicated server, private VPS, or production platform, this stack helps you catch memory pressure, disk saturation, CPU spikes, and network shifts before they turn into support tickets.
AlmaLinux 9 fits this stack well. It uses a modern RHEL-compatible base, works cleanly with systemd, and pairs naturally with firewalld and SELinux. You end up with monitoring that feels native to the OS instead of something bolted on afterward. If you already run services such as Nginx, databases, or application containers, this setup gives you one place to watch them all.
For HostnExtra customers running dedicated infrastructure, that matters even more when the server hosts a business site, a game service, a staging environment, or internal tools. Monitoring is not just about charts. It is about knowing the machine is behaving the same way at 3 a.m. as it did at 3 p.m.
What each component does
Prometheus stores metrics over time and lets you query them with PromQL. It is the data engine in this stack. Node Exporter publishes Linux host metrics such as load, RAM usage, filesystem space, and network counters. Grafana reads Prometheus as a data source and presents dashboards, alerts, and trend views that are easier to read than raw numbers.
The stack works best when each piece stays in its lane. Node Exporter sits close to the server being watched. Prometheus gathers and keeps the data. Grafana presents the story. That separation makes the system easier to extend later if you want to add app metrics, storage metrics, or remote targets.
Why AlmaLinux 9 is a good fit
On AlmaLinux 9, service management is straightforward with systemd, package handling is predictable with dnf, and firewall rules fit most hosting environments. If you manage more than one server, the layout also makes standardization easier.
Use this stack when you want:
- a self-hosted monitoring console with full control over data
- a lightweight exporter on the host and a central metrics server
- dashboarding that can scale from one server to several
- an interface team members can read quickly during incidents
For readers comparing monitoring options, you may also find related setup guides useful, such as Install and Configure Zabbix on Ubuntu, Install ELK Stack with Nginx on Ubuntu, and How to Install Fail2Ban on Ubuntu 26.04. Those articles cover different monitoring and protection angles, while this one stays focused on server metrics.
Planning before installation
Before you add any packages, make sure the server has enough room for metrics retention and dashboard use. A small test server can run the stack comfortably, but a real production node benefits from more memory and storage headroom. You also want a stable hostname or DNS name for Grafana so the login URL stays consistent.
Useful placeholders for this guide:
- SERVER_IP = 203.0.113.10
- DOMAIN_NAME = grafana.example.com
- ADMIN_USER = deploy
- PROMETHEUS_DIR = /etc/prometheus
- PROMETHEUS_DATA_DIR = /var/lib/prometheus
- NODE_EXPORTER_PORT = 9100
- PROMETHEUS_PORT = 9090
- GRAFANA_PORT = 3000
Open only the firewall ports you actually need. In many setups, Grafana sits behind a reverse proxy, while Prometheus stays internal. Node Exporter is often kept private and scraped only by Prometheus.
Install Grafana, Prometheus, and Node Exporter on AlmaLinux 9
Start by connecting to the server as root or as a sudo user. If you are using a custom SSH port, adjust the command accordingly.
ssh -p 22 root@SERVER_IP
After login, confirm the operating system before you follow the AlmaLinux 9 steps.
cat /etc/os-release
You should see AlmaLinux 9 details in the output. That confirms the package and service instructions below match your system.
1) Update the server and install base tools
Run these commands on the VPS as root. They refresh package metadata and install the utilities needed for downloads, signatures, and firewall work.
dnf update -y
dnf install -y curl wget tar firewalld policycoreutils-python-utils
Use curl and wget for downloads, tar for archive extraction, firewalld for port control, and policycoreutils-python-utils for SELinux checks and adjustments. The update step keeps the machine aligned with the latest package metadata available to your system.
Enable the firewall service now so later rules apply cleanly.
systemctl enable --now firewalld
Check that it is active.
systemctl status firewalld --no-pager
2) Create the Prometheus service account and directories
Run these commands on the VPS as root. Prometheus runs best as a dedicated system user with a limited home path and defined data directory.
useradd --system --no-create-home --shell /sbin/nologin prometheus
mkdir -p /etc/prometheus /var/lib/prometheus
Set ownership so the service can read its configuration and write its data.
chown -R prometheus:prometheus /etc/prometheus /var/lib/prometheus
Check the directories and ownership.
ls -ld /etc/prometheus /var/lib/prometheus
3) Download and install Prometheus
Visit the Prometheus project download page in your browser if you want to confirm the latest release name, then replace the archive filename below with the current one you choose. Because release names change over time, the safest way to stay current is to copy the exact filename from the project’s official release page.
Run these commands on the VPS as root after replacing the example archive name with your chosen version.
cd /tmp
wget https://github.com/prometheus/prometheus/releases/download/vX.Y.Z/prometheus-vX.Y.Z.linux-amd64.tar.gz
tar -xzf prometheus-vX.Y.Z.linux-amd64.tar.gz
cp prometheus-vX.Y.Z.linux-amd64/prometheus /usr/local/bin/
cp prometheus-vX.Y.Z.linux-amd64/promtool /usr/local/bin/
cp -r prometheus-vX.Y.Z.linux-amd64/consoles /etc/prometheus/
cp -r prometheus-vX.Y.Z.linux-amd64/console_libraries /etc/prometheus/
Now confirm the binaries are available.
prometheus --version
promtool --version
Create the Prometheus configuration file.
vi /etc/prometheus/prometheus.yml
Paste the following content, then save and exit with :wq.
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: "prometheus"
static_configs:
- targets: ["localhost:9090"]
- job_name: "node_exporter"
static_configs:
- targets: ["localhost:9100"]
Check the file syntax with Prometheus before you move on.
promtool check config /etc/prometheus/prometheus.yml
Create the systemd unit file.
vi /etc/systemd/system/prometheus.service
Paste this content, then save and exit.
[Unit]
Description=Prometheus Monitoring System
Wants=network-online.target
After=network-online.target
[Service]
User=prometheus
Group=prometheus
Type=simple
ExecStart=/usr/local/bin/prometheus \
--config.file=/etc/prometheus/prometheus.yml \
--storage.tsdb.path=/var/lib/prometheus \
--web.console.templates=/etc/prometheus/consoles \
--web.console.libraries=/etc/prometheus/console_libraries
[Install]
WantedBy=multi-user.target
Reload systemd, enable Prometheus at boot, and start it.
systemctl daemon-reload
systemctl enable --now prometheus
Validate the service status.
systemctl status prometheus --no-pager
If you want local access while testing, open the port in firewalld.
firewall-cmd --permanent --add-port=9090/tcp
firewall-cmd --reload
Check that Prometheus is listening.
ss -tulpn | grep 9090
4) Install Node Exporter
Node Exporter collects Linux host metrics. Download the matching release archive you choose from the official project page, then replace the filename in the commands below.
cd /tmp
wget https://github.com/prometheus/node_exporter/releases/download/vA.B.C/node_exporter-vA.B.C.linux-amd64.tar.gz
tar -xzf node_exporter-vA.B.C.linux-amd64.tar.gz
cp node_exporter-vA.B.C.linux-amd64/node_exporter /usr/local/bin/
Confirm the binary.
node_exporter --version
Create a dedicated user for the exporter.
useradd --system --no-create-home --shell /sbin/nologin node_exporter
Create the systemd unit.
vi /etc/systemd/system/node_exporter.service
Paste this file, then save and exit.
[Unit]
Description=Node Exporter
Wants=network-online.target
After=network-online.target
[Service]
User=node_exporter
Group=node_exporter
Type=simple
ExecStart=/usr/local/bin/node_exporter
[Install]
WantedBy=multi-user.target
Reload systemd, enable the service, and start it.
systemctl daemon-reload
systemctl enable --now node_exporter
Check that Node Exporter is active and listening on port 9100.
systemctl status node_exporter --no-pager
ss -tulpn | grep 9100
Open the exporter port only if you plan to reach it directly. Most setups keep it internal and allow Prometheus to scrape it.
firewall-cmd --permanent --add-port=9100/tcp
firewall-cmd --reload
5) Install Grafana from the official repository
Grafana is easiest to manage from its official package repository. Add the repo, install the package, then start the service.
cat <<'EOF' > /etc/yum.repos.d/grafana.repo
[grafana]
name=Grafana
baseurl=https://rpm.grafana.com
repo_gpgcheck=1
gpgcheck=1
enabled=1
gpgkey=https://rpm.grafana.com/gpg.key
EOF
Install Grafana.
dnf install -y grafana
Enable and start the service.
systemctl enable --now grafana-server
Check the version and service state.
grafana-server -v
systemctl status grafana-server --no-pager
Open the web port if you plan to access Grafana directly.
firewall-cmd --permanent --add-port=3000/tcp
firewall-cmd --reload
6) Connect Grafana to Prometheus
Open Grafana in your browser at http://SERVER_IP:3000 or through your chosen domain once DNS is in place. The default login uses the built-in admin account, and the first login asks you to change the password. After that, add Prometheus as a data source.
In Grafana, go to Connections, then Data sources, then add Prometheus. Use this URL for a local Prometheus service:
http://localhost:9090
Save and test the connection. A successful result confirms Grafana can reach the Prometheus API.
7) Load a dashboard for Node Exporter
Grafana includes a large dashboard library. Import a Node Exporter dashboard that matches your layout preferences, then point it to the Prometheus data source you created. Once imported, you should see CPU, memory, disk, filesystem, and network panels populate with live data.
That is the point where the stack becomes useful day to day. You can watch a single server, compare hosts, or keep an eye on response patterns during a deployment window.
Finish the setup with validation and secure access
After the services are up, verify each one from the server and from your browser. On the VPS, run:
systemctl is-active prometheus
systemctl is-active node_exporter
systemctl is-active grafana-server
Check the targets in Prometheus by opening http://SERVER_IP:9090/targets. You want the Prometheus self target and the Node Exporter target to appear as up. Then open Grafana and confirm the dashboard panels show data rather than blank frames.
If you use DNS, point grafana.example.com to the server, then place Grafana behind Nginx with TLS. For readers who want that next layer, the HostnExtra guide on Certbot SSL with Nginx explains the certificate flow on Ubuntu, and the same reverse proxy pattern works well on AlmaLinux 9 with matching package names.
Keep an eye on the logs if something looks unusual.
journalctl -u prometheus -n 50 --no-pager
journalctl -u node_exporter -n 50 --no-pager
journalctl -u grafana-server -n 50 --no-pager
If Prometheus does not start, check the config first with promtool check config. If Node Exporter is not reachable, check port 9100 and the service name. If Grafana does not load, confirm that the package installed correctly and that port 3000 is allowed.
Where this stack fits in a hosting plan
A clean monitoring stack is useful across many HostnExtra server projects. It helps during application launches, platform migrations, WordPress hosting, game server operations, and database workloads. It also gives support teams a shared reference point when they need to compare one server to another.
If you manage a dedicated machine, pairing this stack with the right location can matter. Network paths, latency, and regional access can shape how dashboards feel during active use. For teams evaluating where to place monitoring or production systems, HostnExtra’s dedicated infrastructure options in the United States, Germany, London, and Netherlands give you room to place workloads with practical regional planning in mind.
Need a dedicated server for monitoring or production? HostnExtra can provide the infrastructure layer for your Grafana and Prometheus stack, along with the network and root access you need to manage it cleanly.

