How to install Thruk from RPM

Introduction

Thruk is an independent multibackend monitoring webinterface which currently supports Nagios (Icinga and Shinken) as backend using the MKLivestatus addon.

Requirements

You need to install :

  • FAN >= 2.2

Installation

Download thruk to http://www.thruk.org/download.html. Use Centos 32bit or 64bit rpm file : thruk-$(version)-1.rhel5.$(arch).rpm

You need to activate temporarily the Epel repository for mod_fastcgi module.

For example, the installation is runnning with 1.26 version

# yum localinstall --nogpgcheck thruk-1.26-1.rhel5.x86_64.rpm

The dependancy mod_fcgid rpm will be installed

Edit /etc/thruk/thruk_local.conf file and add this configuration :

use_frames          = 1
statusmap_default_type=circle
<Component Thruk::Backend>
    <peer>
        name   = Core
        type   = livestatus
        <options>
            peer          = /var/log/nagios/rw/live
            resource_file = /etc/nagios/resource.cfg
       </options>
       <configtool>
            core_conf      = /etc/nagios/nagios.cfg
            obj_check_cmd  = /usr/bin/nagios -v /etc/nagios/nagios.cfg
            obj_reload_cmd = /etc/init.d/nagios reload
       </configtool>
    </peer>
</Component>

Edit /etc/thruk/cgi.cfg file, replace values :

default_user_name=nagiosadmin
authorized_for_system_information=nagiosadmin
authorized_for_configuration_information=nagiosadmin
authorized_for_system_commands=nagiosadmin
authorized_for_all_services=nagiosadmin
authorized_for_all_hosts=nagiosadmin
authorized_for_all_service_commands=nagiosadmin
authorized_for_all_host_commands=nagiosadmin

 

Edit /etc/httpd/conf.d/thruk.conf file, replace this line

AuthUserFile /etc/thruk/htpasswd

by

 AuthUserFile /etc/nagios/htpasswd.users

As root, copy thruk daemon file in /etc/init.d

# cp script/thruk_fastcgi_server.sh /etc/init.d/

 

Restart Nagios and Apache

# /etc/init.d/nagios stop
# /etc/init.d/httpd restart
# /etc/init.d/nagios start

 

Connect to http://@_IP_FAN_SERVER/thruk/ and use login/password : nagiosadmin/nagiosadmin