- Đã cài smokeping từ trước
yum install perl-CPAN
cpan install Slack::Notify
touch /var/log/smokeping
touch /etc/smokeping/notify
git clone https://github.com/datkk06/smokeping-notify.git
mv /usr/share/smokeping /usr/share/smokeping_bak
cp -R smokeping-notify/ /usr/share/smokeping
vi /etc/smokeping/notify
# Telegram token and chat_id
telegram_token = token-telegram
telegram_chat_id = chat-id-telegram
# Slack hook URL
slack_hook_url = https://hooks.slack.com/services/example
vi /etc/smokeping/config
to = [email protected]
Lưu ý rằng: Dù chỉ dùng cảnh báo qua telegram và slack nhưng vẫn phải thêm cấu hình trên
systemctl restart httpd
systemctl restart smokeping
cat /var/log/smokeping