Install Prometheus
Video Lecture
Description
We will setup a dedicated Prometheus server.
Before you start, you will need a Linux server. Preferably an unrestricted Ubuntu 20.04 LTS Server with root access, since all the commands demonstrated in this course were executed on Ubuntu 20.04 LTS Server. I can can recommend using Digital Ocean for your Ubuntu 20.04 LTS.
You will get $50 Free Credit for 30 Days so you can install many minimal $5 per month Ubuntu VMs during that 30 days and try them out as you need. Occasionally the offer is extended to $100 for 60 days.
Alternatively, I also have a Hetzner Cloud coupon where you will receive €20 in FREE credits for new registrations.
![]() $50 - 30 Day FREE Credit |
![]() €20 FREE credits |
You can use other operating systems, such as Centos, but all commands in the course are prepared for Ubuntu 20, so you will experience some differences in syntax or equivalent commands which you may need to research yourself if I can't help you.
Once you have an Ubuntu 20.04 LTS server ready, you can start.
SSH onto your server, on windows I use Putty as my SSH client.
1 |
|
This will have installed 2 services being Prometheus and the Prometheus Node Exporter. You can verify there status using the commands. (Press Ctrl-C to exit the status log)
1 2 |
|
Prometheus should now be running.
You can visit it at http://[your ip address]:9090
The install also created a user called Prometheus. You can see which processes it is running by using the command,
1 |
|
Manually Install Specific Prometheus Version
For manually installing the Prometheus binaries visit the instructions as https://prometheus.io/download/
Download the binary that you want.
For example,
1 |
|
After downloading, and before we run it, we should verify it's ok by checking its SHA256 Checksum.
1 |
|
f1f2eeabbf7822572dce67565dc96ffaa2dd1897dd1d844562552b11123f151a prometheus-2.21.0.linux-amd64.tar.gz
If all is ok, then we can untar the gz archive.
1 |
|
Now CD into the new folder
1 |
|
Copy all files to the /usr/local/bin/ folder
1 |
|
Create a new system user called prometheus (if it doesn't already exist)
1 |
|
Create a file called prometheus.service
1 |
|
Add the script and save
1 2 3 4 5 6 7 8 9 10 11 |
|
Now start and check the service is running.
1 2 |
|
We can now leave the new Prometheus service running. If you ever need to stop the new Prometheus service, then type
1 2 |
|
Prometheus should now be running.
You can visit it at http://[your ip address]:9090
You can view which processes the prometheus user is running by using this command
1 |
|