Fork me on GitHub
Plugins

Thruk is easily extenable with plugins. There are a few 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.

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

 plugins

 ├── plugins-available

 │   ├── conf

 │   ├── minemap

 │   ├── mobile

 │   ├── shinken_features

 │   └── statusmap

 └── plugins-enabled

     ├── conf             -> ../plugins-available/conf

     ├── minemap          -> ../plugins-available/minemap

     ├── shinken_features -> ../plugins-available/shinken_features

     └── statusmap        -> ../plugins-available/statusmap

Installation

Installation of a plugin is easy:

Installation
  1. Unpack the plugin in plugins-available directory.

  2. Create a symlink in plugins-enabled which points to the plugin.

  3. Restart Thruk (if you use mod_fastcgi) or your webserver (if you use mod_fcgid)

Deactivate
  1. Remove the symlink from plugins-enabled

  2. Restart Thruk (if you use mod_fastcgi) or your webserver (if you use mod_fcgid)

Uninstall
  1. Remove plugin from plugins-available

Builtin Plugins

Config Tool

 Author:      Sven Nierlein

 Description: Manage config files directly in Thruk

 Download:    This plugin is builtin and shipped with Thruk

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.

config tool config tool config tool

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.

mine map

Shinken Features

 Author:      Jean Gabes, Sven Nierlein

 Description: Contains Shinken specific addons like business view and

              impacts view.

 Download:    This plugin is builtin and shipped with Thruk

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 statusmap

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.

statusmap statusmap

Mobile

 Author:      Sven Nierlein

 Description: Webinterface for mobile devices

 Download:    This plugin is builtin and shipped with Thruk

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).

mobile mobile

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.

Tip Let me know if you want to get your plugin listed here.
  ├── lib

  │   └── Thruk

  │       └── Controller

  ├── root

  │   └── images

  ├── t

  └── templates
Structure
  • lib containts all Perl files

  • root contains all static content

  • t keep the tests here

  • templates contains all template files for dynamic pages

Tip Easiest way would be to copy an existing plugin and change it to your needs.