How to Monitor CableReady with Vigilmon
CableReady lets your Rails server push DOM operations directly to the browser over WebSockets — without a full JavaScript framework. It's elegant when it works, but when your Action Cable connection drops or Redis goes down, your UI just stops updating. No error, no reload, just silence.
This tutorial walks you through setting up comprehensive monitoring for a CableReady app so you catch problems before users start refreshing their browsers in frustration.
Why CableReady apps need specialized monitoring
CableReady is a server-side library — it emits DOM operations from your Ruby code over Action Cable channels. That means your frontend reliability depends entirely on the health of:
- Your Rails server — obvious, but foundational
- Action Cable — the WebSocket layer that carries CableReady operations
- Redis — the pub/sub backend Action Cable uses to coordinate across processes
Standard HTTP monitors only cover the first item. If Redis drops or Action Cable hits its connection limit, your health endpoint still returns 200 while every CableReady operation is silently dropped.
Step 1: Create a health endpoint
Add health check support to your Rails app:
# Gemfile
gem 'health_check'
gem 'redis'
bundle install
Configure the health checks to include Redis:
# config/initializers/health_check.rb
HealthCheck.setup do |config|
config.standard_checks = ['database', 'cache', 'redis', 'migrations']
end
Mount in routes:
# config/routes.rb
Rails.application.routes.draw do
mount HealthCheck::Engine, at: '/health'
end
Step 2: Add a CableReady-specific health check
Create an endpoint that validates the full CableReady stack:
# app/controllers/cableready_health_controller.rb
class CablereadyHealthController < ApplicationController
skip_before_action :authenticate_user!, raise: false
def show
checks = {}
# Check Redis
redis = Redis.new(url: ENV.fetch('REDIS_URL', 'redis://localhost:6379'))
redis.ping
checks[:redis] = 'ok'
# Check Action Cable adapter
checks[:action_cable_adapter] = ActionCable.server.config.cable['adapter']
# Verify CableReady is available
checks[:cableready] = CableReady.config.present? ? 'configured' : 'unconfigured'
render json: { status: 'ok', checks: checks }, status: :ok
rescue Redis::CannotConnectError => e
render json: {
status: 'degraded',
error: 'redis_unavailable',
message: e.message
}, status: :service_unavailable
rescue => e
render json: {
status: 'error',
message: e.message
}, status: :internal_server_error
end
end
# config/routes.rb
get '/health/cableready', to: 'cableready_health#show'
Test it:
curl http://localhost:3000/health/cableready
# {"status":"ok","checks":{"redis":"ok","action_cable_adapter":"redis","cableready":"configured"}}
Step 3: Monitor with Vigilmon
With your health endpoints ready, set up monitoring at vigilmon.online:
- Create a free account at vigilmon.online
- Click New Monitor → HTTP
Monitor 1 — Rails server:
- URL:
https://yourdomain.com/health - Interval: every 1 minute
- Expected status: 200
Monitor 2 — CableReady stack:
- URL:
https://yourdomain.com/health/cableready - Interval: every 1 minute
- Expected status: 200
- Expected body contains:
"status":"ok"
Two monitors, two layers: your Rails process and the Action Cable + Redis stack CableReady depends on.
Step 4: Configure Slack alerts
- In Vigilmon go to Settings → Integrations → Slack
- Click Connect Slack, pick your workspace and channel
- On each monitor, enable Alert on failure
You'll get a Slack notification within seconds when either check fails — including which endpoint failed and what status it returned.
Step 5: Key metrics and thresholds
Track these across both monitors:
| Metric | Warning | Critical | |--------|---------|----------| | HTTP response time | > 500ms | > 2000ms | | CableReady health response time | > 400ms | > 1500ms | | Consecutive failures before alert | 1 | 1 | | 7-day uptime | < 99.9% | < 99% |
Response time on the /health/cableready endpoint is a leading indicator — Redis slowness shows up here before it causes visible DOM operation drops.
Step 6: What to do when an alert fires
Rails server down: check your process manager (systemd, Procfile, Heroku dynos), review exception logs, restart if needed.
CableReady health degraded — Redis unavailable: connect to your Redis instance (redis-cli ping), check memory usage (redis-cli info memory), restart or scale the Redis service.
CableReady health degraded — Action Cable issues: check your Action Cable connection pool settings in config/cable.yml, look for connection exhaustion in logs, scale the number of Rails processes.
Step 7: Add a status page
Give users visibility during incidents:
- In Vigilmon go to Status Pages → New Status Page
- Add both monitors
- Set a custom subdomain (e.g.
status.yourdomain.com) - Publish
Users can check the status page themselves during incidents instead of flooding your support channel.
Conclusion
CableReady's server-to-browser architecture means traditional HTTP monitoring leaves a significant blind spot. With Vigilmon you cover the whole stack:
- HTTP monitor for your Rails process
- CableReady-specific monitor for Action Cable and Redis
- Slack alerts the moment any layer fails
- Public status page for incident communication
Sign up at vigilmon.online — full CableReady monitoring in under 30 minutes, free.