Creating health check dashboard using Warden

Creating health check dashboard using Warden

Hello! Today’s post for Get Noticed competition will be about creating a dynamic dashboard for health checks. The goal of this is to have one place when you can check if every system/environment you maintain actually works. To do this I’m gonna use Warden, which is a library created especially for this task, by the last year winner of Get Noticed competition, Piotr Gankiewicz. Warden support a lot of different types of checks, can work in real-time and even send notifications if something is wrong. For the first version though, I’ll create a simple website with web checks only, something to make quick glance of an eye on, to be assured everything is ok.

Let’s start with settings. Checks can be dynamically added/deleted by the user, so I need to have a collection of them:

And dynamic settings view created using Vue.js:

Which creates this screen:

Ok, we know what to check, now the question is how to do it? This is the job of WardenService:

WardenService task is to create WardenConfiguration object from the list of settings and after that run it once and gather results. The Warden itself is not prepared in my opinion to do such a thing – it is more inclined to run continuously, that’s why I need to do some hacks – like passing the list of future results.

When WardenService is created, we need a controller which is gonna use it:

Finally, we need actual plugin view returned from Content method:

Which produces this view:

With that, we finally have a new plugin for TeamScreen. Full source code is available on GitHub. Thanks for reading and see you next time!


One thought on “Creating health check dashboard using Warden

  1. Pingback:

Leave a Reply

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