tutorial

Uptime monitoring for Steampipe

Steampipe lets you query cloud infrastructure using SQL — AWS, Azure, GCP, GitHub, Kubernetes, and dozens more providers through a PostgreSQL-compatible inte...

Steampipe lets you query cloud infrastructure using SQL — AWS, Azure, GCP, GitHub, Kubernetes, and dozens more providers through a PostgreSQL-compatible interface. When teams build dashboards, compliance checks, and cost reports on top of Steampipe, availability becomes critical. If Steampipe's service layer goes down, those queries fail silently and compliance dashboards stop updating. The first sign is usually a confused engineer wondering why their cost report is three days stale.

This tutorial covers production-grade uptime monitoring for Steampipe using Vigilmon. We will walk through:

  • Monitoring the Steampipe service health endpoint
  • Monitoring the Steampipe Dashboard server
  • Port-level TCP monitoring for the PostgreSQL interface
  • Webhook alerts for DOWN/UP events

Prerequisites

  • Steampipe installed and running (steampipe service start)
  • Steampipe Dashboard or a custom HTTP health endpoint exposed
  • A free account at vigilmon.online

Part 1: Start Steampipe as a service and expose a health check

Steampipe runs as a background PostgreSQL service on port 9193. It does not expose an HTTP health endpoint by default, so you have two options: expose a health check via a small proxy, or monitor the TCP port directly.

Start the Steampipe service

steampipe service start

# Steampipe service is running:
#   Database:  postgres://steampipe@localhost:9193/steampipe
#   Password:  abc123 (temporary, changes on restart)

Check service status

steampipe service status
# Steampipe service is running.
# postgres://steampipe@localhost:9193/steampipe

Create a lightweight HTTP health proxy

Because Vigilmon monitors HTTP(S) and TCP endpoints, the simplest approach is a minimal Express server that queries Steampipe's PostgreSQL interface and reports health:

// steampipe-health.ts
import express from 'express';
import { Pool } from 'pg';

const app = express();

const pool = new Pool({
  host: 'localhost',
  port: 9193,
  database: 'steampipe',
  user: 'steampipe',
  password: process.env.STEAMPIPE_PASSWORD,
  connectionTimeoutMillis: 5000,
  idleTimeoutMillis: 10000,
});

app.get('/health', async (req, res) => {
  try {
    const result = await pool.query('SELECT 1');
    res.json({ status: 'ok', rows: result.rowCount });
  } catch (err) {
    res.status(503).json({ status: 'error', message: String(err) });
  }
});

app.listen(3000, () => {
  console.log('Steampipe health proxy on :3000');
});

Run it:

STEAMPIPE_PASSWORD=$(steampipe service status --output json | jq -r '.password') \
  npx ts-node steampipe-health.ts

Test it:

curl http://localhost:3000/health
# {"status":"ok","rows":1}

Part 2: Set up HTTP monitoring in Vigilmon

Monitor the Steampipe health proxy

  1. Log in to vigilmon.online and click Add Monitor.
  2. Choose HTTP(S) monitor.
  3. Enter: https://steampipe.example.com/health
  4. Set interval to 2 minutes (Steampipe queries can be slow on first connection).
  5. Add a keyword check: must contain "status":"ok".
  6. Add your alert channel.
  7. Click Save.

Monitor the Steampipe Dashboard

If you use steampipe dashboard to serve interactive cloud infrastructure dashboards:

steampipe dashboard --port 9194

Add a second HTTP monitor:

  1. Add an HTTP(S) monitor.
  2. Enter: https://steampipe-dashboard.example.com/
  3. Set interval to 2 minutes.
  4. Add a keyword check: must contain Steampipe (or the title of your dashboard page).
  5. Click Save.

Part 3: TCP port monitoring for the PostgreSQL interface

For teams that connect to Steampipe directly via psql or BI tools like Metabase or Grafana, monitor the PostgreSQL port to catch connection failures at the network layer:

  1. In Vigilmon, click Add Monitor.
  2. Choose TCP monitor.
  3. Enter host: steampipe.example.com, port: 9193.
  4. Set interval to 2 minutes.
  5. Add your alert channel.
  6. Click Save.

This catches the common failure mode where the Steampipe service crashes or the host runs out of memory, leaving the port unreachable while an HTTP proxy might not have detected the failure yet.


