Node Red: Ping unreachable with Telegram Notification

This setup pings a given IP at set intervals and sends a telegram notification only if there is no response.

ping

Ping –> Switch –>function –>Telegram Sender

Ping: Enter the IP of the server you need to monitor and set the interval time between pings, I set mine to 1800 which is 30 minutes.

Switch: contains : false “string”

function 1:
ping2

Telegram Sender: Bot: “select your bot from drop down”

It is supposedly that you already have your Telegram bot and chatId, if not there are many tutorials on how to get them and install Telegram for Node Red.