{"id":828,"date":"2026-08-07T22:46:10","date_gmt":"2026-08-07T22:46:10","guid":{"rendered":"https:\/\/virtualserversvps.com\/blog\/?p=828"},"modified":"2026-08-07T22:46:10","modified_gmt":"2026-08-07T22:46:10","slug":"prometheus-grafana-vps-monitoring-setup","status":"publish","type":"post","link":"https:\/\/virtualserversvps.com\/blog\/prometheus-grafana-vps-monitoring-setup\/","title":{"rendered":"Monitoring with Prometheus and Grafana on a VPS: Metrics Collection for Small Deployments"},"content":{"rendered":"<p class=\"wp-block-paragraph\">You do not need a commercial monitoring platform to keep an eye on a small VPS. Prometheus and Grafana together form a complete, self-hosted metrics stack: Prometheus scrapes and stores time-series data, and Grafana turns it into dashboards you can actually read. Both run comfortably on a 1-2 GB VPS, and both are free. This guide covers installation, scraping configuration, PromQL basics, and alerting for small deployments.<\/p>\n<p class=\"wp-block-paragraph\">Monitoring is only as good as the hardware underneath it \u2014 <a href=\"https:\/\/virtualserversvps.com\/#providers\">compare VPS providers on our comparison table<\/a> to ensure your plan has enough RAM for both your application and the metrics stack.<\/p>\n<h2 class=\"wp-block-heading\">Why Prometheus Fits a Small VPS<\/h2>\n<p class=\"wp-block-paragraph\">Prometheus is a single static Go binary with no external dependencies. It uses a pull model: it fetches metrics from exporters over HTTP on a schedule you define, which means no agents need to push data and the server stays in control. A default install with a few exporters uses roughly 150-250 MB of RAM, leaving plenty of room for application processes on a 2 GB plan. Because everything is plain HTTP and YAML, the whole stack is trivial to version in Git and reproduce on a new host.<\/p>\n<h2 class=\"wp-block-heading\">Installing Prometheus and node_exporter<\/h2>\n<p class=\"wp-block-paragraph\">Download the latest release from the official site, extract it, and run it as a dedicated system user. node_exporter exposes host metrics such as CPU, memory, disk, and network:<\/p>\n<pre class=\"wp-block-code\"><code>sudo useradd --no-create-home --shell \/bin\/false prometheus\nwget https:\/\/github.com\/prometheus\/prometheus\/releases\/download\/v2.53.0\/prometheus-2.53.0.linux-amd64.tar.gz\ntar xzf prometheus-2.53.0.linux-amd64.tar.gz\nsudo cp prometheus-2.53.0.linux-amd64\/{prometheus,promtool} \/usr\/local\/bin\/\n\n# node_exporter\nwget https:\/\/github.com\/prometheus\/node_exporter\/releases\/download\/v1.8.2\/node_exporter-1.8.2.linux-amd64.tar.gz\ntar xzf node_exporter-1.8.2.linux-amd64.tar.gz\nsudo cp node_exporter-1.8.2.linux-amd64\/node_exporter \/usr\/local\/bin\/<\/code><\/pre>\n<p class=\"wp-block-paragraph\">Create systemd units for both services so they start on boot and restart on failure. node_exporter listens on port 9100 and Prometheus on 9090; bind Prometheus to localhost or put it behind a reverse proxy with authentication.<\/p>\n<h2 class=\"wp-block-heading\">Configuring Scrape Targets<\/h2>\n<p class=\"wp-block-paragraph\">Prometheus discovers targets from a YAML configuration file. A minimal prometheus.yml for a single VPS scrapes Prometheus itself and the node exporter:<\/p>\n<pre class=\"wp-block-code\"><code>global:\n  scrape_interval: 15s\nscrape_configs:\n  - job_name: 'prometheus'\n    static_configs:\n      - targets: ['localhost:9090']\n  - job_name: 'node'\n    static_configs:\n      - targets: ['localhost:9100']<\/code><\/pre>\n<p class=\"wp-block-paragraph\">Add one job per exporter or application: mysqld_exporter for MySQL, postgres_exporter, blackbox_exporter for HTTP probes, and cAdvisor if you run Docker. Each is a static target line \u2014 no agents to install on other machines.<\/p>\n<h2 class=\"wp-block-heading\">Querying Metrics with PromQL<\/h2>\n<p class=\"wp-block-paragraph\">PromQL is the query language behind every dashboard. The two patterns you will use most are rates over time and instant gauges:<\/p>\n<pre class=\"wp-block-code\"><code># CPU usage percentage over 5 minutes\n100 - (avg by (instance) (rate(node_cpu_seconds_total{mode=\"idle\"}[5m])) * 100)\n\n# Memory usage\nnode_memory_MemTotal_bytes - node_memory_MemAvailable_bytes\n\n# Disk space free\nnode_filesystem_avail_bytes{mountpoint=\"\/\"}<\/code><\/pre>\n<h2 class=\"wp-block-heading\">Building a Grafana Dashboard<\/h2>\n<p class=\"wp-block-paragraph\">Grafana connects to Prometheus as a data source, then visualizes PromQL queries as panels. The fastest route is the official Node Exporter Full dashboard (ID 1860), which you import in two clicks. For custom panels, every query you write in PromQL becomes a panel with a threshold, a unit, and an alert attached. Grafana&#8217;s provisioning API lets you store dashboards as JSON files in Git, so your monitoring setup is reproducible. If you prefer not to manage Grafana at all, Prometheus ships with a basic expression browser, but the dashboards are what make the data actionable, and Grafana is worth the extra 50 MB of RAM.<\/p>\n<h2 class=\"wp-block-heading\">Alerting Without the Noise<\/h2>\n<p class=\"wp-block-paragraph\">Small deployments should alert on a handful of signals: disk filling, memory pressure, host down, and high load. Define alert rules in Prometheus and let Alertmanager route them to email, Telegram, or Slack:<\/p>\n<pre class=\"wp-block-code\"><code>groups:\n  - name: host\n    rules:\n      - alert: HostDown\n        expr: up == 0\n        for: 5m\n        labels: { severity: critical }\n      - alert: DiskAlmostFull\n        expr: (node_filesystem_avail_bytes{mountpoint=\"\/\"} \/ node_filesystem_size_bytes{mountpoint=\"\/\"}) &lt; 0.1\n        for: 10m\n        labels: { severity: warning }<\/code><\/pre>\n<p class=\"wp-block-paragraph\">Start with two or three rules rather than a dozen. Alert fatigue is the main reason monitoring gets ignored, and on a single VPS a disk-filling alert matters far more than a five-minute CPU blip.<\/p>\n<h2 class=\"wp-block-heading\">Keeping the Stack Light on a Budget VPS<\/h2>\n<ul class=\"wp-block-list\"><li>Set retention to 15-30 days in Prometheus flags: &#8211;storage.tsdb.retention.time=30d.<\/li><li>Scrape every 15-30s, not every 5s \u2014 fine-grained data is rarely useful after the fact.<\/li><li>Run Grafana behind Nginx or Caddy with TLS and basic auth.<\/li><li>Pin both services with systemd MemoryMax to cap runaway usage.<\/li><\/ul>\n<p class=\"wp-block-paragraph\">Once your dashboards are live, the last piece is knowing whether your VPS itself is sized right for the load you are measuring \u2014 <a href=\"https:\/\/virtualserversvps.com\/#providers\">see the full specs and pricing<\/a> across providers to plan upgrades before you hit the ceiling.<\/p>\n<p class=\"wp-block-paragraph\">If you prefer a managed platform where monitoring and scaling are handled for you, Cloudways offers managed VPS hosting with built-in monitoring \u2014 <a href=\"https:\/\/cloudways.com\/en\/?id=2010927&amp;data1=virtualserversvps\" rel=\"noreferrer noopener sponsored\" target=\"_blank\">start with their free trial<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>You do not need a commercial monitoring platform to keep an eye on a small VPS. Prometheus and Grafana together form a complete, self-hosted metrics stack: Prometheus scrapes and stores&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":0,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-828","post","type-post","status-publish","format-standard","hentry","category-performance-optimization"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.1 (Yoast SEO v26.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Monitoring with Prometheus and Grafana on a VPS: Metrics Collection for Small Deployments - Virtual Servers VPS Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/virtualserversvps.com\/blog\/prometheus-grafana-vps-monitoring-setup\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Monitoring with Prometheus and Grafana on a VPS: Metrics Collection for Small Deployments\" \/>\n<meta property=\"og:description\" content=\"Monitoring with Prometheus and Grafana on a VPS: Metrics Collection for Small Deployments\" \/>\n<meta property=\"og:url\" content=\"https:\/\/virtualserversvps.com\/blog\/prometheus-grafana-vps-monitoring-setup\/\" \/>\n<meta property=\"og:site_name\" content=\"Virtual Servers VPS Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-07T22:46:10+00:00\" \/>\n<meta name=\"author\" content=\"Virtual-Servers-Vps-Editor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Virtual-Servers-Vps-Editor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/prometheus-grafana-vps-monitoring-setup\/\",\"url\":\"https:\/\/virtualserversvps.com\/blog\/prometheus-grafana-vps-monitoring-setup\/\",\"name\":\"Monitoring with Prometheus and Grafana on a VPS: Metrics Collection for Small Deployments - Virtual Servers VPS Blog\",\"isPartOf\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#website\"},\"datePublished\":\"2026-08-07T22:46:10+00:00\",\"author\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0\"},\"breadcrumb\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/prometheus-grafana-vps-monitoring-setup\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/virtualserversvps.com\/blog\/prometheus-grafana-vps-monitoring-setup\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/prometheus-grafana-vps-monitoring-setup\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/virtualserversvps.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Monitoring with Prometheus and Grafana on a VPS: Metrics Collection for Small Deployments\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#website\",\"url\":\"https:\/\/virtualserversvps.com\/blog\/\",\"name\":\"Virtual Servers VPS Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/virtualserversvps.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0\",\"name\":\"Virtual-Servers-Vps-Editor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g\",\"caption\":\"Virtual-Servers-Vps-Editor\"},\"sameAs\":[\"https:\/\/virtualserversvps.com\/blog\"],\"url\":\"https:\/\/virtualserversvps.com\/blog\/author\/virtualserversvps\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Monitoring with Prometheus and Grafana on a VPS: Metrics Collection for Small Deployments - Virtual Servers VPS Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/virtualserversvps.com\/blog\/prometheus-grafana-vps-monitoring-setup\/","og_locale":"en_US","og_type":"article","og_title":"Monitoring with Prometheus and Grafana on a VPS: Metrics Collection for Small Deployments","og_description":"Monitoring with Prometheus and Grafana on a VPS: Metrics Collection for Small Deployments","og_url":"https:\/\/virtualserversvps.com\/blog\/prometheus-grafana-vps-monitoring-setup\/","og_site_name":"Virtual Servers VPS Blog","article_published_time":"2026-08-07T22:46:10+00:00","author":"Virtual-Servers-Vps-Editor","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Virtual-Servers-Vps-Editor","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/virtualserversvps.com\/blog\/prometheus-grafana-vps-monitoring-setup\/","url":"https:\/\/virtualserversvps.com\/blog\/prometheus-grafana-vps-monitoring-setup\/","name":"Monitoring with Prometheus and Grafana on a VPS: Metrics Collection for Small Deployments - Virtual Servers VPS Blog","isPartOf":{"@id":"https:\/\/virtualserversvps.com\/blog\/#website"},"datePublished":"2026-08-07T22:46:10+00:00","author":{"@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0"},"breadcrumb":{"@id":"https:\/\/virtualserversvps.com\/blog\/prometheus-grafana-vps-monitoring-setup\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/virtualserversvps.com\/blog\/prometheus-grafana-vps-monitoring-setup\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/virtualserversvps.com\/blog\/prometheus-grafana-vps-monitoring-setup\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/virtualserversvps.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Monitoring with Prometheus and Grafana on a VPS: Metrics Collection for Small Deployments"}]},{"@type":"WebSite","@id":"https:\/\/virtualserversvps.com\/blog\/#website","url":"https:\/\/virtualserversvps.com\/blog\/","name":"Virtual Servers VPS Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/virtualserversvps.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0","name":"Virtual-Servers-Vps-Editor","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g","caption":"Virtual-Servers-Vps-Editor"},"sameAs":["https:\/\/virtualserversvps.com\/blog"],"url":"https:\/\/virtualserversvps.com\/blog\/author\/virtualserversvps\/"}]}},"_links":{"self":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/828","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/comments?post=828"}],"version-history":[{"count":1,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/828\/revisions"}],"predecessor-version":[{"id":829,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/828\/revisions\/829"}],"wp:attachment":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/media?parent=828"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/categories?post=828"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/tags?post=828"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}