tutorial

Monitoring Presto with Vigilmon

Presto is a distributed SQL query engine for large-scale analytics — but when the coordinator or workers go down, queries fail silently. Here's how to monitor Presto's coordinator endpoint, worker count, web UI, and scheduled query heartbeats with Vigilmon.

Presto is a distributed SQL query engine originally developed at Facebook for running interactive queries across large datasets at petabyte scale. It decouples compute from storage and can query data across Hive, S3, PostgreSQL, Kafka, and dozens of other connectors simultaneously. When the Presto coordinator goes down or worker count drops below threshold, queries fail — but without proactive monitoring, you find out from a frustrated analyst, not an alert. Vigilmon keeps you ahead of those failures with coordinator health checks, worker count monitoring, web UI availability, and heartbeat alerts for scheduled query jobs.

What You'll Set Up

  • HTTP monitor for the Presto coordinator /v1/info endpoint (running status check)
  • Web UI availability monitor (default port 8080)
  • Worker node count check via /v1/node
  • Cron heartbeat for scheduled Presto query jobs
  • SSL certificate expiry alerts for production Presto deployments

Prerequisites

  • Presto (or Trino) running with a coordinator and at least one worker
  • Presto coordinator accessible on port 8080 (default)
  • A free Vigilmon account

Step 1: Monitor the Coordinator /v1/info Endpoint

The Presto coordinator exposes a /v1/info REST endpoint that reports whether the cluster is in a starting or running state. This is the authoritative health signal for the coordinator:

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. Enter the coordinator info URL: http://presto-coordinator:8080/v1/info
  4. Set Check interval to 1 minute.
  5. Set Expected HTTP status to 200.
  6. Optionally, set Expected response body to contain "starting":false to confirm the cluster is fully running, not still initializing.
  7. Click Save.

A healthy Presto coordinator returns a JSON payload like:

{
  "nodeVersion": {"version": "0.284"},
  "environment": "production",
  "coordinator": true,
  "starting": false,
  "uptime": "4.56m"
}

If "starting": true persists for more than a few minutes, the coordinator is stuck in initialization — often due to a misconfigured catalog or an unreachable discovery service.


Step 2: Monitor the Presto Web UI

The Presto web UI (default port 8080) provides a query dashboard for operators and is also used by the coordinator to serve the REST API. Confirm it's accessible:

  1. Click Add MonitorHTTP / HTTPS.
  2. Set the URL to http://presto-coordinator:8080/ui/.
  3. Set Expected HTTP status to 200.
  4. Set Check interval to 2 minutes.
  5. Click Save.

The web UI being unavailable doesn't always mean queries are failing (the REST API can sometimes remain functional independently), but it's a strong signal of coordinator health and is the interface your team uses to diagnose query issues. An unresponsive UI means your operators are flying blind.


Step 3: Monitor Worker Count via /v1/node

The /v1/node endpoint returns the list of active worker nodes registered with the coordinator. A drop in worker count reduces parallelism and can cause query timeouts for large jobs:

  1. Click Add MonitorHTTP / HTTPS.
  2. Set the URL to http://presto-coordinator:8080/v1/node.
  3. Set Expected HTTP status to 200.
  4. Optionally, set Expected response body to contain a node ID from a known worker (e.g. the hostname of a critical worker).
  5. Set Check interval to 2 minutes.
  6. Click Save.

For production clusters, pair this with a custom alerting script that checks the node count against your expected minimum:

#!/bin/bash
NODE_COUNT=$(curl -s http://presto-coordinator:8080/v1/node | python3 -c "import sys,json; print(len(json.load(sys.stdin)))")
EXPECTED_MIN=3

if [ "$NODE_COUNT" -lt "$EXPECTED_MIN" ]; then
  echo "ALERT: Presto worker count $NODE_COUNT below minimum $EXPECTED_MIN"
  curl -s https://vigilmon.online/heartbeat/abc123  # omit ping to trigger missed-heartbeat alert
fi

Step 4: Heartbeat Monitoring for Scheduled Presto Query Jobs

Presto is commonly used to run scheduled ETL queries, data exports, or aggregation jobs via cron, Apache Airflow, or custom scripts. Use Vigilmon's cron heartbeat to confirm these jobs complete on schedule:

  1. In Vigilmon, click Add MonitorCron Heartbeat.
  2. Set the Expected ping interval to match your job schedule (e.g. 60 minutes for hourly ETL, 1440 minutes for nightly aggregations).
  3. Copy the heartbeat URL (e.g. https://vigilmon.online/heartbeat/abc123).
  4. Add a ping at the end of your query script:
#!/bin/bash
set -e

# Run Presto query
presto --server http://presto-coordinator:8080 \
       --catalog hive \
       --schema analytics \
       --execute "INSERT INTO daily_summary SELECT ..."

# Signal successful completion to Vigilmon
curl -s https://vigilmon.online/heartbeat/abc123

For Airflow-managed Presto jobs, add the heartbeat ping as a final task in your DAG:

from airflow.operators.bash import BashOperator

ping_vigilmon = BashOperator(
    task_id='ping_vigilmon',
    bash_command='curl -s https://vigilmon.online/heartbeat/abc123',
    dag=dag,
)

presto_query >> ping_vigilmon

If the Presto query fails, times out, or the Airflow worker crashes before the ping task runs, Vigilmon will alert after the expected interval — giving you immediate visibility into missed ETL runs.


Step 5: SSL Certificate Alerts

For Presto deployments served over HTTPS via a reverse proxy or with native TLS configured, add SSL certificate expiry monitoring:

  1. Open the HTTP monitor you created for the Presto coordinator endpoint.
  2. Enable Monitor SSL certificate under the SSL section.
  3. Set Alert when certificate expires in less than 21 days.
  4. Click Save.

A typical nginx reverse proxy for Presto over HTTPS:

server {
    listen 443 ssl;
    server_name presto.yourdomain.com;

    ssl_certificate /etc/letsencrypt/live/presto.yourdomain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/presto.yourdomain.com/privkey.pem;

    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_set_header Host $host;
    }
}

Vigilmon's SSL monitor catches Let's Encrypt renewal failures before your clients see ERR_CERT_DATE_INVALID.


Step 6: Configure Alert Channels

  1. Go to Alert Channels in Vigilmon and add Slack, email, or PagerDuty via webhook.
  2. Set Consecutive failures before alert to 2 for HTTP monitors — coordinator restarts can take 30–60 seconds and cause single-probe misses.
  3. For heartbeat monitors, alert on the first missed ping — there's no grace period for a missed ETL job.
  4. Use Maintenance windows in Vigilmon during planned coordinator restarts or cluster upgrades to suppress false alerts.

Summary

| Monitor | Target | What It Catches | |---|---|---| | Coordinator info | http://presto-coordinator:8080/v1/info | Coordinator crash, stuck initialization | | Web UI | http://presto-coordinator:8080/ui/ | UI unavailability, coordinator degradation | | Worker nodes | http://presto-coordinator:8080/v1/node | Worker dropout, cluster shrinkage | | Cron heartbeat | Heartbeat URL | Failed or missed ETL/query jobs | | SSL certificate | Production HTTPS endpoint | Certificate renewal failure |

Presto's distributed nature means a partial cluster failure can silently degrade query performance before causing full outages. Vigilmon's layered monitoring — coordinator health, worker count, and query job heartbeats — gives you the full picture before your data team feels the impact.

Monitor your app with Vigilmon

Free plan — 5 monitors, no credit card required. Up and running in 60 seconds.

Start free →