Home WebServer PanelaaPanel Setting up notifications on aaPanel

Setting up notifications on aaPanel

by Thạch Phạm
Published: Last Updated on
A+A-
Reset

In this article, AZDIGI will guide you through setting up notifications on aaPanel.

1. Set up email notifications

To set up email notifications on aaPanel, you first need to have an SMTP Mail account to configure sending notifications (you can use Gmail, ZohoMail, Mail Host…)

After you have prepared your SMTP Mail account, log in to aaPanel and select Settings => Notification => Set

Setting up notifications on aaPanel

Next, in the Email tab, select Sender settings and enter the corresponding:

  1. Email Sender: Mail Account
  2. SMTP Password: SMTP password of the mail account
  3. SMTP Server: Enter SMTP Server information
  4. SMTP Port: Enter the port of SMTP

Then click Save to save the changes.

Note: SMTP information will be provided when you use the provider’s email service.

anh 49

Next, you need to set up a mail recipient account (Add recipient). This is the account that receives the warning information.

anh 51

When the setup is complete, you will receive an email with the results you just set up. Thus, setting up notifications with Email on aaPanel has been completed.

anh 50

2. Set up notifications with Telegram

In addition to Email, Telegram chat application is an extremely fast messaging application. Therefore, users often use Telegram to receive notifications such as orders, and in this article, I will use the advantages of Telegram to receive important notifications about cron jobs.

To set up, you need to prepare a BOT and BOT ID. If you do not know how to create a Telegram BOT, see the instructions below:

To set it up, go to Settings => Set

anh 48

Then you select Telegram and enter the following:

  1. ID: ID of BOT Telegram
  2. TOKEN: Telegram Token chain when creating BOT

When finished, click Save to apply the changes.

anh 52

And you will receive a successful setup notification from aaPanel with Telegram.

anh 53

Note: If you get the following error when entering your Telegram ID and Token. Let’s reinstall the telegram module with the following command:

Traceback (most recent call last):
File "class/panelBackup.py", line 865, in send_notification
_res = panel_telegram_bot.panel_telegram_bot().send_by_tg_bot(msg['tg'])
File "class/panel_telegram_bot.py", line 66, in send_by_tg_bot
bot = telegram.Bot(conf['bot_token'])
AttributeError: module 'telegram' has no attribute 'Bot'
AZDIGI Tutorial
btpip uninstall telegram
btpip install python-telegram-bot
bt reload
    
CleanShot 2022 05 04 at 22.02.21

3. Configure Login Alerts

To set up an alert when someone logs into your aaPanel, select Settings => Login panel alarm => Alarm settings => Enable Send to mailbox

anh 54

Now you try to use another device to log in to aaPanel, you will immediately receive a login warning sent to the mail. This helps you prevent untrusted logins, thereby making your server more secure.

anh 55

4. Configure warning cronjob not completed warning

When using aaPanel, there are cronjobs you set up for a task. However these cronjobs do not always work 100% correctly. There will be times when the cron doesn’t run properly or executes a task that fails.

Let’s say you set up data backup to the cloud. And this backup job fails and you don’t even know it. This carries many risks to your data.

Take advantage of Telegram. I will guide you to set up notifications to Telegram as follows:

You have access to Cron on aaPanel.

anh 56

Here you choose the cron job you want to receive notifications. In this article, I will choose cron backup Database to Google Drive. And there will be 2 items for you to choose, including:

Backup reminder

  • Don’t notify
  • Notify on failure

Notification

  • All: Notifications about all the channels you set up
  • Telegram: Only receive notifications about Telegram
  • Email: Only receive email notifications

Then you select Save changes to apply the changes. And now you can rest assured with these cronjobs. When any cron fails, you will receive a notification about the channel you set up.

CleanShot 2022 05 04 at 22.21.12

If you need assistance, you can contact support in the ways below:

Đánh giá

Tham gia nhóm hỗ trợ Server - Hosting

Tham gia nhóm Hỗ trợ Server - Hosting & WordPress để cùng nhau hỏi đáp và hỗ trợ các vấn đề về WordPress, tối ưu máy chủ/server.

Tham gia ngay

Bài viết cùng chuyên mục

AZDIGI – Không chỉ là đơn vị hàng đầu trong lĩnh vực Web Hosting và Máy chủ, chúng tôi mong muốn mang lại những kiến thức bổ ích nhất và luôn cập nhật thường xuyên cho cộng đồng người đam mê thiết kế website, công nghệ,…

Vui lòng không sao chép nội dung nếu chưa xin phép. Designed and Developed by PenciDesign