Deploy Monirail - Log Monitoring

Set up alerting for logs and metrics using a Railway function

Deploy Monirail - Log Monitoring

Just deployed

/data

Deploy and Host Monirail - Log Monitoring on Railway

Monitor Railway services and notify your team when issues are detected. This is hosted in a lightweight Railway function and is fully customizable by editing the source code.

See Full Documentation

Quick Start

import { monitor, source, notify, watch } from "monirail";

// Create a Slack notifier
const slack = notify({
	type: "slack",
	webhookUrl: process.env.SLACK_WEBHOOK_URL,
});

// Monitor for errors in your logs
const errorMonitor = monitor({
	name: "Error Alert",
	type: "match",
	source: source({ type: "environment_logs" }),
	filter: "@level:error",
	notify: [slack],
});

// Monitor CPU usage
const cpuMonitor = monitor({
	name: "High CPU",
	type: "threshold",
	source: source({
		type: "metrics",
		aggregate: "avg",
		measure: "CPU_USAGE",
	}),
	value: 80,
	notifyOn: "above",
	notify: [slack],
});

// Check monitors every minute
watch(1, [errorMonitor, cpuMonitor]);

Common Use Cases

  • Monitor a single service or the entire environment's logs
  • Monitor a service's HTTP logs
  • Monitor a service's metrics
  • Send notifications to Discord, Slack, Pagerduty, Webhooks, or a custom provider (e.g. email)

About Hosting

Why Deploy

Dependencies for

Deployment Dependencies


Template Content

More templates in this category

View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

View Template
(v1) Simple Medusa Backend
Deploy an ecommerce backend and admin using Medusa

View Template
peppermint
Docker-compose port for peppermint.sh