Prometheus (Version 2.42.0) – Ubuntu 22.04
Overview
Category: Monitoring
Supported OS: Ubuntu 22.04
Prometheus is an open-source systems monitoring and alerting toolkit. It collects metrics from targets by scraping metrics HTTP endpoints, making it ideal for infrastructure, application, and service monitoring. With its companion Alertmanager, Prometheus is a flexible, enterprise-grade metrics collection and alerting tool.
Software Included
- Prometheus: 2.42.0
- Node Exporter: 1.5.0
Getting Started After Deployment
1. Firewall Configuration
Allow only the following ports:
- SSH: TCP 22 (rate limited)
- Prometheus UI: TCP 9090
- Node Exporter: TCP 9100
2. Deployment Message
During deployment, you will be logged out and see the following message:
Please wait until the installation is completed….
Connection to $IPADDRESS closed.
Do not log in for at least 2 minutes after the instance is created to allow the setup to complete.
3. First Login Steps
- Log in as the
ubuntu
user (using the password or SSH key you set during creation). - Switch to the
root
user without a password:
sudo su -
4. Prometheus Configuration and Usage
- Prometheus is configured via
/etc/prometheus/prometheus.yml
. - By default, Prometheus monitors itself and Node Exporter.
- To add or modify scrape targets, edit the configuration file.
- After editing, reload Prometheus to apply changes:
sudo systemctl reload prometheus.service
5. Accessing Prometheus UI
- Visit the Prometheus dashboard at:
http://$IPADDRESS:9090
6. Security & Production Use
- Important: In production, ensure Prometheus is not exposed to the public internet.
- Restrict access using a firewall or protect the endpoint via a reverse proxy.
For more information, consult the Prometheus documentation.