Alerts

Get alerts
when things break

Slasha watches your servers, apps, domains, cron jobs and deploys. It tells you in Slack, Discord, Telegram or email, and again when it’s fixed.

New alert ruleevaluated every 60s

2Threshold

85%

3 Send to

Custom message template (optional)

Preview

← see every message it sends

How it works

How to set up alerts

Admins set them up under Alerts in the dashboard.

01

Add a channel

Slack or Discord webhook, Telegram bot, or SMTP. Press Test to check it.

Alerts → Channels → New channel

02

Create a rule

Pick what to check, set a threshold and choose the channels.

App Memory % · storefront · ≥ 85%

03

Slasha checks every minute

When a rule triggers, you get a message. When it recovers, you get another.

Triggered → Still failing → Resolved

Rule types

Eleven types of rules

Thresholds for CPU, memory, disk and load. Checks for URLs and domains. Failures for cron jobs and deploys.

  • Works on any node, including the main server
  • Health checks call any URL you choose
  • TLS expiry warns you days ahead
All rule types

Servers

  • Node CPU %
  • Node Memory %
  • Node Storage %
  • Node Load Average

Apps

  • App CPU %
  • App Memory %
  • App Health Check

Domains

  • Domain TLS Expiry
  • Domain DNS Misconfigured

Jobs & deploys

  • Cron Failed
  • Deployment Failed

Incidents

A timeline for every incident

Each incident shows when it started, the measurements and every message sent. The resolved message says how long it lasted.

Alerts
AlertsChannelsRules
Openstorefront memory above 85%App Memory % · 4 min ago · 4m
ResolvedDeploy failed: worker-jobsDeployment Failed · 20 min ago · 9m
Resolvedeu-worker-1 CPU above 90%Node CPU % · Yesterday · 12m
Resolvedshop.acme.com TLS expiringDomain TLS Expiry · Oct 28 · 2h
Resolvednightly-digest failedCron Failed · Oct 27 · 1d

Webhooks & scripts

Call a webhook or run a script

Each rule can also call a webhook and run a shell command on the Slasha server. Page your on-call tool, open a ticket or restart something.

  • Webhook gets a JSON POST with the message in text
  • Shell command receives five SLASHA_ALERT_* variables
  • Runs on trigger, while still failing, and on resolve
Webhook & shell command
Shell command
curl -fsS https://ops.acme.dev/page \
  -d "rule=$SLASHA_ALERT_RULE_NAME" \
  -d "status=$SLASHA_ALERT_STATUS" \
  -d "detail=$SLASHA_ALERT_DETAIL"

Environment

SLASHA_ALERT_RULE_NAME
storefront memory above 85%
SLASHA_ALERT_KIND
app_memory
SLASHA_ALERT_STATUS
triggered
SLASHA_ALERT_VALUE
87.4
SLASHA_ALERT_DETAIL
App Memory at 87.4%, threshold 85.0%

Message templates

Write your own message

The default message has the rule name, status, detail and duration. Want something shorter? Give the rule a template.

  • Four variables, anywhere in the text
  • One template for all the rule’s channels
  • Leave it empty for the default
Template variables
Message template

[{{notification_status}}] {{detail}}

{{value}}
the measurement
{{detail}}
what happened
{{notification_status}}
triggered, renotified or resolved
{{alert_kind}}
the rule type

Sends

[triggered] App Memory at 87.4%, threshold 85.0%

More details

Checked every 60s

Each enabled rule is checked once a minute.

Cooldown

Reminds you while it’s still failing. 15 minutes by default.

Resolved messages

Get a message when it’s fixed, with how long it lasted.

Slack & Discord

Paste an incoming webhook URL.

Telegram

Use your own bot token and a chat ID.

Email over SMTP

Send through your own mail server or provider.

Test button

Send a sample message to check a channel.

Admin-only

Only admins can see and change alerts.

Questions about alerts

Have another question? Ask on GitHub.

Who can set up alerts?
Admins. Alerts, channels and rules are under Alerts in the dashboard, which only admins can see. There’s no CLI for them.
How often will I be notified while something is broken?
Once when it starts, then again each time the cooldown passes while it’s still failing. The cooldown defaults to 15 minutes and is set per rule. When it recovers, you get one “Resolved” message with how long it lasted.
Can I send alerts to PagerDuty, Opsgenie or my own tool?
Use the per-rule webhook or shell command. The webhook receives a JSON POST with a text field. The shell command runs on the Slasha server with the alert details in SLASHA_ALERT_* environment variables, so you can curl any API in the format it expects.
How quickly does an alert fire?
Rules are checked every 60 seconds, so a problem is usually reported within a minute or two. App metrics are collected every 10 seconds and node metrics every 15 seconds.
Can I test a channel first?
Yes. Each channel has a Test button that sends a sample message, so you can check the webhook, bot token or SMTP settings.

Other features

All features

Set up alerts on your own server

Free and open source. Your first app can be live in ten minutes.

$curl -fsSL https://slasha.com/setup.sh | bash