Modbot Docs
Self-hosting

Alerts by email

Getting an email when Modbot stops working - what it can tell you itself, what Modbot Cloud tells you when it cannot, and how to set both up.

Modbot can email you when it stops working. There are two halves, and you want both, because they see different things.

HalfWatchesSends throughSees
In ModbotVRChat, the Discord bot, sync, storage, AI spend, email, logs to Cloudyour own SMTPeverything a running Modbot knows about itself
In Modbot Cloudwhether your Modbot has gone quiet, and errors in its logModbot Cloud's own mailthe one thing Modbot cannot report: that it is not running

Why two

A Modbot that is down cannot email you about being down. The process that would send the mail is the process that is not running, and the database holding your address is the one that cannot be reached. That is the whole reason the Cloud half exists.

In Modbot

Settings, Email and alerts, Health alerts. You need the Change settings permission, and email set up — the same SMTP the reset links use.

Everything is off until you turn it on.

What it can watch

CheckFires when
VRChatModbot cannot reach VRChat and waiting will not fix it, or it has been waiting more than an hour
Discord botthe bot is disconnected or stopped
Syncthe group's audit log has not been read for three hours, and a group is set up
Storagethe database has grown past the size you asked to be told about
AI spenda spending limit has been reached
Emailan email could not be sent, or one has been waiting more than three hours
Logs to Modbot Cloudsending has been failing for more than three hours

Database bigger than (GB) is the storage check's own number. 0 turns that check off. It is not the disk size on the Server screen — that one is a what-if input your browser remembers, this one is a line you want to hear about.

Who is emailed

The staff accounts you tick. An account with no email address cannot be ticked, and a disabled account is skipped.

Mail goes out through the same queue as everything else Modbot sends, so it counts against the email limit and waits its turn if the limit is reached. Alert mail can only ever use 80 of the 100 places; the last 20 are kept for reset links and invites.

How often it repeats itself

Each check has a state, so:

  • going wrong sends one email;
  • staying wrong sends nothing until the quiet time is up — 6 hours by default — and then says it again, because a problem nobody has fixed is still a problem;
  • coming back sends one email saying it is over.

The checks run every five minutes, starting two minutes after Modbot does — a Modbot that has just started has not finished a sync pass yet.

Turning a check off clears what it was saying, so turning it back on later does not open with a recovery email about a problem you never heard about.

In Modbot Cloud

Set up in Modbot Cloud, under Logs, by you once you have claimed your server, or by a Modbot Cloud administrator. Leave the address empty and it goes to the address on your Cloud account, so there is nothing to keep up to date when you change it.

It needs your Modbot to be sending its logs to Cloud, which is on by default. That is what Cloud watches: if the logs stop arriving, something is wrong with the deployment, and Cloud is the only side that can see it.

CheckFires when
Quietnothing has arrived from your Modbot for longer than the window — an hour by default
Errorsyour Modbot wrote more errors in the last hour than the number set. 0 turns it off

The same state rules apply: said once, repeated after the quiet time, and said to be over.

Silence is not proof of a problem. Turning sending off, or setting MODBOT_CLOUD_DISABLED, also makes a deployment go quiet. That is why this check is off unless somebody turns it on, and why the email says what Cloud saw rather than what it concluded.

An email Cloud could not send does not start the quiet time, so an outage at the mail provider does not swallow the one message that mattered.

Modbot is not endorsed by or affiliated with VRChat Inc. or Discord Inc. VRChat is a trademark of VRChat Inc. Discord is a trademark of Discord Inc. SteamVR is a trademark of Valve Corporation. Windows is a trademark of Microsoft Corporation. Docker is a trademark of Docker, Inc. PostgreSQL is a trademark of the PostgreSQL Community Association of Canada. Railway is a trademark of Railway Corp. Other names are trademarks of their respective owners; see Legal. Modbot and its logo are trademarks of the Modbot project. Open source under AGPL-3.0.

On this page