Part 4: Monitor plugin-level health

Steampipe plugins connect to external APIs. A plugin failure means SQL queries against that provider will error. Add a query-level health check that exercises each critical plugin:

// plugin-health.ts
import express from 'express';
import { Pool } from 'pg';

const app = express();

const pool = new Pool({
  host: 'localhost',
  port: 9193,
  database: 'steampipe',
  user: 'steampipe',
  password: process.env.STEAMPIPE_PASSWORD,
});

const pluginChecks: { name: string; query: string }[] = [
  { name: 'aws', query: 'SELECT count(*) FROM aws_account' },
  { name: 'github', query: 'SELECT count(*) FROM github_my_repository' },
  { name: 'kubernetes', query: 'SELECT count(*) FROM kubernetes_namespace' },
];

app.get('/health/plugins', async (req, res) => {
  const results: Record<string, string> = {};
  let allOk = true;

  for (const check of pluginChecks) {
    try {
      await pool.query(check.query);
      results[check.name] = 'ok';
    } catch {
      results[check.name] = 'error';
      allOk = false;
    }
  }

  res.status(allOk ? 200 : 503).json({ status: allOk ? 'ok' : 'degraded', plugins: results });
});

app.listen(3001);

Add a Vigilmon monitor for https://steampipe.example.com/health/plugins with a keyword check for "status":"ok".


Part 5: SSL certificate monitoring

If you serve Steampipe's health proxy or dashboard over HTTPS:

  1. In Vigilmon, click Add Monitor.
  2. Choose SSL monitor.
  3. Enter: steampipe.example.com.
  4. Set alert threshold to 14 days before expiry.
  5. Add your alert channel.

Part 6: Webhook alerts

Configure Vigilmon to notify your team when Steampipe goes down:

// webhook-receiver.ts
import express from 'express';

const app = express();
app.use(express.json());

app.post('/webhook/vigilmon', (req, res) => {
  const { monitor_name, status, url, checked_at, response_code } = req.body;

  if (status === 'down') {
    console.error('[STEAMPIPE] Monitor DOWN', {
      monitor: monitor_name,
      url,
      code: response_code,
      at: checked_at,
    });

    // Alert data team — dashboards and compliance checks are stale
    notifySlack({
      channel: '#data-infra',
      text: `Steampipe is down: ${monitor_name}. Cloud queries and compliance checks are failing.`,
    });
  } else if (status === 'up') {
    console.info('[STEAMPIPE] Monitor recovered', { monitor: monitor_name });
  }

  res.sendStatus(204);
});

app.listen(3002);

Vigilmon sends this payload on state transitions:

{
  "monitor_id": "mon_abc123",
  "monitor_name": "Steampipe Health",
  "status": "down",
  "url": "https://steampipe.example.com/health",
  "checked_at": "2026-06-30T08:01:00Z",
  "response_code": 503,
  "response_time_ms": 1502
}

Part 7: Alerting on slow query performance

Steampipe queries that call external APIs can become slow when a provider's API rate-limits your account. Add a response time alert in Vigilmon:

  1. Open your Steampipe health monitor in Vigilmon.
  2. Navigate to Alert settings.
  3. Add a response time alert: alert if response time exceeds 10 seconds.
  4. Save.

If your health proxy starts taking longer than 10 seconds to respond to SELECT 1, it is a sign that Steampipe's connection pool is saturated or a plugin is hanging on an external API call.


Summary

Your Steampipe deployment now has four layers of monitoring:

  1. HTTP health proxy — a lightweight Express service queries Steampipe's PostgreSQL interface every 2 minutes and reports health over HTTP.
  2. TCP port monitor — monitors port 9193 directly, catching crashes that the HTTP layer might miss.
  3. Plugin health check — exercises each critical plugin with a real SQL query so you know whether AWS, GitHub, or Kubernetes data is stale.
  4. Webhook alerts — DOWN events notify your data team that cloud dashboards and compliance checks are failing.

Vigilmon handles check scheduling, multi-region polling, alert routing, and uptime history. You get notified within 2 minutes of any Steampipe failure.


Monitor your Steampipe infrastructure free at vigilmon.online

#steampipe #cloudinfrastructure #devops #monitoring #sql

Monitor your app with Vigilmon

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

Start free →