General

Is Thruk an Abbreviation? What does Thruk mean?

Thruk is just a random word and has no meaning. Pronounce it like Truck.

Where is the statusmap?

The statusmap got replaced by a own variant which is more scalable in large environments. Its shipped as Thruk addon, but enabled by default. See the plugins page for details and screenshots.

Authorization/Authentication is not working

Authentication is done by the webserver, so authentication is only available with the fastcgi version.

All dates and times are displayed with the wrong timezone

Try to set the use_timezone configuration option in your thruk_local.conf

Usage

How do i select hosts/services on the status page?

Just click on the empty table row when the row is highlighted. This only works if you do not click on a link.

Where can i see the full command line for a host or servicecheck?

You have to enable the option set show_full_commandline. It’s disabled for security reasons by default. So be careful to not display any passwords though the webinterface.

Customization

How to change the side menu

The main left menu is highly editable through menu_local.conf. It is recommended apply changes only to your menu_local.conf in order to avoid conflicts on updating Thruk.

Open your menu_local.conf (create one if it does not exists) with your preferred text editor and check the config.

Adding new Section

You can add new sections with:

add_section('name' => 'General');

To add a new link use the following syntax:

add_link('name' => 'Home', 'href' => '/thruk/main.html');
Available parameters
  • name: This is how the link is called in the web front end.

  • href: This is the destination link optional you can add.

  • target: If Link shall open in a new window.

  • icon: Used for themes which support icons.

Then the config looks like this:

add_link('name' => 'Nagios, 'href' => '/nagios', 'target' => '_new');

add_link always adds the new link to the last section. Use insert_item to add a link to any section.

Including original side navigation

You can include the main menu config with the perl do statement. Ex.: If you just want to add a new link to your config menu, your menu_local.conf could look like this:

do $ENV{'OMD_ROOT'}.'/share/thruk/menu.conf';
add_link('name' => 'Wato', 'href' => '/'.$ENV{'OMD_SITE'}.'/check_mk/wato.py?filename=wato.mk');

This example just puts the Wato link from check_mks Multisite in your config section. Replace the ENV part with a proper path if you do not use OMD.

Inserting item in existing Section

Adding Items to existing sections can also be achieved by insert_item:

do $ENV{'OMD_ROOT'}.'/share/thruk/menu.conf';
insert_item('General', { 'href' => 'http://your-company.com', 'name' => 'Company' });

Removing item in existing Section

Existing Items can be removed with the remove_item function:

do $ENV{'OMD_ROOT'}.'/share/thruk/menu.conf';
remove_item('Reports', 'Availability');

Make item available for some groups only

Just wrap your changes in a has_group.

if(has_group($c, 'Admins')) {
  add_section('name' => 'Admins Only');
  add_link('name' => 'Admin Link', 'href' => '.../only_for_admins.html');
}

Make item available for some roles only

Just wrap your changes in a has_role.

if(has_role($c, 'authorized_for_configuration_information')) {
  add_section('name' => 'Some Roles Only');
  add_link('name' => 'Admin Link', 'href' => '.../only_for_some_roles.html');
}

How can i integrate Nagvis Maps

Integrating Nagivs is currently only possible when frames are enabled. So first step is editing the thruk_local.conf and set

 use_frames = 1

Integration is easy. Just copy and edit your menu_local.conf. For Nagvis 1.4 add something like:

 add_section('name' => 'Nagvis');
 add_link('name' => "Nagvis",        'href' => '/nagvis/frontend/nagvis-js/index.php');
 add_sub_link('name' => "demo",      'href' => '/nagvis/index.php?Map=demo');
 add_sub_link('name' => "demo-map2", 'href' => '/nagvis/index.php?Map=demo-map2');

For Nagvis 1.5:

add_section('name' => 'Nagvis');
add_link('name' => "Nagvis",         'href' => '/nagvis/frontend/nagvis-js/index.php');
add_sub_link('name' => "demo",       'href' => '/nagvis/frontend/nagvis-js/index.php?mod=Map&act=view&show=demo');
add_sub_link('name' => "demo-map2",  'href' => '/nagvis/frontend/nagvis-js/index.php?mod=Map&act=view&show=demo-map2');

Thruk has to be restarted.

How can i add more themes?

Themes are located under themes. Just copy and modify the one you like. See the themes page for details.

How can i disable themes?

Themes can be disabled by removing the symlink from your themes/themes-enabled directory. See the themes page for details.

How can i customize reports?

Customizing reports is coverd in the official documenation.

Why are the PNP graphs missing in my reports?

First you need a working PNP installation. Then check the official documenation.

If nothing helps, add some debug output to the script which is responsible for the pnp export (experienced users only).

Add these lines to plugins/plugins-available/reports2/script/pnp_export.sh.

exec >/tmp/pnp.log 2>&1
set -x

Then regenerate a report and investigate that new logfile.

Installation

Is it possible to operate Thruk in a cluster?

Yes, just put a load balancer before 2 (or more) Thruk installations and make sure the var_path directory is shared between all instances ( by NFS, DRBD or similar ). There is usually not much traffic in this folder.

How can i enable debug mode?

Thruk Server

For a quick test without authorization, you can start the thruk server with ./script/thruk_server.pl -d. Make sure your log4perl.conf has DEBUG theshold configured. You can also move your log4perl.conf away, so all debug output will be sent to the terminal.

FastCGI Server

This is a bit more complicate. First you have to enable debuging for your thruk application. Add -Debug to the use Catalyst in your lib/Thruk.pm. The part should look like this:

  use Catalyst qw/
                -Debug
                Unicode::Encoding
                Authentication
                Authorization::ThrukRoles
                CustomErrorMessage
                ConfigLoader
                StackTrace
                Static::Simple
                Redirect
                Compress::Gzip
                /;
  our $VERSION = '0.60';

Then make sure you have a log4perl.conf with DEBUG threshold configured. Finally restart your fastcgi server.

Errors

Backend not available

The socat solution for using livestatus with SSL does not longer work due to problems with socat and json data. If you see errors like:

[ERROR][Thruk.Controller.Root] Caught exception in Thruk::Controller::status->index "socket error at thruk/script/../lib/Monitoring/Livestatus/Class/Base/Table.pm line 186"
[ERROR][Thruk.Controller.error] internal server error

and you use socat for livestatus over ssl, please change to stunnel or ssh with the normal xinetd solution.

undefined symbol: Perl_Istack_sp_ptr

You will get perl errors about undefined symbols when you try to install a debian package on ubuntu or a ubuntu 11 deb file on ubuntu 12 or any package on a different platform than the package was build for.

/usr/bin/perl: symbol lookup error: /usr/lib/thruk/perl5/x86_64-linux-gnu-thread-multi/auto/List/Util/Util.so: undefined symbol: Perl_Istack_sp_ptr

The solution is simple: use the right package for your distribution. If there is no package is available for your platform, use the source installation.

Broken PDF Reports in Centos/Rhel 5

PDF reports won’t work with libcairo < 1.8.8. Therefor you may use the prepared packages for cairo 1.8.8 on rhel/centos 5 on the download page.

The new reports2 module should work fine, even on older Redhat boxes.