Thruk is easily extenable with plugins and there are some plugins
already included. Plugins itself reside in the
plugins/plugins-available directory. Activate a plugin by creating a symlink
in the plugins/plugin-enabled directory. If you use the packaged Thruk
version, the plugins folder is directly in your Thruk folder. If you are using
OMD, the plugins folder is in $OMD_ROOT/etc/thruk/plugins.
Make sure you restart Thruk / Apache after enabling / disabling
plugins.

With Thruk 2.0 a few minor changes are required for plugins. If you
have own custom plugins, the Migration Guide will
help you getting them to work with Thruk 2.0.

Later versions of Thruk have a plugins manager included in the config
tool and you can manage your plugins there.

Example of a plugins folder with all except the mobile plugin (which is not
yet finished) enabled.

Config Tool

The Config Tool plugin allows you to make config changes directly in
Thruk. Currently it supports editing the cgi.cfg and the thruk.cfg.
The changes will be active immediately, so there is no need to restart
Thruk.

Core Scheduling Graph

The Core scheduling plugin allows you to visualize the active host
and service checks on a timeline. This plugin also provides a cli
command to balance out all (or only a few) checks evenly to reduce
load piles.

This addon is shipped with Thruk since version 2.06 but not enabled by
default.

Mine Map

Author: Sven Nierlein
Description: The Mine Map gives a quick overview over similar
services
Download: This plugin is builtin and shipped with Thruk

The Mine Map creates a matrix from all combinations of selected hosts
and services and display a grid of status information. Normal filters
can be used to reduce the amount of services or show just a single
host- or servicegroup. The Mine Map is particular useful if you have a
set of hosts with lots of common services.

Mobile

The mobile interface is a perfect way to get a quick overview and
provides an easy way to acknowledge problems. When enabled, you will
be asked on the startpage and on the host/service details page to use
the mobile interface (once per session).

Shinken Features

This shinken contains all Shinken specific addons to Thruk. Most
Shinken specific features can only be used if there are only Shinken
backends active. There is a view for business processes, which can be
defined in Shinken only and there is a problems view, which show all
root problems (problems not caused by another problem) order by
priority.

Statusmap

Author: Sven Nierlein
Description: Display a statusmap for hosts
Download: This plugin is builtin and shipped with Thruk

The Statusmap plugin replaces the traditional map. It is designed to
provide usefull information (even in bigger installations) without the
need of extra configuration. Your hosts can be grouped by ip address,
domain, hostgroup, servicegroup or parent relation. Therefor it uses
information which is already specified.

OMD

The omd plugin saves top and gearman_top data every minute
for the last week for debuging purposes. It then draws nice
usage graphs with a drill down functionality. For every
point in the last week the complete top data can be fetched,
sorted and filtered.

Writing your own plugins

The directory structure of a plugin is similar to a normal perl
module. The following example has lib, static content, templates and
tests. But you don’t need all of them.

You can also protect your cgi page using the authorization settings from cgi.cfg.

Lets say you want to limit access to users with both the permissions
authorized_for_configuration_information and authorized_for_system_commands
then you can use the function $c→check_user_roles with the appropriate parameters to check permissions.
You can modify your index function in hello/lib/Thruk/Controller/hello.pm to look like this
to stop anyone from accessing your cgi without proper permissions: