Thruk uses the mod_fcgid apache module which makes Thruk start on the first request. The user then gets a “waiting” page till the fastcgi server has started. When using Thruk all the time, there is no reason to wait till someone makes the first request and you can just fire up the init script after apache starts.

In normal installations there is an rc script in /etc/init.d/thruk which fakes a request and makes the fastcgi server start.

 root@mo:~ #> /etc/init.d/thruk start
 Starting thruk.........(10492) OK

In OMD its even easier, latest snapshots have so called ‘init-hooks’ which are executed after the rc script. You
need to create two files in your site:

  • etc/init-hooks.d/apache-start-post
  • etc/init-hooks.d/apache-reload-post

One of them can be a symlink, because both files will have the same content:

 #!/bin/sh
 # check return code of apache start
 if [ $4 = 0 ]; then
   ./etc/init.d/thruk start
 fi

So when ever your apache starts / reloads, for example after logfile rotation, thruk will immediatly start too.

Author:Sven Nierlein
Categories:nagios, omd, thruk
Intensivkurs Jmx4Perl

Jmx4Perl und
Jolokia haben sich mittlerweile zum
de-Facto-Standard beim Nagios-Monitoring von Java entwickelt. Das
belegen etliche Blog-Postings, die Downloadzahlen und zahlreiche
Kundenprojekte, die ConSol durchgeführt hat.

Aus der Erfahrung von über einem Dutzend individueller Workshops haben
wir einen Intensivkurs destilliert, der in Bezug auf die Nagios-Anbindung von JEE-Applikationsservern keine Fragen mehr offen lässt.

In dieser Schulung lernen Administratoren, das Maximum aus Jmx4Perl
herauszuholen. Neben theoretischen Grundlagen wird vor allem viel Wert
auf praktische Übungen gelegt.

Weiterer Details zum Inhalt und eine Online-Anmeldung finden sich
unter
http://www.consol.de/allgemein/schulung-java-monitoring-mit-nagios/

Fragen zu dem Kurs beantworten wir auch gerne hier in den Kommentaren
oder im Forum.

Author:Gerhard Laußer
Categories:jmx4perl, jolokia, nagios
Thruk 1.36 Released

Version 1.36 of the Thruk monitoring gui has just been released. The changelog is quite huge this time. There is a new dashboard plugin called the ‘Panorama View’ Addon. There are a lot more reports included now. And finally there is a plugin manager included in the config tool which lets you easily manage your plugins and addons.

weiterlesen...

Author:Sven Nierlein
Tags:Nagios, omd, Shinken, Thruk
Categories:nagios, thruk
Citrus 1.2 Final

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.

weiterlesen...

Author:Christoph Deppisch
Tags:Citrus
Categories:citrus, development

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

weiterlesen...

Author:Sven Nierlein
Tags:git
Categories:development

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.

weiterlesen...

Author:Gerhard Laußer
Tags:check_by_ssh, controlmaster, Nagios, omd, Shinken, ssh
Categories:nagios, omd

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.

weiterlesen...

Author:Gerhard Laußer
Tags:check_by_ssh, controlmaster, Nagios, plugin, Shinken, ssh
Categories:nagios

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.

weiterlesen...

Author:Sven Nierlein
Tags:Nagios, omd, Thruk
Categories:nagios, omd, thruk

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.

weiterlesen...

Author:Gerhard Laußer
Tags:livestatus, Nagios, Shinken, Thruk
Categories:nagios, omd, shinken, thruk

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.

weiterlesen...

Author:Gerhard Laußer
Tags:check_logfiles, cpu, Icinga, linux, Nagios, Shinken
Categories:nagios, omd, shinken