Skip to content

Rodrigo Urubatan – About Code

Helping ruby developers to use the best tools for each job so they can solve hard problems, with less bugs and have more free time.

Menu
  • Home
  • My last presentations
  • About
  • Privacy Policy
Menu

service_status_dashboard – a simple way to monitor your services, without using any external services

Posted on 2018-08-01 by Rodrigo Urubatan

There are a lot of server monitoring services around, but sometimes you need to keep the things simple, for a number of reasons, for example:

  • your infrastructure is too simple to pay for a more complicated service
  • You just need a “ping” to know when your http server is responding
  • you already have an “elastic load balancer” or similar handling new servers when the CPU is high or something, and you just need a notification when something went really wrong
  • you just do not have the money to pay for any other monitoring service
  • you just do not like the existing services
  • you suffer from the “NIH” syndrome (Not Invented Here)

For these reasons or any other you can think about, you have some options:

  • You can build your own service monitoring tool
  • You can use the one I started and customize for your needs

This post is to show you the start of a project, I wanted a simple dashboard to show what services were fine and what services were failing if any…

And the result is the ugly dashboard bellow:

The result is pretty simple, it shows a green square if the service is OK, and a red one if the service is failing.

Currently the dashboard has the following features:

  • email notification for service failures and recovery
  • check of service http status
  • check of http request body
  • check of json results (simple values match)

There is no admin interface yet, I’ll create one.

And the next feature to be implemented is a “service check relay” to check status of services using mmonit.

The one problem, I have a low test coverage in the project, I’m working on that also.

If you wanna check the project, and maybe you can solve your monitoring problems and improve the project.

The source is on github, just check it here: https://github.com/urubatan/service_status_dashboard

The service is running on:

  • Ruby 2.5.0
  • Rails 5.1.6
  • Sidekiq 5.1.1

So you need sidekiq to run it;

The checks are executed every 5 minutes, you can adjust that in the config/schedules.yaml file, it is using the ‘sidekiq-cron’ gem.

Right now, until the admin console, and any kind of authentication is present, you need to use the “rails console” to create your services, they will be checked automatically thou.

The next features to be implemented are (in no specific order):

  • relay check for mmonit
  • admin interface
  • authentication (required for admin interface)
  • per service check schedule
  • javascript verification of the request result
  • “basic auth” support for the service request
  • support for service checks with HTTP methods different than “GET”

besides that features, do you have any other ideas? what else should be in the bare minimum service check dashboard? please leave a comment with any ideas you might have;

Related

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent posts

  • Why Embrace Nesting in Ruby Modules?
  • An easy way to have a local “Github Copilot” for free
  • SPA without touching Javascript – The magic of Ruby on rails and Hotwire
  • I see Dead Jobs everywhere (sidekiq DeadSet)
  • Quick tips that help: rails notes

Arquives

  • May 2024
  • April 2024
  • February 2023
  • January 2023
  • December 2022
  • June 2021
  • March 2020
  • January 2020
  • July 2019
  • June 2019
  • May 2019
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • February 2018
  • January 2018
  • November 2017
  • August 2015
  • August 2014
  • July 2014
  • August 2007

Categories

  • AI
  • articles
  • cfp
  • firebase
  • gems
  • git
  • opinion
  • presentations
  • projects
  • rails6
  • ruby
  • Sem categoria
  • server-api
  • tutorials
  • Uncategorized
© 2025 Rodrigo Urubatan – About Code | Powered by Minimalist Blog WordPress Theme