Documentation / Using CloseYourIt
Alerts
The rules that create an alert, the notification center and where each person chooses to receive them.
Two settings decide every alert. A rule decides whether the alert is created: it applies to the whole organization. Your preferences decide whether it reaches you and on which channel. You need both: if the rule is off, the alert is never created and preferences cannot make it appear.
Alert rules
Rules live in Alerts → Alert rules. Whoever has permission to manage alerts sees and changes them.
New organizations already have the basic rules: site down and back up, missed scheduled job, machine down, failed service, failing disk, database unreachable and more. You can rename, turn off or change them.
The fastest way to add more is a ready-made template, in Ready-made templates:
- Tell me if a site goes down: two rules, the outage and the recovery;
- Tell me if a scheduled job does not run;
- Tell me about new errors;
- Tell me if a machine is struggling: machine unreachable and disk filling up.
Create a rule
- Press New rule.
- Give it a Name and pick the Event: for example New error, Uptime down, Cron missed, Server disk above threshold, Secret read.
- Pick Project and Environment. Empty = every project, any environment.
- Fill in the fields that event needs:
- Minimum level: for errors, fires only from this severity up;
- Unhandled errors only: ignores errors the code catches on purpose;
- Server threshold: CPU, memory and disk in percent, temperature in °C, database connections, replication delay in seconds.
- Group repeated alerts: identical events within these minutes become a single notification.
- If you want, pick the External channels (see below) and press Save rule.
When the rule fires, whoever can see the project gets the notification in the app, and the email if they turned it on.
A rule's page explains it In plain words, says What it covers and shows the Trigger history. In the list, a rule that produces most of the period's alerts is flagged.
Mute a rule
For maintenance or a false alarm you don't need to turn the rule off. On the rule's page pick Mute 1 hour, Mute 1 day or Mute 1 week. The rule stays active and keeps counting events, but does not alert until the time is up. Then it comes back by itself.
The notification center
Every alert always arrives in the bell at the top and on the Alerts → Notifications page. This channel cannot be turned off.
You can filter by kind, project and read or unread, and press Mark all read.
Your preferences
Each person chooses for themselves in Preferences → Notifications.
- Channels: In-app is always on; Email and Telegram you turn on yourself.
- Per notification: for each kind of alert and each channel pick Every time, Daily digest, Weekly digest or Off.
- Ready-made setups: Essential, Everything or Urgent only set every cadence in one go. They replace the choices made by hand.
- Minimum error level: you only get errors from this severity up.
If an alert already reached you on Telegram, the same email is not sent.
Quiet hours
Turn on Quiet hours and pick From, To and Timezone. In that window non-urgent emails are held. In-app notifications are never delayed.
Critical outages always get through, even at night: site down, server down, database unreachable, replication disconnected, missed scheduled job, silent cluster.
Telegram
- In Preferences → Notifications turn Telegram on and press Connect Telegram: it opens the chat with the bot, already recognised as yours.
- In the chat, press Start.
- Come back to the page: once you read "Connected as", alerts reach you in chat.
The bot is created once by the installation's administrator: see Settings. Emails, too, go out only if the installation has an SMTP server.
Webhook
A webhook carries alerts to another system: a team chat, a service of yours.
- Open Alerts → Delivery channels and press New channel.
- Type the Name and the Webhook URL: a public
httpsaddress. - If you want, set a Signing secret (optional).
- Press Create channel, then connect it to the rules that should use it, in the External channels field.
For every alert CloseYourIt sends a POST request with a JSON body: event_type, title, body, url, project, subject and sent_at. With the secret, the request carries the X-CloseYourIt-Signature: sha256=<signature> header: the HMAC-SHA256 signature of the body, to check before you trust it. If your address does not answer, delivery is not retried.
Email summary
Different from alerts: an email with the big picture of your projects, that is visits, errors and uptime, compared with the period before. In Preferences → Notifications, under Data summary by email, pick Every day, Every Monday, On the first of the month or Never. It arrives in the morning and covers only the projects you can see.