Install Prometheus Service and Data Source
Video Lecture
Description
Prometheus is already available on the default Ubuntu 24.04 repositories. So we can just install it, and it will be set up as a service already.
# |
|
It has installed two services named prometheus
and prometheus-node-exporter
. We can check them using
# |
|
and
# |
|
Press ctrl-c
to exit each of the above status commands.
We can test the Prometheus metrics endpoint is running locally by using the command
curl http://127.0.0.1:9090/metrics
After installing Prometheus, it is also likely to have,
- installed a local Prometheus Node Exporter,
- created and started 2 services to manage Prometheus and the Node Exporter,
- created a specific user called
prometheus
that both services are running under.
You can check the prometheus
user using the command
# |
|
You can check which processes it is running by using the command
# |
|
You can see which ports each process is listening on by using the command
# |
|
The Prometheus Node Exporter also creates a metrics
HTTP endpoint on port 9100. You can check it locally using
# |
|
Note
If your server is on the public internet, and you haven't configured a dedicated firewall, both Prometheus and the Node Exporter endpoints may be accessible using the URLs,
http://[your domain or IP]:9090/ http://[your domain or IP]:9100/
You should consider restricting access to those port numbers to only IP addresses that need to access them.
Prometheus Course
If you want to try a more detailed course on Prometheus, then you can visit my Prometheus tutorials.