Sometimes the applications just freeze and you know that something going on but not what. Something just seems to hang there. If a similar thing happens to a database you have your slow query log (if you were lucky enough to enable it), but there is no such thing for a regular web-application. You could try to analyse what’s happening with jstack, but this is a cumbersome undertaking. That’s where Now Running jumps in.
Now Running is one of the main features of the 2.10.x release line. How it works is, that whenever a call is passing first time through a producer, this producer becomes an entry point to the application. In other words every producer, which is the first to be encountered by some code execution is an entry point. A typical entry point could be a filter, something scheduled called from an executor service or an REST API Endpoint. It can also be some component deeper down in your application, if you don’t have a monitored instance at the entry.
Every Entrypoint is monitored anyway, since it is a producer, but apart from the usual interval-based monitoring, MoSKito counts all current and past executions through this endpoint. It gives you two vital pieces of information:
- What is running now through this Entrypoint?
- What was running through this Entrypoint in the past and lasted long (basically your good old slow running queries log)?
So let’s dive into this with some examples, courtesy of www.thecasuallounge.ch.
Since Now Running is a new feature it located under Everything Else navigation tab, until we decide whether it should become it own main navigation point:
The section itself consists of multiple blocks. The top block is always there and it contains all detected Entrypoints:
The whited-out places are removed due to sensitive information.
As we see each Entrypoint has two associated numbers: Current requests and Total requests. It should be pretty self-describing what those are. As we see in the above screenshot 4 requests are currently being served by the InternalRedirectFilter, which is just a regular WebFilter in the Application and happens to be the first point of contact for many users (as we see from the total request count). For every Entrypoint in the list MoSKito also shows the currently running requests and the past requests.
As we see from the above picture, there are 4 requests currently being processed, one of them being us looking at this screen (with Age 0 at the bottom). For every request we see for how long (in milliseconds) they’ve been running and when they started. The one lasts more then 6 seconds already is definitely worth looking into.
But apart from what’s happening now we can also see what has been happening:
So here we have our slow running queries log. A request that lasted more than 9 minutes? Definitely something worth looking into!
So that was the quick description of the new Now Running feature in MoSKito 2.10.x. MoSKito is available for download from it’s download page as always. Be also sure to check the Integration Guide and the Step by Step Integration if you are new to MoSKito.