{"id":1435,"date":"2025-11-06T18:22:16","date_gmt":"2025-11-06T15:22:16","guid":{"rendered":"https:\/\/www.dchost.com\/blog\/vps-monitoring-and-alerts-without-tears-getting-started-with-prometheus-grafana-and-uptime-kuma\/"},"modified":"2026-11-04T10:35:48","modified_gmt":"2026-11-04T07:35:48","slug":"vps-monitoring-prometheus-grafana-uptime-kuma","status":"publish","type":"post","link":"https:\/\/www.dchost.com\/blog\/en\/vps-monitoring-prometheus-grafana-uptime-kuma\/","title":{"rendered":"VPS Monitoring with Prometheus, Grafana and Uptime Kuma"},"content":{"rendered":"<div class=\"dchost-blog-content-wrapper\"><div id=\"toc_container\" role=\"navigation\" aria-label=\"Table of Contents\" data-nosnippet class=\"toc_transparent no_bullets toc_numbered toc_title_center\"><p class=\"toc_title\">\u0130\u00e7indekiler<\/p><ul class=\"toc_list\"><li><a href=\"#VPS_Monitoring_Metrics_Availability_and_Alerts\"><span class=\"toc_number toc_depth_1\">1.<\/span> VPS Monitoring: Metrics, Availability and Alerts<\/a><\/li><li><a href=\"#Roles_of_Prometheus_Grafana_and_Uptime_Kuma\"><span class=\"toc_number toc_depth_1\">2.<\/span> Roles of Prometheus, Grafana and Uptime Kuma<\/a><\/li><li><a href=\"#Install_and_Configure_Prometheus\"><span class=\"toc_number toc_depth_1\">3.<\/span> Install and Configure Prometheus<\/a><ul><li><a href=\"#How_Prometheus_Collects_Metrics\"><span class=\"toc_number toc_depth_2\">3.1.<\/span> How Prometheus Collects Metrics<\/a><\/li><li><a href=\"#Install_Node_Exporter_on_the_VPS_you_want_to_monitor\"><span class=\"toc_number toc_depth_2\">3.2.<\/span> Install Node Exporter on the VPS you want to monitor<\/a><\/li><li><a href=\"#Install_Prometheus\"><span class=\"toc_number toc_depth_2\">3.3.<\/span> Install Prometheus<\/a><\/li><li><a href=\"#Scrape_multiple_VPS_nodes\"><span class=\"toc_number toc_depth_2\">3.4.<\/span> Scrape multiple VPS nodes<\/a><\/li><li><a href=\"#Optional_HTTP_checks_from_the_inside_with_Blackbox_Exporter\"><span class=\"toc_number toc_depth_2\">3.5.<\/span> Optional: HTTP checks from the inside with Blackbox Exporter<\/a><\/li><\/ul><\/li><li><a href=\"#Configure_Grafana_Dashboards_and_Alerts\"><span class=\"toc_number toc_depth_1\">4.<\/span> Configure Grafana Dashboards and Alerts<\/a><ul><li><a href=\"#Install_Grafana_and_Connect_Prometheus\"><span class=\"toc_number toc_depth_2\">4.1.<\/span> Install Grafana and Connect Prometheus<\/a><\/li><li><a href=\"#CPU_Memory_Disk_and_Network_Queries\"><span class=\"toc_number toc_depth_2\">4.2.<\/span> CPU, Memory, Disk and Network Queries<\/a><\/li><li><a href=\"#Set_Alert_Thresholds_and_Pending_Periods\"><span class=\"toc_number toc_depth_2\">4.3.<\/span> Set Alert Thresholds and Pending Periods<\/a><\/li><li><a href=\"#Organize_the_Dashboard\"><span class=\"toc_number toc_depth_2\">4.4.<\/span> Organize the Dashboard<\/a><\/li><\/ul><\/li><li><a href=\"#Configure_Uptime_Kuma_for_External_Checks\"><span class=\"toc_number toc_depth_1\">5.<\/span> Configure Uptime Kuma for External Checks<\/a><ul><li><a href=\"#Choose_an_Independent_Monitoring_Location\"><span class=\"toc_number toc_depth_2\">5.1.<\/span> Choose an Independent Monitoring Location<\/a><\/li><li><a href=\"#Install_Docker_and_Start_Uptime_Kuma\"><span class=\"toc_number toc_depth_2\">5.2.<\/span> Install Docker and Start Uptime Kuma<\/a><\/li><li><a href=\"#Configure_and_Test_Notifications\"><span class=\"toc_number toc_depth_2\">5.3.<\/span> Configure and Test Notifications<\/a><\/li><li><a href=\"#Choose_Monitors_for_a_Status_Page\"><span class=\"toc_number toc_depth_2\">5.4.<\/span> Choose Monitors for a Status Page<\/a><\/li><\/ul><\/li><li><a href=\"#Verify_the_Monitoring_Setup\"><span class=\"toc_number toc_depth_1\">6.<\/span> Verify the Monitoring Setup<\/a><\/li><\/ul><\/div>\n<h2 id=\"section-1\"><span id=\"VPS_Monitoring_Metrics_Availability_and_Alerts\">VPS Monitoring: Metrics, Availability and Alerts<\/span><\/h2>\n<p>A slow site can be difficult to diagnose without monitoring. A manual check may show ordinary CPU and memory usage while requests are still queuing. Historical metrics help you see what changed and narrow down where to investigate.<\/p>\n<p>This guide sets up <a href=\"https:\/\/www.dchost.com\/vps\">VPS<\/a> monitoring with Prometheus for metrics, Grafana for dashboards and alerts, and Uptime Kuma for checks from an independent location. The command examples assume a Linux amd64 host using Debian or Ubuntu, systemd, and sudo access. Use the linked official installation instructions for Grafana and Docker, then configure the connections, dashboards and checks below. Verify supported releases and required network access before deployment.<\/p>\n<h2 id=\"section-2\"><span id=\"Roles_of_Prometheus_Grafana_and_Uptime_Kuma\">Roles of Prometheus, Grafana and Uptime Kuma<\/span><\/h2>\n<p>Prometheus and Grafana provide system and application metrics, including CPU, memory, disks, network activity and application behavior. Uptime Kuma, when hosted outside the monitored infrastructure, checks whether websites and APIs respond and whether TLS certificates are valid. Metrics and external checks provide complementary evidence during an incident.<\/p>\n<p>Prometheus scrapes metrics from exporters, such as Node Exporter on a VPS, and stores time-series data. With the relevant metrics, graphs can reveal IOwait spikes or memory growth, though those patterns alone do not prove a memory leak. For more on the exporter and alerting stack, see the <a href=\"https:\/\/www.dchost.com\/blog\/en\/vps-monitoring-prometheus-grafana\/\">Prometheus, Grafana and Node Exporter guide<\/a>.<\/p>\n<p>Grafana queries these metrics to display panels and evaluate alerts. Use panels for CPU utilization, available memory, disk activity and network throughput. Configure contact points and notification policies for the channels your team monitors, then choose thresholds and pending periods that distinguish brief spikes from sustained pressure.<\/p>\n<p>This guide uses <strong>Grafana-managed alert rules<\/strong>: Grafana queries Prometheus, evaluates conditions and routes notifications through its contact points or policies. A separate Prometheus Alertmanager deployment is not required for this path. An alternative is to evaluate rules in Prometheus and send firing alerts to Alertmanager; that option requires its own rule loading, Alertmanager connection and receiver\/routing configuration. Choose one primary metric-alerting path to avoid duplicate notifications. Uptime Kuma manages its own external-check notifications.<\/p>\n<p>Uptime Kuma checks sites and services from its deployment location, measures response times and tests TCP ports. Push monitors can check whether a scheduled job reports successful completion within an expected interval. Its status pages can display selected monitors to a team or clients.<\/p>\n<p>Combine monitoring with capacity planning for variable traffic. Metrics help investigate resource pressure, external checks detect availability problems, and alerts direct responders to the affected service. For a store preparing for a promotion, see the guide to <a href=\"https:\/\/www.dchost.com\/blog\/en\/woocommerce-capacity-planning-vcpu-ram-iops\/\">sizing vCPU, RAM and IOPS for WooCommerce<\/a>.<\/p>\n<p>Inspect disk activity and IOwait alongside CPU usage when investigating storage-related delays. The <a href=\"https:\/\/www.dchost.com\/blog\/en\/nvme-vps-iops-latency-storage-tests\/\">NVMe VPS hosting guide<\/a> explains how storage type and workload affect performance.<\/p>\n<h2 id=\"section-3\"><span id=\"Install_and_Configure_Prometheus\">Install and Configure Prometheus<\/span><\/h2>\n<h3><span id=\"How_Prometheus_Collects_Metrics\">How Prometheus Collects Metrics<\/span><\/h3>\n<p>Prometheus works by scraping endpoints that expose metrics in plain text. Your VPS will run Node Exporter to expose system metrics. Prometheus itself can live on the same server for a small setup, or on a separate monitoring box if you want to scale later. Choose the location according to the failure isolation and resource capacity you need.<\/p>\n<h3><span id=\"Install_Node_Exporter_on_the_VPS_you_want_to_monitor\">Install Node Exporter on the VPS you want to monitor<\/span><\/h3>\n<p>It exposes CPU loads, memory, disks, filesystems, and network metrics; systemd status requires enabling its optional systemd collector. The downloads below target Linux amd64 and pin older versions, not the latest releases. Before starting Node Exporter, restrict inbound port 9100 to the Prometheus server, or block remote access for local-only scraping. On Debian\/Ubuntu:<\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\"># Create a user\nsudo useradd --no-create-home --shell \/usr\/sbin\/nologin node_exporter\n\n# Pinned example: Node Exporter 1.7.0 (Linux amd64), not a latest-release selector\nwget https:\/\/github.com\/prometheus\/node_exporter\/releases\/download\/v1.7.0\/node_exporter-1.7.0.linux-amd64.tar.gz\n\ntar -xzf node_exporter-1.7.0.linux-amd64.tar.gz\nsudo cp node_exporter-1.7.0.linux-amd64\/node_exporter \/usr\/local\/bin\/\n\n# Systemd service\nsudo tee \/etc\/systemd\/system\/node_exporter.service &gt;\/dev\/null &lt;&lt; &#039;EOF&#039;\n[Unit]\nDescription=Node Exporter\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nUser=node_exporter\nGroup=node_exporter\nType=simple\nExecStart=\/usr\/local\/bin\/node_exporter\n\n[Install]\nWantedBy=multi-user.target\nEOF\n\nsudo systemctl daemon-reload\nsudo systemctl enable --now node_exporter\n\n# Default port is 9100\n# Confirm it works\ncurl http:\/\/127.0.0.1:9100\/metrics | head -n 5\n<\/code><\/pre>\n<p>After starting Node Exporter, confirm the Prometheus host can reach port 9100 and an untrusted host cannot. For local-only scraping, remote access should remain blocked. If metric traffic crosses an untrusted network, use TLS or a VPN; restricting source IPs does not encrypt the traffic.<\/p>\n<h3><span id=\"Install_Prometheus\">Install Prometheus<\/span><\/h3>\n<p>You can run Prometheus on the same machine while testing, or spin up a small VPS just for monitoring. For a single VPS, same-box monitoring is convenient, but it goes down with that VPS. A separate monitoring host provides better failure isolation. The configuration below assumes Node Exporter is on the Prometheus host: if it is on another VPS, replace <code>127.0.0.1:9100<\/code> with that VPS\u2019s reachable private Node Exporter address. Before starting Prometheus below, restrict inbound port 9090 to trusted administrative and Grafana hosts: the example listens on all IPv4 interfaces without authentication.<\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\"># Create user and directories\nsudo useradd --no-create-home --shell \/usr\/sbin\/nologin prometheus\nsudo mkdir -p \/etc\/prometheus \/var\/lib\/prometheus\n\n# Pinned example: Prometheus 2.53.1 (Linux amd64); check current supported releases\nwget https:\/\/github.com\/prometheus\/prometheus\/releases\/download\/v2.53.1\/prometheus-2.53.1.linux-amd64.tar.gz\n\ntar -xzf prometheus-2.53.1.linux-amd64.tar.gz\nsudo cp prometheus-2.53.1.linux-amd64\/prometheus \/usr\/local\/bin\/\nsudo cp prometheus-2.53.1.linux-amd64\/promtool \/usr\/local\/bin\/\nsudo cp -r prometheus-2.53.1.linux-amd64\/consoles \/etc\/prometheus\/\nsudo cp -r prometheus-2.53.1.linux-amd64\/console_libraries \/etc\/prometheus\/\n\n# Basic config\nsudo tee \/etc\/prometheus\/prometheus.yml &gt;\/dev\/null &lt;&lt; &#039;EOF&#039;\nglobal:\n  scrape_interval: 15s\n  evaluation_interval: 15s\nscrape_configs:\n  - job_name: &#039;node&#039;\n    static_configs:\n      - targets: [&#039;127.0.0.1:9100&#039;]\nEOF\n\nsudo chown -R prometheus:prometheus \/etc\/prometheus \/var\/lib\/prometheus\n\n# Systemd service\nsudo tee \/etc\/systemd\/system\/prometheus.service &gt;\/dev\/null &lt;&lt; &#039;EOF&#039;\n[Unit]\nDescription=Prometheus\nWants=network-online.target\nAfter=network-online.target\n\n[Service]\nUser=prometheus\nGroup=prometheus\nType=simple\nExecStart=\/usr\/local\/bin\/prometheus --config.file=\/etc\/prometheus\/prometheus.yml --storage.tsdb.path=\/var\/lib\/prometheus --storage.tsdb.retention.time=15d --web.listen-address=0.0.0.0:9090\n\n[Install]\nWantedBy=multi-user.target\nEOF\n\nsudo systemctl daemon-reload\nsudo systemctl enable --now prometheus\n\n# Visit http:\/\/&lt;server-ip&gt;:9090 to confirm\n<\/code><\/pre>\n<p>A note on retention: 15 days is the default when neither time nor size retention is configured; the example sets it explicitly. Disk usage also depends on series count and scrape frequency, so monitor free space and tune retention to fit. Remote storage does not automatically change local retention.<\/p>\n<h3><span id=\"Scrape_multiple_VPS_nodes\">Scrape multiple VPS nodes<\/span><\/h3>\n<p>To add more servers, install Node Exporter on each, allow scraping only from Prometheus, and replace the existing scrape_configs section with one of the examples below. Substitute reachable private IPs for the sample addresses. After saving, validate the configuration with promtool check config \/etc\/prometheus\/prometheus.yml, then restart Prometheus to apply it.<\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">scrape_configs:\n  - job_name: &#039;node&#039;\n    static_configs:\n      - targets: [&#039;10.0.0.11:9100&#039;, &#039;10.0.0.12:9100&#039;, &#039;10.0.0.13:9100&#039;]\n<\/code><\/pre>\n<p>To organize targets by role, add labels:<\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">scrape_configs:\n  - job_name: &#039;node&#039;\n    static_configs:\n      - targets: [&#039;10.0.0.11:9100&#039;]\n        labels:\n          role: &#039;web&#039;\n      - targets: [&#039;10.0.0.12:9100&#039;]\n        labels:\n          role: &#039;db&#039;\n<\/code><\/pre>\n<p>Use consistent labels such as role and environment so dashboards and alert rules can group or filter targets.<\/p>\n<h3><span id=\"Optional_HTTP_checks_from_the_inside_with_Blackbox_Exporter\">Optional: HTTP checks from the inside with Blackbox Exporter<\/span><\/h3>\n<p>Blackbox Exporter can probe HTTP, TCP or ICMP endpoints from its deployment location. The following pinned Linux amd64 download is only an archive download, not a complete installation:<\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">wget https:\/\/github.com\/prometheus\/blackbox_exporter\/releases\/download\/v0.24.0\/blackbox_exporter-0.24.0.linux-amd64.tar.gz\n<\/code><\/pre>\n<p>The next block is only a <strong>Prometheus scrape-job fragment<\/strong>: it assumes Blackbox Exporter is already installed, running at <code>127.0.0.1:9115<\/code> from Prometheus\u2019s perspective, and has an <code>http_2xx<\/code> module loaded. Prepare that service using the <a href=\"https:\/\/github.com\/prometheus\/blackbox_exporter\/tree\/v0.24.0\" rel=\"nofollow noopener\" target=\"_blank\">versioned Blackbox Exporter instructions<\/a>; check release suitability and restrict access to trusted callers. Append this job to the existing <code>scrape_configs<\/code> list, keep the Node Exporter job, and replace the sample target URLs.<\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\"># Append this item under your existing scrape_configs list.\n  - job_name: &#039;blackbox&#039;\n    metrics_path: \/probe\n    params:\n      module: [http_2xx]\n    static_configs:\n      - targets:\n          - https:\/\/example.com\n          - https:\/\/api.example.com\/health\n    relabel_configs:\n      - source_labels: [__address__]\n        target_label: __param_target\n      - source_labels: [__param_target]\n        target_label: instance\n      - target_label: __address__\n        replacement: 127.0.0.1:9115\n<\/code><\/pre>\n<p>Check the exporter\u2019s <code>\/probe<\/code> output for each intended target and module, including <code>probe_success<\/code>. Validate the merged Prometheus configuration with <code>promtool check config \/etc\/prometheus\/prometheus.yml<\/code>, apply it through the existing service workflow and inspect each target\u2019s distinct <code>instance<\/code> label. A reachable exporter does not by itself prove the probed website is healthy. For the general model, see the <a href=\"https:\/\/prometheus.io\/docs\/introduction\/overview\/\" rel=\"nofollow noopener\" target=\"_blank\">Prometheus overview<\/a>.<\/p>\n<h2 id=\"section-4\"><span id=\"Configure_Grafana_Dashboards_and_Alerts\">Configure Grafana Dashboards and Alerts<\/span><\/h2>\n<h3><span id=\"Install_Grafana_and_Connect_Prometheus\">Install Grafana and Connect Prometheus<\/span><\/h3>\n<p>Install Grafana before adding the data source. On the Debian or Ubuntu host, follow the official <a href=\"https:\/\/grafana.com\/docs\/grafana\/latest\/setup-grafana\/installation\/debian\/\" rel=\"nofollow noopener\" target=\"_blank\">Grafana APT installation instructions<\/a> for a supported package. For that package on systemd, reload unit definitions with <code>sudo systemctl daemon-reload<\/code>, start and enable it with <code>sudo systemctl enable --now grafana-server<\/code>, then check <code>sudo systemctl status grafana-server<\/code>. The official <a href=\"https:\/\/grafana.com\/docs\/grafana\/latest\/setup-grafana\/start-restart-grafana\/\" rel=\"nofollow noopener\" target=\"_blank\">Grafana service instructions<\/a> cover other installation methods. Restrict dashboard access to trusted users and complete secure administrator setup before remote use. In Grafana, add a Prometheus data source using the URL reachable from the Grafana host, such as <code>http:\/\/YOUR_PROM_SERVER:9090<\/code>. Save and test the connection, then confirm a query such as <code>up<\/code> returns the expected targets.<\/p>\n<p>Start with CPU utilization per instance; the irate query below uses the last two samples within a five-minute lookback, not a five-minute average or system load. Then add memory usage based on MemAvailable, which estimates memory available without swapping rather than simply subtracting cache and buffers. Disk IO time and IOwait follow, and finally network throughput. Choose units and thresholds appropriate to each panel; reserve warning colors for conditions that need attention.<\/p>\n<h3><span id=\"CPU_Memory_Disk_and_Network_Queries\">CPU, Memory, Disk and Network Queries<\/span><\/h3>\n<p>Use these PromQL queries as starting points, then select the relevant instances and devices:<\/p>\n<p><strong>CPU usage (per instance):<\/strong><\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">100 - (avg by (instance) (irate(node_cpu_seconds_total{mode=&quot;idle&quot;}[5m])) * 100)\n<\/code><\/pre>\n<p><strong>Memory used (percentage based on MemAvailable):<\/strong><\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">(node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes) \/ node_memory_MemTotal_bytes * 100\n<\/code><\/pre>\n<p><strong>Disk IO time (per device):<\/strong><\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">avg by (instance, device) (irate(node_disk_io_time_seconds_total[5m]) * 100)\n<\/code><\/pre>\n<p><strong>Network receive\/transmit (bytes per second):<\/strong> These queries sum all reported interfaces, including loopback and virtual interfaces. Traffic traversing multiple interfaces may be counted more than once; filter to the relevant interfaces when measuring external throughput.<\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">sum by (instance) (irate(node_network_receive_bytes_total[5m]))\nsum by (instance) (irate(node_network_transmit_bytes_total[5m]))\n<\/code><\/pre>\n<p>Compare these panels over the same time range. Disk IO time may rise during backups while CPU remains low, or memory usage may grow between service restarts. Correlate those patterns with workload changes and logs before assigning a cause.<\/p>\n<h3><span id=\"Set_Alert_Thresholds_and_Pending_Periods\">Set Alert Thresholds and Pending Periods<\/span><\/h3>\n<p>Use alert severity and pending duration to match operational needs. For example, five-minute average CPU above 90% throughout a ten-minute pending period could be a warning; a higher sustained threshold might justify a separate critical rule. These are starting examples, not universal cutoffs. A rule also needs an evaluation interval, labels, a notification route and a plan for missing data or query errors. Brief utilization spikes and sustained pressure should not be treated identically.<\/p>\n<p>The following is a <strong>conceptual checklist, not importable Grafana YAML<\/strong>. In a Grafana-managed rule, select the Prometheus data source and use the unfiltered numeric query as A. For a range query, add a Reduce expression using Last, then a Threshold expression above 90; make that threshold the alert condition. Set an evaluation group and a ten-minute pending period. Preview the query and condition, checking that healthy instances return a value and resolve normally. Configure No Data and Error handling deliberately, and route their separate alerts along with the CPU rule. Set the keep-firing period deliberately: a rule can remain in Recovering after its threshold is no longer breached. For the starter example, use a zero keep-firing period, then test firing and resolution with a disposable rule. The UI and provisioning formats depend on the Grafana version; this checklist follows the current official Grafana-managed rule documentation.<\/p>\n<pre class=\"language-python line-numbers\"><code class=\"language-python\">Conceptual design checklist \u2014 configure these in Grafana, do not import this block.\nQuery A: 100 - (avg by (instance) (rate(node_cpu_seconds_total{mode=&quot;idle&quot;}[5m])) * 100)\nReduce B: Last value of A, per instance\nCondition C: B is above 90\nEvaluation interval: 1 minute (example)\nPending period: 10 minutes (example)\nKeep firing for: 0 minutes (starter example)\nLabel: severity = warning\nSummary: High CPU on {{ $labels.instance }}\nNo Data behavior: Set No Data state\nQuery error behavior: Set Error state\nNotifications: configure and test the intended contact point or policy\n<\/code><\/pre>\n<p>A separate critical rule can use a different threshold and duration. For memory, disk and I\/O, define appropriate units and conditions instead of copying CPU thresholds unchanged. Ensure notification routing also covers DatasourceNoData and DatasourceError. A dead man\u2019s switch is a heartbeat sent regularly to an independent receiver, which alerts when it stops arriving. An alert evaluated only by Prometheus cannot report that Prometheus itself has stopped.<\/p>\n<p>Use the <a href=\"https:\/\/grafana.com\/docs\/grafana\/latest\/\" rel=\"nofollow noopener\" target=\"_blank\">Grafana documentation<\/a> for version-specific alert configuration, contact points, mute times and silences.<\/p>\n<h3><span id=\"Organize_the_Dashboard\">Organize the Dashboard<\/span><\/h3>\n<p>Group panels by host, storage and networking, with an overview that highlights the services requiring attention. Keep labels, units and time ranges consistent so responders can compare related metrics.<\/p>\n<p>Add application metrics when available, such as queue depth next to CPU usage or cache hit rate next to disk IO. This helps distinguish application bottlenecks from host resource pressure. For PHP-FPM, OPcache, queues, Horizon and Redis, see the <a href=\"https:\/\/www.dchost.com\/blog\/en\/laravel-production-optimization\/\">Laravel production tuning guide<\/a>.<\/p>\n<h2 id=\"section-5\"><span id=\"Configure_Uptime_Kuma_for_External_Checks\">Configure Uptime Kuma for External Checks<\/span><\/h2>\n<h3><span id=\"Choose_an_Independent_Monitoring_Location\">Choose an Independent Monitoring Location<\/span><\/h3>\n<p>Uptime Kuma checks whether a service is reachable from its own location. Run it on a separate VPS, ideally outside the monitored service\u2019s network or provider failure domain. DNS or firewall failures affecting that probe\u2019s path can then be detected, though one location does not represent every user\u2019s experience. A successful HTTP check of a login or checkout endpoint does not prove the complete login or payment workflow works. Use separate synthetic workflow tests, with a test environment for payments.<\/p>\n<h3><span id=\"Install_Docker_and_Start_Uptime_Kuma\">Install Docker and Start Uptime Kuma<\/span><\/h3>\n<p>The following example uses Docker Engine on the monitoring host. Install the supported packages for that host using the official <a href=\"https:\/\/docs.docker.com\/engine\/install\/debian\/\" rel=\"nofollow noopener\" target=\"_blank\">Docker Engine installation instructions for Debian<\/a>; Ubuntu users should select the Ubuntu instructions from Docker\u2019s installation navigation. Verify the daemon is running and that <code>sudo docker run hello-world<\/code> succeeds before continuing. Docker normally starts at boot on Debian and Ubuntu; verify that configuration, or enable <code>docker.service<\/code> and <code>containerd.service<\/code> as described in Docker\u2019s <a href=\"https:\/\/docs.docker.com\/engine\/install\/linux-postinstall\/\" rel=\"nofollow noopener\" target=\"_blank\">systemd startup instructions<\/a>. The example uses sudo rather than assuming Docker-group membership. Before launch, restrict port 3001 using controls that apply to Docker-published ports; a host firewall rule alone may not provide the expected restriction.<\/p>\n<pre class=\"language-bash line-numbers\"><code class=\"language-bash\">sudo docker run -d \\\n  --name uptime-kuma \\\n  --restart unless-stopped \\\n  -p 3001:3001 \\\n  -v uptime-kuma:\/app\/data \\\n  louislam\/uptime-kuma:2\n<\/code><\/pre>\n<p>The command publishes port 3001 on all host interfaces and stores application data in the local <code>uptime-kuma<\/code> volume at <code>\/app\/data<\/code>. The <code>:2<\/code> tag selects a major release line, not an immutable version; review release and backup requirements before upgrades. The <a href=\"https:\/\/docs.docker.com\/engine\/containers\/start-containers-automatically\/\" rel=\"nofollow noopener\" target=\"_blank\">unless-stopped restart policy<\/a> restarts a successfully started container after an exit or daemon restart, but a manually stopped container stays stopped until you start it again. This policy does not itself enable the Docker daemon at boot. Use a trusted private connection for initial setup at <code>http:\/\/YOUR_MONITORING_VPS:3001<\/code> and HTTPS for remote web access. Set the admin account, then add HTTP(s) checks for the website, admin panel and critical APIs. Check MySQL or Redis over a private network; do not expose them publicly for monitoring. A cron-driven keyword endpoint must also signal stale results: unchanged \u201chealthy\u201d text does not prove the job ran recently.<\/p>\n<p>Check <code>sudo docker ps --filter name=uptime-kuma<\/code> and <code>sudo docker logs --tail 50 uptime-kuma<\/code>, then verify the web interface and monitor history. During a planned maintenance window, with console access and a recovery plan available, reboot the monitoring host and confirm that Docker and Uptime Kuma return, saved monitors remain and checks resume. Use an independent heartbeat or external check to detect failure of the monitoring host itself; Kuma cannot notify while it is down.<\/p>\n<p>Use Uptime Kuma\u2019s Push monitor when a job must check in on time. Your backup job can hit a URL after it completes. If Uptime Kuma doesn\u2019t receive the push within the interval you set, it flags it. A missing push can reveal a job that failed before reaching its completion signal; send that signal only after successful completion.<\/p>\n<h3><span id=\"Configure_and_Test_Notifications\">Configure and Test Notifications<\/span><\/h3>\n<p>Configure a notification channel that responders monitor, and assign urgency according to the affected service. Test the contact point, then simulate failure and recovery on a disposable test monitor to confirm both messages arrive through the intended route. Repeat this check after the planned reboot test. Schedule maintenance windows so expected downtime does not trigger avoidable alerts.<\/p>\n<h3><span id=\"Choose_Monitors_for_a_Status_Page\">Choose Monitors for a Status Page<\/span><\/h3>\n<p>Choose which monitors appear on a public status page and use plain descriptions such as \u201cEurope API degraded.\u201d Include the affected service and relevant updates without exposing internal-only monitoring details.<\/p>\n<p>The <a href=\"https:\/\/github.com\/louislam\/uptime-kuma\" rel=\"nofollow noopener\" target=\"_blank\">Uptime Kuma repository<\/a> documents current installation options, release information and supported configuration.<\/p>\n<h2 id=\"section-6\"><span id=\"Verify_the_Monitoring_Setup\">Verify the Monitoring Setup<\/span><\/h2>\n<p>Prometheus supplies metric history, Grafana displays it and evaluates alerts, and independently hosted Uptime Kuma checks availability. Together they help detect changes and provide evidence for incident investigation.<\/p>\n<p>Before relying on the setup, verify exporter targets, Grafana queries, alert recovery, notification routing and monitoring-host reboot recovery. Start with CPU, memory, disk and network panels plus alerts for sustained CPU pressure, low disk space and downtime. Add IOwait, queue depth and HTTP probe metrics as the workload requires.<\/p>\n<p>Monitoring also supports incident diagnosis alongside preventive controls. For a related overview of Cloudflare, ModSecurity and Fail2ban, see the guide to <a href=\"https:\/\/www.dchost.com\/blog\/en\/the-layered-shield-i-trust-waf-and-bot-protection-with-cloudflare-modsecurity-and-fail2ban\/\">layered WAF and bot protection<\/a>.<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Combine Prometheus metrics, Grafana dashboards and alerts, and independently hosted Uptime Kuma checks. The guide covers exporters, starter queries, notification planning and monitoring access precautions.<\/p>\n","protected":false},"author":1,"featured_media":7129,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[184],"tags":[],"class_list":["post-1435","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/posts\/1435","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/comments?post=1435"}],"version-history":[{"count":5,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/posts\/1435\/revisions"}],"predecessor-version":[{"id":11124,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/posts\/1435\/revisions\/11124"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/media\/7129"}],"wp:attachment":[{"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/media?parent=1435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/categories?post=1435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dchost.com\/blog\/en\/wp-json\/wp\/v2\/tags?post=1435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}