Telegram Notifications

This post will provide instructions on how to get NodePing notifications via Telegram using NodePing Webhooks and Telegram Bots.  Webhooks are available in our Business and Provider plans.

The Telegram Bot system is very useful for integrating with Telegram. Nodeping webhooks work seamlessly with the Telegram Bot to send ‘down’ and ‘up’ notifications. It’s a great alternative to SMS that is also cross-platform.

First, you will need to set up a Telegram account for yourself if you haven’t already. This can be done by getting the app on your mobile device or computer (there are Windows/macOS/Linux clients, as well as unofficially supported for FreeBSD). A working phone number will be required to set up an account.

Next, you need to create your own Telegram Bot.  To do this, you’ll have to to chat with Telegram’s own BotFather (a bot that creates other bots – the end is nigh!) You can find it by typing “@BotFather” into the user search bar in Telegram. Once you have started a chat with it, you will be prompted with a message from the BotFather.

Create your own bot by simply typing “/newbot” and following the instructions that are given. Here is a screenshot of what setting up a new bot setup looks like:

That long token is important.

Now that you have your new Telegram Bot and token, you’ll need to get the ChatID for the user or channel you want to send notifications to. This can be done by starting a chat with your new bot inside Telegram. You would start the chat like you did with BotFather, by typing in @nameofyourbot followed by sending “/start” to the bot. With that done, you can get the ChatID by visting the URL that shows your bot’s updates.  That URL will look like:

https://api.telegram.org/bot<your-secret-bot-token>/getUpdates

Plop that in your browser and you’ll get back some text – JSON formatted text.

The reply is the updates for your Telegram bot, which should only include the chat your telegram user started with the bot a few seconds ago. Look through the JSON response for the ChatID. It will be a random looking number thing.

Now that you have the ChatID, you’ll need to configure a new Webhook in NodePing. Log in and go to the Contacts tab. Add a new contact and give it a name – like “Telegram Bot”. Select the “Webhook” notification type and change the action to “POST”. Enter the following value in the URL field (replacing <your-secret-bot-token> with… you know, your bot token):

https://api.telegram.org/bot<your-secret-bot-token>/sendMessage

Next, in the Headers section add a new key called “Content-Type” and the value of “application/json”. It should look like this:

Then click on the the Body section.  In the text area, you need to add the following JSON.

{“chat_id”:<your-ChatID>,”text”:”NodePing: – {label}: {type} is {event}”}

Then save your newly minted webhook.  It’s ready to be added to the notification section of your checks.

Now you can receive NodePing notifications via Telegram!

Your alerts will look something like this.

Telegram bots have a lot more functionality that you can read about.  NodePing webhooks can also do a lot more, like templating and conditional statements, which you can read about.

If you need help getting things working right, please let us know at support@nodeping.com.  If you don’t yet have a NodePing account, please sign up for our free 15-day trial.

Notification Escalations on NodePing

Most systems run smoothly most of the time.  Servers keep running.  Web sites serve pages and deliver data from backend databases.  DNS servers respond to queries with hardly any delay at all.  Email flows smoothly.

Emergency_light_with_grillIt’s that tiny percent of the time that it doesn’t work that way that causes the heartburn.  A server that has been running just fine for months suddenly hiccups.  But even when that happens, it’s usually a hiccup.  The person who is the first line of responsibility for that service needs to know right away.  They jump on it, clear the problem, and things go back to humming like normal.  You need fast and reliable monitoring to help keep these interruptions to service short.  A lot of times, the service is back to normal before most people realize there was an issue.  These incidents likely go in a report, but the rest of the team doesn’t need to get involved.  Its dealt with, duly noted, and life goes on.

Then there are the times that something goes really wrong.  The first line is working on it, but the server isn’t going to be back up in a minute or two.  Or the first line person is not available.  Maybe he’s in accounting trying to sort out his paperwork for credit card expenses for last month.  Someone else needs to know that things are down.

