GithubHelp home page GithubHelp logo

superhyp / alibabacloud-cloudmonitor-notification Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sykezz/alibabacloud-cloudmonitor-notification

0.0 0.0 0.0 19 KB

Send Alibaba Cloud's Cloud Monitor notifications to Telegram

License: MIT License

Shell 0.52% PHP 99.48%

alibabacloud-cloudmonitor-notification's Introduction

Alibaba Cloud - Cloud Monitor Notification

Send Alibaba Cloud's Cloud Monitor notifications to Telegram.

Host on your own server:

  • Clone
  • composer install
  • Copy .env.example to .env
  • Enter your Telegram bot API key (TG_API_KEY) and chat ID (TG_CHAT_ID) into .env file
  • Add http://your-domain.com/cloudmonitor-telegram/threshold_alarm.php into the HTTP Callback field in the threshold alarm rule.
  • Add http://your-domain.com/cloudmonitor-telegram/event_alarm.php into the URL callback field in the event alarm rule. Do note that, HTTPS is not supported in this callback URL.

Host on Alibaba Cloud Function Compute

  • Clone
  • composer install
  • Create a Function on Alibaba Cloud
    • Runtime: php7.2
    • Triggers: http
    • Memory: 128 MB
  • Configure Environment Variables in your Function Properties (use Key Value for easy editing):
    Key Value
    SIGNATURE <random string> (use a generator)
    TG_API_KEY <your Telegram Bot API key>
    TG_CHAT_ID <your Telegram Chat ID>
  • Zip and upload the code (including vendor folder) to the Function
  • Get your Function's HTTP URL from the Triggers tab
  • Go to Cloud Monitor and create a new Alert Contact:
    • Name: Telegram
    • Webhook: <your function http url>/?signature=<your random string>
  • Set your Cloud Monitor alerts to send notification to Telegram contact.

alibabacloud-cloudmonitor-notification's People

Contributors

azrulafiq avatar sykezz 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.