==== Thruk ====

{{thruk.png?640x480}}
  * Homepage: http://www.thruk.org/
  * Screenshots: http://www.thruk.org/images/screenshots/screenshots.html
  * Description: "Thruk is an independent multibackend monitoring webinterface which currently supports Nagios, Icinga and Shinken as backend using the Livestatus addon. It is designed to be a "dropin" replacement. The target is to cover 100% of the original features plus additional enhancements for large installations."
  * License: GPL v2

  * Shinken dedicated forum: http://www.shinken-monitoring.org/forum/index.php/board,7.0.html

==== Install Thruk ====

See [[http://www.thruk.org/documentation.html#_installation|Thruk installation]] documentation.

Note: if you're using SELinux, also run:
<code>
chcon -t httpd_sys_script_exec_t /usr/share/thruk/fcgid_env.sh
chcon -t httpd_sys_script_exec_t /usr/share/thruk/script/thruk_fastcgi.pl
chcon -R -t httpd_sys_content_rw_t /var/lib/thruk/
chcon -R -t httpd_sys_content_rw_t /var/cache/thruk/
chcon -R -t httpd_log_t /var/log/thruk/
setsebool -P httpd_can_network_connect on
</code>
==== Using Shinken with Thruk ====

Thruk communicates with Shinken through the LiveStatus module. If you used the sample configuration, everything should be ready already. :)

You can review the configuration using the two following steps.

=== Enable Livestatus module ===

See [[enable_livestatus_module|enable Livestatus module]].

=== Declare Shinken peer in Thruk ===

Edit ''/etc/thruk/thruk_local.conf'' and declare the Shinken peer:
<code>
    <peer>
        name   = External Shinken
        type   = livestatus
        <options>
            peer    = 127.0.0.01:50000
       </options>
    </peer>
</code>

Or use the backend wizard which starts automatically upon first installation.

Don't forget to change the 127.0.0.1 with the IP/name of your broker if it is installed on an different host, or if you are using a distributed architecture with multiple brokers!

=== Credit Shinken in the webpages title :-) ===

Edit ''/etc/thruk/thruk.conf'':<code>
title_prefix = Shinken+Thruk-
</code>

=== Configure users ===

Passwords are stored in ''/etc/thruk/htpasswd'' and may be modified using the ''htpasswd'' command from Apache:
<code>
htpasswd /etc/thruk/htpasswd your_login
</code>

User permissions: modify ''templates.cfg:generic-contact'':
<code>
      # I couldn't manage to get Thruk-level permissions to work, let's use Shinken admins privileges
      can_submit_commands             0
</code>
and define some users as admins in the Shinken configuration:
<code>
define contact {
    use             generic-contact
    is_admin        1
    ....
}
</code>

Allow Thruk to modify its configuration file:
<code>
chgrp apache /etc/thruk/cgi.cfg
chmod g+w /etc/thruk/cgi.cfg
</code>

Set permissions for your users in Config Tool > User Settings > authorized_for_...

==== Using PNP4Nagios with Thruk ====

See [[use_with_pnp|PNP4Nagios]].