Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


If the website has a 502, 504 error, will be notified via telegram?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

If the website has a 502, 504 error, will be notified via telegram?

How to monitor VPS, if the website has a 502, 504 ... error, will be notified via telegram at a specific time?

Thanks

Comments

  • CabbageCabbage Member
    edited August 2023

    You could set up some sort of home automation. Node-Red, n8n and Huginn are programs I know that does this, but I have only used Node-Red so far.

    Thanked by 1tiendungdev
  • I have done a similar, but I am connecting it with SMS-API or PHPMailer not Telegram. Didn't know if Telegram has API for that. But that just an idea it's just through CURL checking http responses. Maybe by Telegram Bot scripts which I know is running on python that's possible (not sure)

  • MikeAMikeA Member, Patron Provider

    Sounds like a great use for chatgpt if you wanna run a script in a cron on your VPS to check it.
    https://chat.openai.com/share/b756cf71-0229-4f2b-9d87-b38e22816da6

    Thanked by 1tiendungdev
  • sh97sh97 Member

    Use uptime kuma and setup telegram notifications - it's the easiest way.

  • @MikeA said:
    Sounds like a great use for chatgpt if you wanna run a script in a cron on your VPS to check it.
    https://chat.openai.com/share/b756cf71-0229-4f2b-9d87-b38e22816da6

    Thanks, I'll try asking AI

  • MikeAMikeA Member, Patron Provider

    @sh97 said:
    Use uptime kuma and setup telegram notifications - it's the easiest way.

    This too, UptimeKuma is great OOS. Used it for a long time.

  • HetrixTools has Telegram integration

    https://docs.hetrixtools.com/telegram-integration/

    Thanked by 2tiendungdev RapToN
  • typicalGtaTGtypicalGtaTG Member, Host Rep

    Try statping, its really good with notifications and monitoring.

    Thanked by 1tiendungdev
  • ProtokollaProtokolla Member
    edited August 2023

    The above suggestions of uptime kuma and statping are good. I have tried both of them but decided to stick with gatus. It is also open source, but allows me to configure the status pages in yaml. It shows history much longer than uptime kuma (only 24h).

    Thanked by 1tiendungdev
  • febryanvaldofebryanvaldo Member
    edited August 2023

    Use HetrixTools. It has "Accepted HTTP Codes", the default value is 200. The value range from 100, 200, 300, 400, 500, you name it.

    Accepted HTTP Codes

    and it has Telegram, Slack, Discord, Webhook, PushOver, PushBullet etc for free.

  • HetrixTools is the best. Has telegram integration and you can set to receive alerts when your sites are down or has any error (404, 500, ...). You can see on Hetrix a lot of ways to inform you.
    Alternative you can go to Uptime Robot or Uptime Kuma, a self hosted tool to check the status of your sites and servers. Also have telegram integration and you can set it easily with docker and docker-compose.

  • Looks like hetrixtools works great, I'll try some other ways.

  • sonicsonic Veteran

    uptimerobot + telegram bot is the easiest way for you

    Thanked by 1tiendungdev
  • Why telegram tough? Why not email like a normal person?

  • MrLimeMrLime Member
    edited August 2023

    Look into Pushover app for your phone. It's served me well over the years. Things like failing backups and network monitoring alerts for example.

  • vsys_hostvsys_host Member, Patron Provider

    We have one more solution, but a little more tricky than those already described above:
    So here is one more alternative for you to try:

    To monitor errors on your website and receive instant notifications, you can integrate DataDog with a Telegram bot. To simplify the process of configuring the APIs of both Datadog and Telegram, you can consider using apps like "make" or "pipedream" which specialize in helping to connect various services and applications.

    Thanked by 1tiendungdev
  • vedranvedran Veteran
    edited August 2023
    #!/bin/bash
    TELEGRAM_BOT_TOKEN='ADD_TOKEN'
    TELEGRAM_CHAT_ID='ADD_CHAT_ID'
    URL='ADD_WEBSITE_URL'
    TITLE='WEBSITE IS DOWN!!!1'
    MESSAGE='OH NO'
    
    status=$(curl -I ${URL} 2>/dev/null | head -n 1 | cut -d$' ' -f2)
    
    if [ "$status" != '200' ]; then
        curl -X POST -H 'Content-Type: application/json' -d "{\"chat_id\": \"${TELEGRAM_CHAT_ID}\", \"text\": \"*${TITLE}*\n${MESSAGE}\", \"parse_mode\": \"MarkdownV2\"}" --silent --output /dev/null https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage
    fi
    
    Thanked by 2tiendungdev gory3563
Sign In or Register to comment.