Nội dung
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
Next, in the Email tab, select Sender settings and enter the corresponding:
- Email Sender: Mail Account
- SMTP Password: SMTP password of the mail account
- SMTP Server: Enter SMTP Server information
- 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.
Next, you need to set up a mail recipient account (Add recipient). This is the account that receives the warning information.
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.
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
Then you select Telegram and enter the following:
- ID: ID of BOT Telegram
- TOKEN: Telegram Token chain when creating BOT
When finished, click Save to apply the changes.
And you will receive a successful setup notification from aaPanel with Telegram.
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'
btpip uninstall telegram btpip install python-telegram-bot bt reload
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
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.
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.
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.
If you need assistance, you can contact support in the ways below:
- Hotline 247: 028 888 24768 (Ext 0)
- Ticket/Email: You use the email to register for the service and send it directly to: support@azdigi.com .