Monitoring Blog
Release announcements, technical guides and monitoring insights from the ConSol team.
Citrus 1.2 Final
Tuesday, July 10, 2012 in Insights
It has been a while since our last final release for Citrus. Now I am proud to announce the final 1.2 release. The package ships with a huge list of new features and improvements that I would like to highlight in a few lines for you. Spring version upgrade: We did some major version upgrades in our Spring dependencies. We are now using Spring 3.1.1, Spring Integration 2.1.2 and SpringWS 2.1.0. Groovy support: We have extended our support for JVM languages like Groovy. You can use Groovy's MarkupBuilder to create XML message payloads for instance. Another nice feature set comes with Groovy's validation capabilities (e.g. XMLSlurper or SQL result set validation). JSON support: With 1.2 you are able to validate message payloads other than XML. We have implemented a JSON message validator …
Show Git Branch in Bash Prompt
Tuesday, June 19, 2012 in Insights
When working a lot with git knowing which branch you are in is an important information. Putting the branch information in your bash prompt makes this information always visible and also shows immediatly if you are in a folder managed by git. This is how it looks: 13:46:50 sven@tsui:~/projects/Thruk (master) %> All you need is a simple function in your .bashrc bash_prompt() { local BLUE="\\[\e[0;34m\\]" local RED="\\[\e[0;31m\\]" local GREEN="\\[\e[0;32m\\]" local NORMAL="\\[\e[0;0m\\]" br=$(git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \\(.*\\)/\1/') psbr="" if [ ! -z "$br" ]; then if [ "$br" = 'master' ]; then psbr="($RED$br$NORMAL) " elif [ "$br" = 'integration' ]; then psbr="($GREEN$br$NORMAL) " else psbr="($BLUE$br$NORMAL) " fi fi local UC=$NORMAL # user's color local …
Running check_by_ssh over a persistent ssh-connection
Tuesday, June 12, 2012 in Insights
Monitoring Unix clients is very easy with the check_by_ssh plugin. The only prerequisite is public-key-based access and installation of some plugins on the remote side. Then, running a check is as easy as: check_by_ssh --host 10.177.3.39 --logname nagios \ --command "lib/nagios/plugins/check_swap -w 15% -c 8%" The drawback of this method is extra load on the nagios server. With every check, a ssh process is forked which has to do a complete handshake with the remote side. With newer ssh implementations it is possible to have a persistent connection which requires only one handshake at startup. All the following ssh connects use the already established connection, which saves a lot of cpu cycles. Here are the instructions to combine check_by_ssh with such a persistent tunnel. When ssh is …
Arbitrary ssh-command for check_by_ssh
Tuesday, June 12, 2012 in Insights
The well-known plugin check_by_ssh is a wrapper around the ssh client program. Unfortunately the path to ssh is defined at compile-time and remains hard-coded in the check_by_ssh binary. Usually this is /usr/bin/ssh. If you want to use features which are not implemented in your distribution’s ssh, but in an alternative ssh binary, you have to recompile check_by_ssh. Here is a patch which makes it easy to switch between multiple ssh binaries using a command line parameter. --- nagios-plugins-1.4.15.orig/plugins/check_by_ssh.c 2010-07-27 22:47:16.000000000 +0200 +++ nagios-plugins-1.4.15/plugins/check_by_ssh.c 2012-06-12 14:02:07.000000000 +0200 @@ -177,6 +177,7 @@ {"identity", required_argument, 0, 'i'}, {"user", required_argument, 0, 'u'}, {"logname", required_argument, 0, 'l'}, + …
Recurring Nagios Downtimes with Thruk
Tuesday, June 12, 2012 in Insights
Every now and then some of our 7x24 hosts / services need a daily or weekly maintmode for regular restarts. Normally you would have to create 2 new timeperiods because you don’t want both hosts in a cluster to be restarted at the same time. This is not just way to much work, it also adds unnecessary complexity because nobody can see the maintmode unless you look into the config files. Thats where recurring downtimes will become handy and latest Thruk Version includes this new feature. With recurring downtimes everybody will see directly when there is a planned restart or maintmode and you don’t have to create a new timeperiod for every restart time window. Recurring downtimes will be listed on the hosts page and in a seperate downtimes list where they can be adjusted easily. From technical …
How to use the new OMD init-hooks
Thursday, June 07, 2012 in Insights
One of my bigger OMD installations consists of 13 sites. The visualization layer uses the Thruk interface. This alternative web ui can read data from multiple livestatus backends and display the host and service objects in one unified view. For this purpose i have one extra site called gui which only starts an apache process. I then point my browser to http://…./gui/thruk The addresses of the livestatus backends have to be written into a config file, thruk_local.cfg. Now what if my list of 13 sites would be constantly changing? What if new OMD sites would be created, others deleted on a daily basis? I would have to edit the config file every time. With the new init-hook-feature, OMD will do this automatically for me. Whenever omd starts or reloads, the site-local apache’s init-script is …
Monitoring CPU usage of a Linux system with check_logfiles
Saturday, June 02, 2012 in Insights
Keeping an eye on cpu usage of your servers is one of the basic things in system monitoring. For Nagios (and Shinken, of course) you’ll find plenty of plugins for this task. However, i was never happy with the way they work. Most of the plugins you can download work like this: read a counter - sleep - re-read the counter. This technique not only adds an extra delay to the execution time of the plugin, but it only shows the state of things within a small time frame. If you run such a plugin every 5 minutes and it sleeps 5 seconds between the two measurements, you don’t know what happens in the other 295 seconds. This is a very small sample rate. Another technique is to read the counter and compare it to the value which was saved when the plugin ran last time. The new data will then be saved …
How to install bleeding-edge Shinken in a minute with OMD
Sunday, May 20, 2012 in Insights
You probably have noticed that development of the new Nagios-compatible monitoring system Shinken progresses very fast. Every few hours there is another commit at GitHub, where Shinken’s code repository is hosted. Now if you want to try all these new features immediately, there’s a very easy method which requires a simple update-command instead of a fresh install. First of all you need an installation of the Open Monitoring Distribution OMD, the single-package monitoring ecosystem. Get the apropriate package for your Linux distro from our repository. You have to install OMD only once (…to start with this howto. Of course there are 3 or 4 updates per year for OMD too) When you are done, create a site. # omd create shishi # omd config shishi set CORE shinken Now you have a working monitoring …
Jmx4Perl 1.05 and Jolokia 1.0.3
Sunday, April 22, 2012 in Insights
Jmx4Perl and her sister project Jolokia received some spring updates. Jolokia has now support for cross-origin resource sharing (CORS), which allows Javascript clients to access Jolokia agents from everywhere, avoiding the ‘same origin policy’ in a controlled manner. The server side allows now by default all cross-domain requests, but this can be restricted with Jolokia’s security setup. The Javascript library already support CORS for most browsers out of the box, for IE8 and larger some special setup is still required. Transparent CORS client support for all browsers will be added to the Jolokia Javascript client in one of the next releases. Additionally, Jolokia adds the following new features: AMD support for jolokia.js and jolokia-simple.js Time based eviction of historical values …
Pentaho Kettle within a web application
Monday, March 26, 2012 in Insights
This post demonstrates how to include and deploy Pentaho Kettle as a regular Web application. There are some pitfalls you should be aware of. Introduction I recently had to integrate Pentaho Kettle into a Java web application. To be more specific a Kettle job using several transformations was supposed to run once a night triggered by Quartz. To my surprise I could find only rudimentary (or blatantly outdated) information concerning this task. So I had to find a solution by trying to put those bits and pieces of information together (and by studying Kettle's source code). Mind that this how-to is based on Pentaho Kettle 3.2.0. This is because the above mentioned web application has been created in the context of ConSol’s CRM / ticketing application CM6. This piece of software comes with a …