tutorial

Monitoring Maybe Finance with Vigilmon: Uptime, Database & Market Data Alerts for Self-Hosted Wealth Management

How to monitor a self-hosted Maybe Finance personal finance app with Vigilmon — covering web server availability, PostgreSQL connectivity, market data API health, SSL certificate alerts, and scheduled sync job heartbeats.

Maybe Finance is a self-hosted, open-source personal finance and wealth management application — a Rails app backed by PostgreSQL that tracks your net worth, investment portfolios, and spending. It runs scheduled background jobs to sync market data from external providers, keeping your portfolio valuations up to date. When Maybe's web server goes down, PostgreSQL becomes unreachable, or market data sync jobs silently fail, your financial dashboard stops reflecting reality. Vigilmon gives you external monitoring that watches Maybe Finance from outside your server and alerts you when the app is down, the database is unreachable, market data stops updating, or scheduled sync jobs fail to complete.

What You'll Build

  • A Vigilmon HTTP monitor on Maybe Finance's web server
  • A keyword assertion confirming the app is rendering correctly
  • A market data API connectivity check via response content assertion
  • An SSL certificate expiry alert
  • A Vigilmon heartbeat confirming scheduled data sync jobs complete
  • Alert rules tuned for a personal finance application

Prerequisites

  • A running Maybe Finance instance (default port :3000, typically proxied via Nginx or Caddy)
  • A free account at vigilmon.online

Step 1: Identify the Web Server Endpoint

Maybe Finance is a Ruby on Rails application. It doesn't ship with a dedicated /health endpoint out of the box, but the sign-in page at /users/sign_in (or the root /) is a reliable availability indicator — it requires both the Rails app server and PostgreSQL to be operational.

curl -I https://your-maybe-domain.com/

A healthy Maybe Finance instance returns HTTP 200 (or a 302 redirect to the sign-in page). If the Rails process (Puma) has crashed or PostgreSQL is unreachable, Rails returns a 500 error or the connection is refused entirely.

Reverse proxy setup: Maybe Finance binds to port :3000 by default. Serve it behind Nginx or Caddy with TLS. Caddy handles Let's Encrypt automatically:

maybe.example.com {
  reverse_proxy localhost:3000
}

Step 2: Create a Vigilmon HTTP Monitor

  1. Log in to VigilmonAdd Monitor → HTTP.
  2. URL: https://your-maybe-domain.com/
  3. Check interval: 60 seconds.
  4. Response timeout: 15 seconds (Rails startup can be slower than lighter frameworks).
  5. Expected status: 200.
  6. Click Save.

Vigilmon probes your Maybe Finance web server every 60 seconds from an external location. If Puma crashes, PostgreSQL becomes unreachable, or the VPS goes offline, Vigilmon detects it within one to two minutes.


Step 3: Add a Keyword Assertion for Application Health

A 200 status confirms the HTTP server responded, but it doesn't confirm Rails is rendering the app correctly. A misconfigured reverse proxy can return 200 with an Nginx error page. Add a keyword assertion:

In the monitor settings under Assertions:

  • Keyword: Maybe
  • Must be present: yes

This fails the check if Rails returns a 500 error page (even if the reverse proxy wraps it in a 200), the database connection pool is exhausted and the page can't render, or a bad deployment left a broken asset manifest.


Step 4: Check Market Data Provider Connectivity

Maybe Finance syncs market prices and account data from external providers. If the market data API is unreachable or returning errors, your portfolio valuations stop updating — but the web app itself stays up, so a simple HTTP monitor won't catch it.

Use a Vigilmon keyword monitor on an internal endpoint or a dedicated health check page that includes market data status. Alternatively, configure Maybe Finance to expose its sync status at a URL you can check.

For a lightweight approach, check the application's dashboard page for a keyword that only appears when data is fresh:

  1. Add Monitor → HTTP.
  2. URL: https://your-maybe-domain.com/ (after login, or a public status page if you configure one).
  3. Keyword: Look for a date or balance indicator in the rendered HTML that updates with each sync.

For most self-hosters, the heartbeat approach in Step 5 is more reliable for detecting sync job failures.


Step 5: Set Up a Heartbeat for Scheduled Sync Jobs

Maybe Finance runs background jobs (via Sidekiq or a similar queue) to sync market data, account balances, and transaction history. These jobs can silently fail — the web app stays healthy while the data goes stale. A Vigilmon heartbeat detects this.

