Prometheus

Prometheus
- Version: 3.3.0
- OS: Ubuntu 24.04
- Category: Monitoring
Description
Prometheus is an open-source systems monitoring and alerting toolkit, part of the Cloud Native Computing Foundation (CNCF). Originally built at SoundCloud in 2012, it has since been adopted by thousands of companies and has one of the most active communities in the cloud-native ecosystem.
Prometheus collects and stores time series metrics identified by metric name and key/value label pairs. Its powerful query language, PromQL, lets you aggregate, filter, and analyze those metrics in real time. It operates without a distributed storage dependency — each server node is autonomous — and collects metrics by pulling over HTTP from configured targets. Service discovery and static configuration are both supported for defining what to scrape.
This VPS image runs Prometheus on port 9090. By default it is configured to monitor itself. You can extend coverage to any number of additional targets by editing the configuration file.
Software Included
| Package | Version | License |
|---|---|---|
| Prometheus | 3.3.0 | Apache 2.0 |
Key Features
- Multi-dimensional data model with metric name and key/value label pairs
- PromQL — a flexible query language for slicing and aggregating time series data
- No reliance on distributed storage; each server node is fully autonomous
- Pull-based metrics collection over HTTP
- Push support via the Pushgateway intermediary
- Service discovery and static target configuration
- Multiple graphing and dashboarding integrations (e.g., Grafana)
- Built-in alerting rules with Alertmanager integration
Getting Started
1. Deploy Prometheus on an EasyCloudify VPS
Deploy this app from the EasyCloudify Marketplace.
2. Connect to Your VPS
bashssh root@your-vps-ip
3. Access the Prometheus UI
Once the VPS is ready, open a browser and navigate to:
http://your-vps-ip:9090/
You will see the Prometheus expression browser. By default, Prometheus is configured to scrape its own metrics, so you can immediately explore the built-in prometheus_* metrics using PromQL.
4. Add Scrape Targets
Prometheus is configured via the file at /etc/prometheus/prometheus.yml. Open it to add or modify scrape targets:
bashnano /etc/prometheus/prometheus.yml
A basic scrape configuration looks like this:
bashscrape_configs: - job_name: 'my-app' static_configs: - targets: ['localhost:8080']
After editing, reload the configuration without restarting the service:
bashsudo systemctl reload prometheus.service
5. Explore Metrics with PromQL
From the Prometheus UI at port 9090, use the Expression field to run PromQL queries. For example, to see the rate of HTTP requests over the last 5 minutes:
bashrate(http_requests_total[5m])
For a guided walkthrough of queries and Node Exporter usage, refer to the Prometheus node exporter guide at https://prometheus.io/docs/guides/node-exporter/.
Production Hardening
By default, Prometheus listens on a public port. For any production deployment, you should restrict access so that the Prometheus UI is not exposed directly to the internet. The recommended approach is to place Nginx in front of Prometheus and enable basic authentication or restrict access by IP.
A complete example using Nginx and basic auth is available in the Prometheus documentation at https://prometheus.io/docs/guides/basic-auth/.
Example Nginx reverse proxy block:
bashserver { listen 80; server_name metrics.yourdomain.com; location / { auth_basic "Prometheus"; auth_basic_user_file /etc/nginx/.htpasswd; proxy_pass http://localhost:9090; } }
Also consider setting UFW rules to block port 9090 from public access once Nginx is in place:
bashufw deny 9090 ufw allow 'Nginx Full'
Service Management
Check Prometheus status:
bashsystemctl status prometheus
Restart Prometheus:
bashsystemctl restart prometheus
Reload configuration (without restart):
bashsudo systemctl reload prometheus.service
View logs:
bashjournalctl -u prometheus -f
Important Paths
| Item | Path |
|---|---|
| Configuration file | /etc/prometheus/prometheus.yml |
| Data directory | /var/lib/prometheus |
| Service unit | /etc/systemd/system/prometheus.service |
Support Details
- Support URL: https://prometheus.io/community/
Resources
- Documentation: https://prometheus.io/docs/introduction/overview/
- Configuration Reference: https://prometheus.io/docs/prometheus/latest/configuration/configuration/
- PromQL Basics: https://prometheus.io/docs/prometheus/latest/querying/basics/
- Node Exporter Guide: https://prometheus.io/docs/guides/node-exporter/
- Basic Auth Guide: https://prometheus.io/docs/guides/basic-auth/
- GitHub: https://github.com/prometheus/prometheus
- Community: https://prometheus.io/community/