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
- “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;