The app-based alerting service SIGNL4, enables you to send alerts from your corporate infrastructure via e-mail or webhook. Your team will then receive the notifications by push, SMS or phone call. But what if the Internet connection is no longer available and you cannot transmit the alerts to SIGNL4?
Below we describe a convenient method of alerting with SIGNL4 when your Internet connection is no longer available. The idea is simple. You use a cloud service and send heartbeats from your infrastructure to this cloud service. If the Internet connection fails, you can no longer transmit heartbeats. The cloud service detects the missing heartbeat and sends a signal to SIGNL4 to inform your team about the Internet failure.
There are certainly various cloud services that make this possible. In our case we use the free test phase of Zapier (https://zapier.com). You just need two flows (zaps) there.
Zap: Webhook Heartbeat
- The trigger waits for web requests (heartbeats) that you send to Zapier at regular intervals to say that everything works as it should. This is just a URL that you call again and again at a certain interval.
- The action sets a flag in the storage to 1, meaning that the heartbeat has been received.
Zap: Heartbeat Check
- The Trigger triggers the Zap at certain intervals, in our case once per hour.
- In the second step (Search) we read the storage (this is 1 if a heartbeat was received within the last interval and 0 otherwise).
- In this Action we set the storage to 0, which we will use in the next run of this Zap.
- This Filter now checks whether the storage in the Search step (2.) was 0, i.e. whether the last heartbeat was missing. In this case, proceed to step 5, otherwise this is the end (the heartbeat cam in as expected).
- We can only get to this action if the heartbeat is missing. In this case we send a signal via SIGNL4 webhook.
The signal in the SIGNL4 app might look as shown below:
Now you can be sure that you will be alerted by SIGNL4 (even) when your Internet connection is down.