How to Use Vultr's Prometheus Marketplace Application

Prometheus is an open-source monitoring and alerting toolkit designed for reliability and scalability. It collects and stores metrics as time-series data with timestamps and optional key-value labels. With its powerful query language (PromQL), service discovery mechanisms, and pull-based architecture, Prometheus excels at monitoring dynamic cloud environments and microservices. The Vultr Marketplace provides a pre-configured Prometheus instance, enabling quick deployment and setup on a Vultr server.
This guide explains deploying and using Vultr's Prometheus Marketplace Application. You will deploy an instance, configure security and SSL, set up monitoring targets, explore PromQL queries, integrate with Node Exporter and Alertmanager, and implement best practices for production monitoring.
Deploy Vultr's Prometheus Marketplace Application
Log in to your Vultr Customer Portal and click the Deploy Server button.
Select your preferred server type.
Choose a server location.
Select a server plan with at least 2GB RAM and 2 CPU cores for production workloads.
Click the Configure button to proceed.
Under Marketplace Apps, search for
Prometheusand select it as the Marketplace Application.Select the Limited Login option from the Additional Features section to create a limited user with sudo access.
Review your configurations and click the Deploy Now button to start deployment.
It may take up to 10 minutes for your server to finish installing Prometheus.NoteAfter the instance shows the status of Running, navigate to the Server Overview page and copy the SSH connection details.
Initial Setup and Configuration
After deployment, configure DNS, verify the installation, and secure your Prometheus instance with proper authentication and SSL/TLS before exposing it to production traffic.
Create a DNS A record pointing to your server's IP address, such as
prometheus.example.com.Connect to your Vultr server instance over SSH using the connection details from the Server Overview page.
Verify Prometheus Installation
Check the Prometheus service status.
console$ sudo systemctl status prometheus
The service should show as
active (running).Verify the installed Prometheus version.
console$ prometheus --version
Output:
prometheus, version 3.7.0 (branch: HEAD, revision: 09814effe6c3b4fb4c8e98b578f7205d0228f04d) build user: root@84cfe63a2ab5 build date: 20251015-10:17:59 go version: go1.25.3 platform: linux/amd64 tags: netgo,builtinassetsAccess Prometheus by visiting
prometheus.example.comin a web browser.Log in with the default credentials from the Server Overview page.
Configure Firewall Security
Secure your server by configuring the firewall to allow only necessary traffic.
Allow SSH connections.
console$ sudo ufw allow OpenSSH
Allow HTTP and HTTPS traffic for Nginx and Certbot.
console$ sudo ufw allow 80/tcp $ sudo ufw allow 443/tcp
Enable the firewall.
console$ sudo ufw enable
Verify firewall status.
console$ sudo ufw status
Port 9090 is used by Prometheus's web UI. You will remove this rule after enabling SSL through the Nginx reverse proxy.
Configure Reverse Proxy with Nginx
Set up Nginx as a reverse proxy to serve Prometheus over standard HTTP/HTTPS ports with authentication.
Install the Nginx web server package.
console$ sudo apt install nginx -y
Create a password file for basic authentication.
console$ sudo apt install apache2-utils -y $ sudo htpasswd -c /etc/nginx/.htpasswd admin
Enter a secure password when prompted. This creates the admin user for accessing Prometheus.
Create an Nginx virtual host configuration for Prometheus.
console$ sudo nano /etc/nginx/sites-available/prometheus
iniserver { listen 80; server_name prometheus.example.com; auth_basic "Prometheus Authentication"; auth_basic_user_file /etc/nginx/.htpasswd; location / { proxy_pass http://localhost:9090; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_read_timeout 300; proxy_send_timeout 300; } }
Replace
prometheus.example.comwith your domain name.Save and close the file.
Enable the Prometheus server block.
console$ sudo ln -s /etc/nginx/sites-available/prometheus /etc/nginx/sites-enabled/
Test the Nginx configuration syntax.
console$ sudo nginx -t
Output:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successfulReload Nginx to apply the changes.
console$ sudo systemctl reload nginx
Secure Prometheus with SSL/TLS
Protect your Prometheus instance with HTTPS using Let's Encrypt certificates via Certbot.
Install Certbot and the Nginx plugin.
console$ sudo apt install certbot python3-certbot-nginx -y
Request an SSL certificate for your domain.
console$ sudo certbot --nginx -d prometheus.example.com
Follow the prompts and select the option to redirect HTTP traffic to HTTPS when asked.
Verify SSL certificate auto-renewal.
console$ sudo certbot renew --dry-run
Configure Prometheus to use the external URL for correct link generation.
console$ sudo nano /etc/default/prometheus
Add the following configuration.
iniARGS="--web.external-url=https://prometheus.example.com --web.route-prefix=/"
This ensures Prometheus generates correct URLs when behind a reverse proxy.
Restart Prometheus to apply changes.
console$ sudo systemctl restart prometheus
Access Prometheus securely at
https://prometheus.example.com.Close direct port 9090 access now that traffic goes through the Nginx reverse proxy.
console$ sudo ufw delete allow 9090/tcp
Configure Prometheus
Set up monitoring targets, adjust scrape intervals, and configure Prometheus for your infrastructure.
Update Prometheus Configuration
Edit the Prometheus configuration file.
console$ sudo nano /etc/prometheus/prometheus.yml
Review the default global configuration and update as needed.
yamlglobal: scrape_interval: 15s evaluation_interval: 15s external_labels: monitor: 'vultr-prometheus' environment: 'production' alerting: alertmanagers: - static_configs: - targets: [] rule_files: # - "alerts.yml" scrape_configs: - job_name: 'prometheus' static_configs: - targets: ['localhost:9090']
Save and close the file.
Validate the configuration before restarting.
console$ promtool check config /etc/prometheus/prometheus.yml
Restart Prometheus to apply changes.
console$ sudo systemctl restart prometheus
Verify configuration was loaded successfully.
console$ sudo systemctl status prometheus
Add Monitoring Targets
Configure Prometheus to scrape metrics from additional targets.
Edit the Prometheus configuration to add new scrape targets.
console$ sudo nano /etc/prometheus/prometheus.yml
Add additional scrape configurations for your services.
yamlscrape_configs: - job_name: 'prometheus' static_configs: - targets: ['localhost:9090'] - job_name: 'node_exporter' static_configs: - targets: ['localhost:9100'] - job_name: 'custom_app' static_configs: - targets: ['app-server-1:8080', 'app-server-2:8080'] metrics_path: '/metrics' scrape_interval: 10s
Replace the targets with your actual service endpoints.
Save and close the file.
Validate the configuration.
console$ promtool check config /etc/prometheus/prometheus.yml
Restart Prometheus.
console$ sudo systemctl restart prometheus
Explore Prometheus Features
Learn to query metrics, explore time-series data, and understand Prometheus's capabilities.
Access the Prometheus Web UI
Navigate to
https://prometheus.example.comin a web browser.Enter the basic authentication credentials you created earlier.
The Prometheus web interface provides:
- Graph: Query and visualize metrics
- Alerts: View active and pending alerts
- Status: Check targets, configuration, and service discovery
- Help: PromQL documentation and examples
Run PromQL Queries
Prometheus Query Language (PromQL) allows you to select and aggregate time-series data.
Navigate to the Graph tab in the Prometheus UI.
Query CPU utilization percentage.
promql>_ 100 - (avg by (instance) (irate(node_cpu_seconds_total{mode="idle"}[5m])) * 100)
Query memory usage percentage.
promql>_ (1 - (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes)) * 100
Query HTTP request rate.
promql>_ rate(prometheus_http_requests_total[5m])
Aggregate metrics across labels.
promql>_ sum by (job) (up)
This shows how many instances are up for each job.
Filter by label values.
promql>_ node_cpu_seconds_total{cpu="0", mode="system"}
View Target Status
Navigate to Status > Target health in the Prometheus UI.
Verify all configured targets show as UP.
If a target is down, check:
- The target service is running
- Firewall rules allow connections
- The metrics endpoint is accessible
Integrations and Monitoring
Extend Prometheus capabilities by integrating with exporters, Alertmanager, and visualization tools.
Install Node Exporter
Node Exporter exposes system metrics like CPU, memory, disk, and network for monitoring.
Download and install Node Exporter.
console$ cd /tmp $ curl -LO https://github.com/prometheus/node_exporter/releases/download/v1.7.0/node_exporter-1.7.0.linux-amd64.tar.gz $ tar -xvf node_exporter-1.7.0.linux-amd64.tar.gz $ sudo mv node_exporter-1.7.0.linux-amd64/node_exporter /usr/local/bin/
Create a dedicated system user for Node Exporter.
console$ sudo useradd --no-create-home --system --shell /usr/sbin/nologin node_exporter
Create a systemd service for Node Exporter.
console$ sudo nano /etc/systemd/system/node_exporter.service
Add the following configuration.
ini[Unit] Description=Node Exporter After=network.target [Service] User=node_exporter Group=node_exporter Type=simple ExecStart=/usr/local/bin/node_exporter [Install] WantedBy=multi-user.target
Save and close the file.
Start and enable Node Exporter.
console$ sudo systemctl daemon-reload $ sudo systemctl enable --now node_exporter
Verify Node Exporter is running.
console$ curl http://localhost:9100/metrics
Prometheus will automatically scrape Node Exporter metrics if you added the
node_exporterjob in the configuration.
Configure Alertmanager
Alertmanager handles alerts sent by Prometheus, managing deduplication, grouping, and routing to notification channels.
Install Alertmanager.
console$ sudo apt install prometheus-alertmanager -y
Configure Alertmanager for email notifications.
console$ sudo nano /etc/alertmanager/alertmanager.yml
yamlglobal: resolve_timeout: 5m route: receiver: 'email-notifications' receivers: - name: 'email-notifications' email_configs: - to: 'admin@example.com' from: 'prometheus@example.com' smarthost: 'smtp.example.com:587' auth_username: 'prometheus@example.com' auth_password: 'your_email_password'
Replace with your SMTP settings.
Save and close the file.
Create alert rules.
console$ sudo nano /etc/prometheus/alerts.yml
yamlgroups: - name: system_alerts interval: 30s rules: - alert: InstanceDown expr: up == 0 for: 5m labels: severity: critical annotations: summary: "Instance {{ $labels.instance }} down" description: "{{ $labels.instance }} has been down for more than 5 minutes."
Save and close the file.
Update Prometheus configuration to load alert rules.
console$ sudo nano /etc/prometheus/prometheus.yml
Add the following:
yamlrule_files: - "alerts.yml" alerting: alertmanagers: - static_configs: - targets: ['localhost:9093']
Save and close the file.
Validate and restart services.
console$ promtool check config /etc/prometheus/prometheus.yml $ sudo systemctl restart prometheus $ sudo systemctl restart alertmanager
Integrate with Grafana
Visualize Prometheus metrics using Grafana dashboards.
Deploy a Grafana instance following the Vultr Grafana Marketplace Application guide.
Add Prometheus as a data source in Grafana:
- Navigate to Connections > Data sources
- Click Add data source
- Select Prometheus
- URL:
https://prometheus.example.comorhttp://localhost:9090 - Enable Basic auth if using the authenticated endpoint
- Click Save & test
Import pre-built Prometheus dashboards from Grafana Dashboards:
- Node Exporter Full:
1860 - Prometheus Stats:
3662 - System Monitoring:
11074
- Node Exporter Full:
Best Practices and Configuration
Implement these recommendations to ensure your Prometheus instance runs efficiently and reliably.
Data Retention and Storage
Configure data retention period based on your needs.
console$ sudo nano /etc/default/prometheus
Add storage retention flags.
iniARGS="--storage.tsdb.retention.time=30d --storage.tsdb.retention.size=50GB"
This retains data for 30 days or up to 50GB, whichever limit is reached first.
Restart Prometheus to apply changes.
console$ sudo systemctl restart prometheus
Recording Rules for Performance
Use recording rules to precompute frequently used queries.
Create a recording rules file.
console$ sudo nano /etc/prometheus/recording_rules.yml
Add recording rules.
yamlgroups: - name: performance_rules interval: 30s rules: - record: instance:node_cpu_utilization:rate5m expr: 100 - (avg by (instance) (irate(node_cpu_seconds_total{mode="idle"}[5m])) * 100) - record: instance:node_memory_utilization:percentage expr: (1 - (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes)) * 100
Update Prometheus configuration.
console$ sudo nano /etc/prometheus/prometheus.yml
Add the recording rules file.
yamlrule_files: - "alerts.yml" - "recording_rules.yml"
Save and close the file.
Validate the configuration.
console$ promtool check config /etc/prometheus/prometheus.yml
Restart Prometheus.
console$ sudo systemctl restart prometheus
Security Hardening
Regularly update Prometheus and dependencies.
console$ sudo apt update $ sudo apt upgrade prometheus
Review and restrict access to configuration files.
console$ sudo chmod 640 /etc/prometheus/prometheus.yml
Troubleshooting
This section covers common issues and diagnostic commands to help resolve problems with your Prometheus instance.
Check Service Status and Logs
Verify service status and view logs.
console$ sudo systemctl status prometheus $ sudo journalctl -u prometheus -e $ sudo tail -f /var/log/nginx/error.log
Common Issues
Targets Showing as Down
Verify the target service is running and accessible.
console$ curl http://target-host:port/metrics
Check firewall rules allow Prometheus to connect.
Verify the target configuration in
prometheus.yml.
High Memory Usage
Check storage usage and retention settings.
console$ du -sh /var/lib/prometheus/
Reduce retention time or size if storage is full.
Implement recording rules to reduce query load.
Configuration Errors
Validate Prometheus configuration.
console$ promtool check config /etc/prometheus/prometheus.yml
Validate alert rules.
console$ promtool check rules /etc/prometheus/alerts.yml
Cannot Access Web UI
Verify Nginx is running and properly configured.
console$ sudo systemctl status nginx $ sudo nginx -t
Check authentication credentials.
console$ sudo cat /etc/nginx/.htpasswd
Verify SSL certificate is valid.
console$ sudo certbot certificates
Use Cases
Prometheus excels in various monitoring scenarios:
- Infrastructure Monitoring: Track server health, resource utilization, and system metrics across your infrastructure with Node Exporter and custom exporters.
- Container and Kubernetes Monitoring: Monitor containerized applications, pod metrics, and cluster health with native Kubernetes service discovery.
- Application Performance Monitoring: Instrument applications to expose custom metrics for tracking business KPIs, request rates, and latency.
- Microservices Monitoring: Monitor distributed systems with service discovery, multi-dimensional data collection, and powerful querying capabilities.
- Alerting and Incident Response: Set up sophisticated alerting rules with Alertmanager for proactive incident detection and notification routing.
- Capacity Planning: Analyze historical metrics trends to predict resource needs and plan infrastructure scaling.
Conclusion
In this guide, you deployed Vultr's Prometheus Marketplace Application and configured it for production use. You secured the instance with SSL/TLS through Nginx reverse proxy, configured firewall rules and authentication, set up monitoring targets with Node Exporter, created alert rules with Alertmanager, and integrated with Grafana for visualization. You also implemented best practices including data retention policies, recording rules, and security hardening. With Prometheus's powerful monitoring capabilities and Vultr's infrastructure, you can build comprehensive observability solutions for modern applications and infrastructure.