Giter Site home page Giter Site logo

smokeping-notify's Introduction

smokeping-notify

Cài đặt trên CentOS 7

Yêu cầu

  • Đã cài smokeping từ trước

Cài đặt gói cpan

yum install perl-CPAN

Cài đặt các gói phụ trợ

cpan install Slack::Notify

Tạo mới file cấu hình cảnh báo và ghi log

touch /var/log/smokeping
touch /etc/smokeping/notify

Clone repo đã custom cảnh báo

git clone https://github.com/datkk06/smokeping-notify.git

Backup lại source cũ và thay thế bằng source custom đã clone về

mv /usr/share/smokeping /usr/share/smokeping_bak
cp -R smokeping-notify/ /usr/share/smokeping

Mở file cấu hình cảnh báo

vi /etc/smokeping/notify

Thêm các cấu hình cảnh báo về telegram và slack

# 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

Mở file cấu hình smokeping

vi /etc/smokeping/config

Tại đây thêm cấu hình như bên dưới

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

Khởi động lại dịch vụ

systemctl restart httpd
systemctl restart smokeping

Kiểm tra lại file log tại

cat /var/log/smokeping

smokeping-notify's People

Contributors

datkk06 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.