Freely Monitoring your Servers with Google Chat App Notifications

Monitoring:

Monitoring is considered one of the most important process in today’s world of Technology. Most Datacenters have their private monitoring systems with automation tools that would trigger failover, or Disaster Recovery in case of downtime being noticed and this is extremely costly operation.

What to Monitor?

CPU Usage, Memory Consumption, I/O, Network, Disk Usage, Process etc. Server Monitoring also helps in capacity planning by understanding the server’s system resource usage.

Other services can be monitored like Web Servers, FTP, Mail Servers or anything else if it’s publicly accessible.

Using UPTimeRobot Monitoring

Uptime Robot Monitoring is a free-commercial service that has rich monitoring features where you can monitor your services/servers on 1 minute interval and get alerted by Email, SMS, Phone Apps e.g. (Telegram, Google Chat, or Skype).

The Free version

In the free version Monitoring you can add services based on ports and protocols or Servers. This might look limited to some but since it’s free of charge it can be very useful for small or startup companies with couple of servers.

– Limited up to 50 Monitors.

– No SMS.

– Check interval is 5 mins.

– Logs are not kept

The Commercial Version:

In the commercial version you pay a small fee of 4.5$ a month, an you’d get the following:

– Up to 50 Monitors.

– 20 SMS.

– Check interval is 1 mins.

– Logs are kept for 2 years.

Adding a Server to Monitor:

After you create an account on UpTimeRobot.com you can easy add a site or a service to monitor right away and the monitoring will initiate after 5 minutes then it’ll report if the service,server you added is up or down.

Click on + Add New Monitor

Next add the website, In my case i’ll add my own website and see how it works and then choose Google Chat (Since I already have the integration on).

Once ready, click on create monitor

That should add the website directly into the List of monitored services:

If you click on the Monitor, you’ll get the stat figure of how long has your website been on/off

After waiting roughly 35 mins, I can see now that my website is up and running without any problem. The monitoring probe counts by milliseconds so you’ll be able to see if there’s any interruption in the connection to your website/server.

Integration with Google Chat

Requirements:

  • Google Suit.
  • Google Admin Account
  • Create a Google Chat Room
  • Configure WebHooks

The integration between Google chat and UpTimeRobot requires Google G Suits account

I will login to my G account with admin user

Next go to Chat admin console

Login with your admin account to google admin Console and then go to this link

https://chat.google.com/u/1/

Create a room, Call it UpTimeRobot

Once Created, Click on the … dots next to Now

Now Configure WebHooks

Call this UpTimeRobotContact and save

This should create a URL for you, Something that looks like this! This

https://chat.googleapis.com/v1/spaces/AAAAcUvSsqs/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=qSlBYydgUj2mqqC8o_DIDY_RqcMaiI%3D

Adding Members (To get notifications)

On the right side Add People and Bots

Add a user to receive notifications once any server or service is down.

Once you add a user, you’ll notice that the admin user’s notification below saying he/she added a user to the Room.

Uptime Robot Configuration:

In order for this to work we’ll have to finish the work on the UpTimeRobot portal

Inside Uptime Robot, create a new alert contact in My Settings>Alert Contacts>Add new>Google Hangouts Chat using the previously created Hangouts Chat web-hook URL.

When we choose the Google Hangouts Chat, We will have to give the following:

  • Friendly name for the monitor.
  • Provide the webhook URL which was created previously.
  • You can add a custom message to identify something related to the monitoring.
  • Enable notifications for, You can choose to get notifications only when the site/service is up or down or both.

After adding this, You need to download one or two apps to get alerts to your Cell Phone:

  • Google Chat
  • UPtime Robot

What do Alerts Look like?

As soon as your system goes down, Google Chat will sends you a push notification to your phone, if you’re using UpTime Robot and you’re logged in to the account then you’ll get another identical notification at the same time indicating your system’s status if it goes down or back up.

Like this you can add up to 50 monitors including all kinds of services, ports, protocols.

The notification also comes with an interesting tone so you could easily tell if the sound is for “System Down” or “System is up” kind of state.

This has personally helped me keep my system up 24/7 and interfere whenever there’s any downtime noticed.

I hope this article helps and in case you have any question please leave a comment or get in touch with me info@moh10ly.com

References:

https://blog.uptimerobot.com/new-feature-google-hangouts-chat-notifications/

https://chat.google.com/u/1/

moh10ly

View Comments

Share
Published by
moh10ly

Recent Posts

Reset passwords for Active Directory Users

Reset and manage your Active Directory users' Passwords Active Directory is one of the most…

1 year ago

Finding Exchange Database hidden mailboxes. ​

Finding Exchange Database hidden mailboxes. Story:Maybe you have been in this situation before, trying to…

1 year ago

Setting up ADConnect and PTA (Password auth through) servers agents behind proxy

If you're using a Proxy server in your firewall or in your network and have…

1 year ago

Get Report of Active Directory Locked Accounts and Machine they logged in from

Story:I got some clients  that have reported some of their users being locked out and…

1 year ago

Checking and Providing Full and SendAs delegate access on O365 Exchange Online

Delegate Permissions This is a code that I have wrote recently to check if an…

1 year ago

Retrieving attachments from Exchange mailbox using python

Story: I got a request from a client who constantly gets CVs and have to…

2 years ago