====== Nagios with Thruk ======
Thruk is a web interface able to collect informations and alerts from multiple nagios or icinga servers.
Here is an example of infrastructure:
{{:monitoring:nagios_thruk01.png?550}}
    SRV-THRUK: Apache & Thruk (the thruk server can also be used as local nagios server)
    SRV-NAGIOS1: Nagios & Check Mk (10.10.10.20)
    SRV-NAGIOS2: Nagios & Check Mk
    SRV-NAGIOS3: Nagios & Check Mk
After installing the packages thruk, and apache2, you are able to connect to Web interface    
  http://localhost/thruk
Login and password are: thrukadmin
You can find the Thruk config into /etc/thruk
  * thruk.conf : global thruk config, do not modify
  * thruk_local.conf : custom config that can be modified
When connected first time to web interface, the thruk key is generated for the server, you can also use the following command:
   
# dd if=/dev/urandom count=1000 bs=4096 | md5sum | awk '{print $1}' > /var/lib/thruk/secret.key
Here is an example with a nagios server with local thruk also acting as central thruk for other nagios/thruk host. 
The name correspond to "site" in Thruk, auth correspond to the secret.key 
[root@srv-thruk thruk]# cat /etc/thruk/thruk_local.conf
############################################
# put your own settings into this file
# settings from this file will override
# those from the thruk.conf
############################################
    
        name    = DATACENTER1
        id      = a891f
        type    = http
        state_host  = 10.10.10.20
        section = SLA
        
            peer          = https://10.10.10.20/thruk
            auth          = 9f33333f5203b7e7ba24da88861b7fff
        
    
    
        name    = DC-LOCAL
        id      = 7317e
        type    = livestatus
        section = MYLOCAL
        
            peer          = /usr/lib64/nagios/rw/live
        
    
show_backends_in_table=1
ssl_verify_hostnames=0
group_paging_grid=5,*10,50,all
group_paging_summary=10,*50,100,all
[root@srv-thruk thruk]#