Sometimes these situations turn into real disasters.  The website is down.  Upper management is going to be calling, wondering who’s spilling revenue out on the server room floor.  The manager getting that call wants to know about it before the phone rings with that call.

Most monitoring systems use escalating notifications to handle these situations.  If a system is down, the first line person should be notified immediately.  If it’s down for a few minutes, the people who back him up need to be brought in.  If it’s down longer than that, systems management will want to get a heads up.

NodePing uses the notification delay feature to provide notification escalations.  A delay can be set on each notification contact for each check.  The NodePing notification delay feature notes that a check set with a delayed notification has gone down.  After the delay interval has been reached, if the check is still “down” we send the notification to that contact.

Set up the first line systems with no delay, so they’ll get notified when the system goes down right away.  If the service hasn’t recovered in a few minutes, send a notification to the systems group using a contact group.  Then, if the service hasn’t recovered in 10 minutes (or whatever the tolerance for the service being down is for this service in your organization), notify the systems management.

The notification delay feature can be used for other things besides notifications.  Sometimes services have a higher tolerance for transient interruptions.  You can use the delay to mean “if this service is down shorter than 3 minutes, I don’t need to be notified.”  This is useful, for example, for services in remote locations where Internet connectivity can have brief interruptions.  But our most common request for using the delays are for notification escalations.

 

Notification Dependencies

Oh no! A power supply failure has taken your website server offline and here comes 120 HTTP ‘down’ notifications from NodePing. When a major outage hits, the last thing you need is an alert flood for all the checks you already know are bound to fail.

When a check depends on other services or networks, you don’t need more notifications that it’s failing when you already know the service that it depends on is failing. NodePing recently released a new feature called ‘Notification Dependency’ to help mitigate that unhelpful alert flood.

Set a ‘Notification Dependency’ on your checks when you want to suppress notifications for checks that depend on another check for availability. Web sites on the same web server can all be set to have their HTTP checks dependent on the server PING check. Or, you can set server PING checks to be dependent on the network router PORT check. If the dependent check is failing, no notifications will be sent for the check. The checks will still fail, only alerts won’t be sent for those failures.

Choose your dependent check from the ‘Dependency’ dropdown in the ‘Notifications’ section of the check edit modal and then ‘Save’ your changes for that check.

Notification dependencies are another way to help you receive only actionable alerts for your uptime monitoring and are available to all NodePing customers.

If you aren’t using NodePing server monitoring yet, sign up for your free, 15-day trial today.

Delayed Notifications

NodePing now offers delayed notifications for your uptime monitoring. This is a powerful new feature that will help make your notifications actionable. There are two primary use cases for delayed notifications: flapping services and escalating notifications.

Flapping Services
Not all services or networks are rock solid. Sometimes three or even two nines is “good enough”. Some locations have inherently lower expectations for availability or are just prone to frequent, short-lived outages. When a check often fails but recovers by itself quickly (flaps), it’s difficult to get actionable notifications.

Adjusting the check sensitivity setting down is useful to give your check more time to recover but if unassisted recovery takes longer than a minute the check will still likely fail. Use delayed notifications for flapping checks to receive alerts only when services are ‘really’ down. You can configure NodePing to send a alerts if your check remains down after say 5 minutes. Set the delay (from 1 minute to 1 hour) to your tolerance and receive only alerts when human intervention is required.

Escalating Notifications
Not everyone needs to know about every outage right away. If the sysadmin on call can get the site back up within a few minutes, there’s no action required by senior staff or for the help desk to be informed. If an outage lasts longer, however, you may need to let your boss know things are still offline or give a heads up to the help desk that there are issues on the website and to expect some calls. Use delayed notifications to set escalating alerts to others if an outage continues.

You can even escalate alerts to yourself. I have several checks set to email me immediately and then send me an SMS if they’re still failing after 5 minutes and a voice call if the outage lasts longer than 10 minutes.

