Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 

Repository files navigation

minitor-prometheus

monitor linux server using prometheus

Login to your aws and ssh the key into the perminal

Screenshot 2025-09-30 at 3 27 11 pm

install prometheus node exporter

run this command curl -LO https://github.com/prometheus/node_exporter/releases/latest/download/node_exporter-linux-amd64.tar.gz Screenshot 2025-09-29 at 1 41 32 pm

extract the downloaded terball

Screenshot 2025-09-29 at 1 45 04 pm ### extract the downloaded terball done Screenshot 2025-09-29 at 1 45 45 pm ### move the binary to a directory in your PATH Screenshot 2025-09-29 at 1 47 24 pm

create a systemd service file for node exporter by running the command " sudo nano /etc/systemd/system/node_exporter.service

past in the code inside the file

[Unit] Description=Prometheus Node Exporter After=network.target

[Service] User=nobody ExecStart=/usr/local/bin/node_exporter Restart=always

[Install] WantedBy=multi-user.target

"Screenshot 2025-09-29 at 1 49 57 pm

Reload systemd and start the node exporter service to the following commands

sudo systemctl daemon-reload sudo systemctl start node_exporter sudo systemctl enable node_exporter

Screenshot 2025-09-29 at 1 52 35 pm

verify that node exporter is runing with this command

Screenshot 2025-09-29 at 2 00 58 pm

confirm node exporter is accessible by visiting http://http://18.215.150.215:9100/

Screenshot 2025-09-30 at 2 40 07 pm

on this part we need to open the prometheus configurations file called (prometheus.yml)

run this command sudo nano /etc/prometheus/prometheus.yml

Screenshot 2025-09-30 at 3 59 25 pm

Add a new scrape job for node exporter

Screenshot 2025-09-30 at 4 00 54 pm

Now we have to give permission to the file

Screenshot 2025-09-30 at 4 04 16 pm

we need to save the file and restart the prometheus to apply the changes

run this command "sudo systemctl restart prometheus"

Screenshot 2025-09-30 at 4 05 02 pm

verify the port "sudo ss -tlnp | grep 9090"

Screenshot 2025-09-30 at 4 09 21 pm

Access the prometheus web interface http://18.215.150.215:9090/

Screenshot 2025-09-30 at 3 18 23 pm

to view the CPU

Screenshot 2025-09-30 at 3 21 27 pm

About

monitor linux server using prometheus

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors