From time to time we are asked by the users of MoSKito, how to do this or that, and how to implement a specific use-case with MoSKito. This is why we started a recipes section in our documentation and now also on the blog. A recipe will describe how to achieve a specific goal.
So the original question which led to this recipe: “Lets say I have a process, some kind of job, which is running every x seconds, and I want to monitor the number of successful and unsuccessful executions, with least possible effort”. And here how it goes.
We programmers never make mistakes. Or so we think and say. However, from time to time errors manage to sneak to production systems and no one seems to know how. Well MoSKito won’t change this, but it can help you hunting errors. And here is how.
Applications grow. At least successful applications. At some point your growing application will require a loadbalancer. It may be for scaling or availability purpose or something else. The day your application runs behind the loadbalancer first time will make you proud. And it will make you ask, how can I control what the loadbalancer thinks of my application availability? This is how.
wishes MoSKito to all its users and monitored systems.
Today MoSKito 2.7.3 is released, and it contains the hottest feature since long time. But decide for yourself.
The feature request goes back some years to Dec 02, 2010 to my time at Parship, as Malte once asked, if it would be possible to know where a call to a method actually came from. It was on the list since then, but time was hard to find.
So what are tracers anyway? Tracers have 3 purposes or aspects:
- Tracers allow you to find out which part of your code has been calling some methods in a class of your application you are interested in. They achieve it by guarding the class in question (works with most monitoring points) and triggering and saving a stack trace once something passes by. This is useful if you see strange behavior of some method/class in the MoSKito monitoring, but don’t know who is actually using this class.
- After the execution has passed the tracer, the tracer start to record everything that happens afterwards. This means that a TracedCall (part of MoSKito Journey) is created on the fly and recorded. Every call on the monitored class will be noted, along with parameters and return values.
- To round this up, tracer will gather some amount of traces (code passing by). Depending on how you configured MoSKito, the tracers could collect only calls with largest duration or simply oldest or newest calls. This way you can run a tracer over a long period of time, collect all slow calls and investigate what slows them down.
About 10 years ago log4j was the logging framework for java. Years passed and many logging frameworks emerged. For many people, including myself, logback is the new log4j (and that is not only because of Ceki).
Unfortunately it is not possible to run logback as slf4j implementation OOTB in JBoss like in Tomcat. The following 5 steps explain you how to get it running.
The first MoSKito Hackathon this year took place in Kiev on June 17th. This is the report.
today I am going to speak about a concrete example of the MoSKito Control capabilities. Today we will build up a monitoring system, but not for WebApps as in previous posts, but for just plain java processes, that we are going to call daemons. Daemon, in my understanding, is just a plain old java bean/thread running in background in a separate JVM and doing some work. To make the post easier to write I created a small project on github that serves me as example:
We ‘invented’ (at least we say we invented it, until someone else claims the authorship), that kind of locking, where you lock not an object itself, but what the object means in the real world (or at least in your domain). It was long part of the ano-utils project. However ano-utils is a bit bloated, so we refactored it into a small separate project, without any further dependencies to external libs.
I will not repost the explanations why it is needed and what it does, instead just a link to the github page, that explains everything: https://github.com/anotheria/idbasedlock
In previous steps, we spoke about general integration of MoSKito and WebUI and adding custom counters. Today, we are going to dive deeper and build own stats object.