Uptime Monitoring using NightmareJs

Written by maxknee | Published 2017/03/30
Tech Story Tags: javascript | nodejs | open-source | uptime | monitoring

TLDRvia the TL;DR App

Ran into a problem at work looking into how to get actual uptime monitoring of our app, which, just pinging the url isn’t just enough. Sure that indicates we’re ‘up’, but what if a user can’t login? What happens when a user can log in but isn’t getting useful data back from our backend services? That was the challenge.

Sure, we could turn to a SaaS to do it, or to rely on another team to do this, but what’s the fun in that? So looked into using open source tools we found watchmen which was extendable, could be run on any cloud provider, and had a plugin ecosystem.

Since we needed some sort of browser automation, with a little tooling around, we were able to find a small, easy to use library that almost anyone, not even a developer could write (plus a browser extension which records clicks and translates to javascript) which lowers the barrier if we need deeper clicks to verify our site uptime. Nightmare (don’t mind the name) fit the bill for exactly what we needed.

A teammate and I rolled it all into one and we realized the potential for helping out other teams, not only within Comcast but out in the world, they could potentially use this as well, so we made the decision to open source our code.

So here it is, a plugin for watchmen that uses the Nightmare browser automation library that lets you do synthetic monitoring to verify that your site or app is up to your standards.

I could get more into the boring details of all the infrastructure and why and how of its deployed but I’ll save that for another story.

Comcast/watchmen-ping-nightmare_watchmen-ping-nightmare - A plugin for watchmen that uses nightmare and an electron browser to monitor websites_github.com

You can download the package from npmjs here:

watchmen-ping-nightmare_Watchmen nightmarejs ping integration_www.npmjs.com

Hacker Noon is how hackers start their afternoons. We’re a part of the @AMIfamily. We are now accepting submissions and happy to discuss advertising & sponsorship opportunities.

To learn more, read our about page, like/message us on Facebook, or simply, tweet/DM @HackerNoon.

If you enjoyed this story, we recommend reading our latest tech stories and trending tech stories. Until next time, don’t take the realities of the world for granted!


Published by HackerNoon on 2017/03/30