Root-Server Tutorial

ROOT-SERVER TUTORIAL

Setup of Uptime Kuma Real-time Alerts

Learn how to set up notifications on Uptime Kuma.

Introduction

This tutorial is a follow-up of the tutorial Setup of Uptime Kuma Standalone on Ubuntu with a Reverse Proxy.

This tutorial describes how to set up Uptime Kuma to send real-time alerts to various services.
Currently, the following services are supported by this tutorial:

  • Discord
  • Emil
  • Telegram
  • Any other Webhook

For people starting out with Uptime Kuma, I recommend using Telegram, as I think it's the easiest to set up.

Just jump to the section you want to use by clicking on the matching menu entry on the left.

Discord

  1. Create a Discord Webhook:
    1. Open your Discord Server Settings.
    2. Click on "Integrations".
    3. Click on "WebHooks".
    4. Click on "Create Webhook".
    5. Enter a name for the Webhook and choose the channel you want to send the messages to.
    6. Click on "Copy Webhook URL".
  2. Open Uptime Kuma.
  3. Click on your profile picture in the top right corner.
  4. Click on "Settings".
  5. Click on the menu entry "Notifications".
  6. Click on "Setup Notification".
  7. Under "Notification Type", select "Discord".
  8. Define a name for the notification that will be displayed in Uptime Kuma.
  9. Paste the Webhook URL you copied earlier into the "Discord Webhook URL" field.
  10. Choose a Bot display name (this is the name that will be displayed in Discord).
  11. Choose a custom prefix. Here you can mention roles or persons you would like to ping.
  12. Choose "Default Enabled" if you want the notification to be enabled by default when creating a new monitor.
  13. If you turn on "Apply on all existing monitors", this setting will be applied to all existing monitors.
  14. Click on "Test".
  15. If you see a message in your Discord Server, everything is set up correctly and you can now click on "Save".

Email

  1. Open Uptime Kuma.
  2. Click on your profile picture in the top right corner.
  3. Click on "Settings".
  4. Click on the menu entry "Notifications".
  5. Click on "Setup Notification".
  6. Under "Notification Type", select "Email (SMTP)".
  7. Give the notification a name that will be displayed in Uptime Kuma.
  8. Enter the credentials of your SMTP server.
  9. Set "From Email" to the name you want to have displayed as the sender (in the format "SENDERNAME <email@example.com>").
  10. In the "To Email" field, enter the email address(es) you want to send the emails to. If you have multiple email addresses, separate them with a comma.
  11. If you want to send the message to people via CC or BCC, you can enter the address(es) in the respective fields.
  12. DKIM is optional. If you want to set it up, please follow the instructions on the Nodemailer DKIM page at https://nodemailer.com/dkim/.
  13. Set a subject for the email. Available placeholders are listed below the input field.
  14. Choose "Default Enabled" if you want the notification to be enabled by default when creating a new monitor.
  15. If you turn on "Apply on all existing monitors", the notification will be applied to all existing monitors.
  16. Click on "Test".
  17. If you receive an email, everything is set up correctly and you can now click on "Save".

Telegram

  1. Open Telegram.
  2. Search for the @BotFather" bot or go to https://t.me/BotFather.
  3. Send the command "/newbot".
  4. Enter a name for the bot.
  5. Enter a username for the bot (it must end with "bot").
  6. Copy the API token that is displayed.
  7. Open Uptime Kuma.
  8. Click on your profile picture in the top right corner.
  9. Click on "Settings".
  10. Click on the menu entry "Notifications".
  11. Click on "Setup Notification".
  12. Under "Notification Type", select "Telegram".
  13. Give the notification a name that will be displayed in Uptime Kuma.
  14. Paste the API token you copied earlier into the "Bot Token" field.
  15. Click the first link in the message @BotFather sent you.
  16. Write any message to the bot.
  17. Go back to Uptime Kuma and click the "Auto Get" button at the end of the "Chat ID" field.
  18. Check "Send Silently" if you don't want to receive a notification on your phone.
  19. Choose "Protect Forwarding/Saving" if you want to protect the messages from being forwarded or saved.
  20. Choose "Default Enabled" if you want the notification to be enabled by default when creating a new monitor.
  21. If you turn on "Apply on all existing monitors", the notification will be applied to all existing monitors.
  22. Click on "Test".
  23. If you receive a message from the bot, everything is set up correctly and you can now click on "Save".

Any other Webhook

  1. Open Uptime Kuma
  2. Click on your profile picture in the top right corner.
  3. Click on "Settings".
  4. Click on the menu entry "Notifications".
  5. Click on "Setup Notification".
  6. Under "Notification Type", select "Webhook".
  7. Give the notification a name that will be displayed in Uptime Kuma.
  8. In the "Post URL" field, enter the URL of the Webhook.
  9. Choose "Default Enabled" if you want the notification to be enabled by default when creating a new monitor.
  10. If you turn on "Apply on all existing monitors" the notification will be applied to all existing monitors.
  11. Click on "Test".
  12. Check if the Webhook was triggered correctly and if so, click on "Save".

Conclusion

Uptime Kuma now sends real-time notifications to the messaging service of your choice, keeping you better informed and alerting you to any issues at an early stage.

License

MIT

Copyright (c) 2023 Konstantin Protzen

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Contributor's Certificate of Origin

By making a contribution to this project, I certify that:

  1. The contribution was created in whole or in part by me and I have the right to submit it under the license indicated in the file; or

  2. The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same license (unless I am permitted to submit under a different license), as indicated in the file; or

  3. The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

  4. I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the license(s) involved.

Published 29/04/2023 by Konstantin Protzen

Submit your tutorial

Get 60€ netcup vouchers for every published tutorial.