Setting Notification Delays
When editing a check, you’ll see the contact method drop down in the ‘Notifications’ section of each check. Choose a contact method and the ‘Delay’ and ‘Schedule’ dropdowns will also appear. You can set different delays on the same contact method by adding additional lines with the same contact method.

Actionable Alerts
Delayed notifications can be useful to make all your alerts more actionable. If your contacts are ignoring NodePing notifications, they’ll succumb to alert fatigue and eventually ignore a truly important notification.

If you need any help tuning your checks to avoid flapping or adjusting your notifications to make them more actionable, please reach out to us at support@nodeping.com. We really are happy to help.

If you aren’t using NodePing for uptime monitoring yet, please sign up for our 15-day, free trial and let us help you increase your uptime.

Site update and feature releases Oct 2016

We’ve rolled out some UI and feature updates for NodePing today. We hope you find them helpful. I’ll summarize the changes here. Look here for future posts, which will go into more details for each.

Delayed Notifications:
You can now set a delay on ‘down’ alerts. This will help make your notifications more actionable for frequently flapping services. This new feature can also be used to escalate alerts or notify support/management if services remain offline. This feature has been available for a while in our API, but hasn’t been in our documentation, and has now been added to our UI as well. See the ‘Delay’ drop down in the Notification section of your check.

Check Cloning:
You can now clone an existing check, with all its settings, in our UI to create a new check. This will help reduce “clickty-clickty” syndrome when setting up a lot of checks with similar settings. Click on the label of the check you want to clone to display the details to reveal the ‘Clone Check’ link on the far right.

Notification Dependencies:
When an edge router or server fails, it’s assumed that all the services that depend on them will also fail. It’s not helpful to receive hundreds of alerts for dependent services. You can now set another check as a notification dependency on each check. If the dependent check is already failing, notifications will be suppressed. Use this to avoid alert floods when bottleneck services fail. You can find the ‘Dependency’ drop down in the Notification section of each check.

Disable All Notifications:
There is now a link in the Contacts tab to “Disable notifications”. Use this to suppress all alerts until you re-enable them using the same link. It’s another way to help avoid the distraction of alert floods during big outages.

Disable Checks:
Now you can disable multiple checks with one click. You’ll find the “Disable All Checks” link in the Account Settings – General Settings tab. You can also apply filters based on label, target, or check type to, for example, disable all PING checks or all checks pointing to “example.com”. Use this to disable checks during planned outages/maintenance or to quiet down your logs when troubleshooting.

All the above new features, except check cloning, are also available via our API. If you have any questions about these new features, reach out to support@nodeping.com; we’re happy to help.

Slack notifications

By popular request, we’ve rolled out support for notifications via Slack.

Setting up your NodePing account to send notifications to Slack is easy.  Just set up an incoming webhook in your Slack account and put the webhook URL into your ‘Slack’ notification contact in NodePing.  Then you can assign that contact to your checks to receive ‘down’ and ‘up’ messages on your configured Slack channel.

Notifications through Slack are available on ‘Business’ and ‘Provider’ plans.

Let us know what notification types or features you’d like to see next.

NodePing mobile push notifications to wake you up!

We’re pleased to announce another new notification type for NodePing server monitoring. You can now receive persistent push notifications through Pushover on your iOS or Android device.

Once configured, each ‘down’ event for your check will push an ’emergency’ notification to your device and automatically re-alert every 30 seconds until it is acknowledged, up to 5 minutes.  Try sleeping through that!

Pushover notifications are faster and more reliable than SMS and are currently the only NodePing notification type that will persistently re-alert you when a check fails. Please consider switching your SMS alerts to Pushover alerts. It will also help us keep NodePing prices down as Pushover alerts are significantly cheaper than international SMS.

Once installed, simply add your Pushover ‘user key’ as a ‘Pushover’ notification type in your contact record and select that key when creating or editing a NodePing check.

For those who may be interested in viewing your check status in a native iOS app, one of our customers has created HostCheck using our API.

Let us know in the comments what NodePing feature you’ve been itching to see.