Create the heartbeat:

  1. In Vigilmon → Add Monitor → Heartbeat.
  2. Name: Maybe Finance data sync
  3. Expected interval: every 6 hours (or match your sync job frequency).
  4. Grace period: 30 minutes.
  5. Copy the heartbeat URL.

Send the heartbeat from your sync job:

In Maybe Finance's background job configuration, add a step to ping Vigilmon after a successful sync. If you're running Maybe with Docker Compose, add a cron entry:

# /etc/cron.d/maybe-sync-heartbeat
0 */6 * * * root \
  docker compose -f /opt/maybe/docker-compose.yml exec -T maybe \
    rails runner "SyncJob.perform_now" && \
  curl -fsS -X POST https://vigilmon.online/api/heartbeat/YOUR-HEARTBEAT-ID

This approach only pings Vigilmon when the sync job actually runs to completion. If the job fails (bad API key, provider outage, database error), the heartbeat stops and Vigilmon alerts you after the grace period.


Step 6: Monitor SSL Certificate Expiry

Maybe Finance stores sensitive financial data. An expired SSL certificate exposes users to browser security warnings and may lock them out entirely on strict browsers. Monitor certificate validity:

  1. Open your HTTP monitor → SSL Certificate.
  2. Enable Alert before expiry and set the threshold to 21 days.

Renew before the alert fires:

sudo certbot renew --quiet
sudo systemctl reload nginx

Step 7: Configure Alerting

In Vigilmon under Settings → Notifications, set up alert channels:

| Trigger | Channel | Notes | |---|---|---| | HTTP monitor returns non-200 | Email | Rails/Puma down; check docker compose logs maybe | | Response timeout (> 15 s) | Email | Slow query or DB connection issue; check pg_stat_activity | | Keyword Maybe missing | Email | App rendering broken; check Rails logs for exceptions | | Sync heartbeat misses | Email | Background job failed; check Sidekiq queue | | SSL certificate expires < 21 days | Email | Financial app — renew immediately |

Alert after: 2 consecutive failures for the HTTP monitor (Rails apps can be slow on first boot). Alert after 1 miss for the sync heartbeat — stale financial data is a real problem.


Running Maybe Finance with Docker Compose

The recommended Maybe Finance deployment uses Docker Compose:

services:
  maybe:
    image: ghcr.io/maybe-finance/maybe:latest
    restart: unless-stopped
    ports:
      - "127.0.0.1:3000:3000"
    environment:
      - DATABASE_URL=postgresql://maybe:password@postgres/maybe_production
      - SECRET_KEY_BASE=your-secret-key
      - RAILS_ENV=production
    depends_on:
      postgres:
        condition: service_healthy

  postgres:
    image: postgres:16-alpine
    restart: unless-stopped
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U maybe"]
      interval: 10s
      timeout: 5s
      retries: 5
    volumes:
      - postgres_data:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=maybe
      - POSTGRES_PASSWORD=password
      - POSTGRES_DB=maybe_production

With Docker restart policies and Vigilmon external monitoring:

  1. Maybe Finance or PostgreSQL crashes → Docker restarts within seconds
  2. If restart fails or sync jobs stop working, Vigilmon alerts you within the heartbeat grace period
  3. You SSH in and run docker compose logs maybe --tail 50 to diagnose

What Vigilmon Catches That Server Logs Miss

| Scenario | Server logs | Vigilmon | |---|---|---| | Puma worker crash (Rails down) | Container exit log | HTTP monitor fires within 60–120 s | | PostgreSQL connection pool exhausted | DB timeout in Rails log | App returns 500; HTTP monitor fires | | Market data sync job silently fails | Sidekiq/job log on server | Heartbeat stops; alert fires within grace period | | SSL certificate expires | Not in Rails logs | SSL alert fires 21 days before expiry | | VPS network partition | Logs inaccessible | External Vigilmon still detecting unreachable | | Bad deploy breaks asset pipeline | JS errors in browser | Keyword assertion catches broken page |


Maybe Finance gives you a clear picture of your financial health — Vigilmon makes sure Maybe Finance itself stays healthy. Scheduled sync jobs, database connectivity, and SSL certificates are all failure points that server logs alone won't surface fast enough. External monitoring from Vigilmon closes that gap.

Start monitoring your Maybe Finance instance in under 5 minutes — register free at vigilmon.online.

Monitor your app with Vigilmon

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

Start free →