Introduction
Thruk is a multibackend monitoring webinterface which currently supports Nagios, Icinga and Shinken as backend using the Livestatus API. It is designed to be a dropin replacement and covers almost 100% of the original features plus adds additional enhancements for large installations and increased usability.
Main Features / Advantages
-
multiple backends
-
faster, no need to parse status.dat for every request
-
less cpu usage
-
display live data, no delay between core and gui
-
independant from monitoring core, can be installed on remote host
-
clusterable, can be clustered over hosts
-
change status.cgi filter inline
-
extended logfile search
-
better logging, uses log4perl (who submitted which command?)
-
valid HTML code
-
no frames ( can be reenabled for better addon integration)
-
easy to extend with plugins
-
100% Perl (using Catalyst Framework)
-
pagination
-
multiple themes included
-
Excel export for status and logfiles
-
Adjustable side menu
-
Full expanded plugin commandline for easy testing
-
Save searches in personal bookmarks
-
Config Tool included
-
Mobile interface included
-
SLA Reports in PDF format
-
Recurring Downtimes
-
Fully Featured Dashboard
How it works
Thruk is written in Perl using the Catalyst Framework. Backend monitoring systems will be connected with the Monitoring::Livestatus Perl Module. Thruk itself is running as a fastcgi process. Availability will be calculated with Monitoring::Availability. Authentication is provided by the Apache webserver (For example with mod_auth_basic, mod_auth_ldap, mod_auth_mysql, …).
Reasons to choose Thruk
There are a couple of cool things in Thruk. A few of them are listed here.
Multi Site Support
Thruk connects to as many cores as you want. You could even combine Nagios, Icinga and Shinken instances into one big combined view. That way you get the advantage of several independent locations and still have an overview about all your installations. Sites can be put into groups for better arrangement.
SLA Reports
The reporting plugin creates comprehensive SLA reports in HTML and PDF format which may be send by mail at regular intervals. Besides that you may turn any page in Thruk into a regular E-Mail report.
Excel Export and Bookmarks
The Bookmarks feature allows you to save your searches and add them as your personal menu item. Besides the bookmarks, you can adjust the menu easily with the menu_local.conf for all users.
The Excel export creates real Excel files which can be send by mail or used to extract hostnames and other information.
Config Tool
The Config Tool makes is very easy to change object configuration of your monitoring solution. It also allows you to make quick changes to your Thruk configuration, as well as managing user access via htpasswd files or adjusting your cgi.cfg.
Sending Multiple Commands
The new status pages makes it very convenient to send multiple commands at once. It is even possible to send host and service commands at the same time. When rescheduling hosts and services, Thruk will wait until your check is finished and display the result as soon as the check has come back.
Easy Filtering
Remember the days when you had to guess numbers in the url to filter hosts or services. With Thruk it’s possible to quickly change your display filter. You can combine multiple filter to create whatever views you like. An Ajax search supports you, so you don’t have to guess host or service names, plus you get the power of regular expressions.
PNP4Nagios Graphs
When your action_url contains /pnp4nagios/, there will be automatically a graph displayed for your host and service. This gives you a quick view about the performance history. The image is then linked to PNP4Nagios to get detailed information.
Multiple Lines of Plugin Output
When your check returns multiple lines of plugin output. Thruk marks the output in blue and a click on it displays the complete output. This is especially useful for check_multi checks. In addition to that, the comments and downtimes also have a small popup with their data. So you don’t have to open the host/service page just to see who set a comment and when there is a downtime.
Mine Map
The Mine Map is the perfect tool to get a quick overview. It is especially useful if you have a lot of common services across your hosts. Otherwise use hostgroups or servicegroups for nice results. Normal filtering is possible too.
Mobile Interface
The Mobile interface gives you access to the most important things and allows you to quickly view and acknowledge problems.
Installation
There are several ways of installing Thruk.
Labs Consol Repository
The Labs Repository provides packages of latest Thruk releases (including daily development builds) and other Tools like Mod-Gearman. Just follow the guide on the labs page for your distribution.
OMD
An easy way of installing Thruk is using OMD from omdistro.org. There are Debian, Ubuntu, Centos and Suse Packages containing preconfigured latest versions of Nagios and Thruk. The package also includes Icinga, Shinken, pnp4nagios, check_mk and Nagvis. OMD is the recommended way of installing new Nagios / Thruk setups when you want to install several addons at once.
Use Packages
Standalone installation from a binary package is another easy way to get Thruk running.
Download packages from http://www.thruk.org/files/pkg/
All packages have the following filesystem structure:
/etc/thruk Thruks config /etc/httpd/conf.d/thruk.conf Apache config /usr/share/thruk shared files /usr/lib/thruk/perl5 Perl libraries /var/cache/thruk temporary files /var/lib/thruk stored user settings
After installation, Thruk is available at http://your-host/thruk/ and has a default user thrukadmin with password thrukadmin configured. You may need to change backend configuration. This should be done in the thruk_local.conf where all settings can be overridden.
Debian / Ubuntu
#> dpkg -i thruk_1.76_debian6_amd64.deb
In case of dependency errors, run apt-get -f install and try the dpkg -i… again.
Centos / Redhat
#> yum install --nogpgcheck thruk-1.76-1.rhel6.x86_64.rpm
You may need to include an external repository for mod_fastcgi module. Epel or Rpmforge should do it.
SLES
#> zypper install thruk-1.76-1.sles11.x86_64.rpm
You may need the SLES sdk dvd for additional dependencies.
Install from Source
Installation Steps
Requirements
|
Experienced Users Only
Source installation is for experienced users only. Using packages/repositories should be the preferred solution in almost all situations. Especially for production environments. |
In order to install the Thruk Monitoring Webinterface from source you will need the following:
-
Perl
-
Git Client
-
compiler tools: automake, make, g++, gcc
-
Apache Webserver (optional for fastcgi only)
Create New User
refer to your systems manual on how to add new user. This guide uses the following:
user: thruk group: thruk
|
all following steps should be done by the thruk user. |
Install Local::Lib
Follow the steps on http://search.cpan.org/perldoc?local::lib#The_bootstrapping_technique
quick guide:
%> su - thruk %> wget %http://search.cpan.org/CPAN/authors/id/A/AP/APEIRON/local-lib-1.008004.tar.gz %> tar zxf local-lib-1.008004.tar.gz %> cd local-lib-1.008004 %> perl Makefile.PL --bootstrap && make install
|
proxy configuration
if you need a proxy configuration, you should answer <no> at this question: Would you like me to configure as much as possible automatically? [yes] Setting a proper http_proxy/ftp_proxy environment should work for the automatic configuration. |
Add the following line to the thruk users .profile or .bashrc
eval $(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)
logout and login again and verify that your perl env looks like this:
%> env | grep perl PERL5LIB=/home/thruk/perl5/lib/perl5:/home/thruk/perl5/lib/perl5/x86_64-linux-gnu-thread-multi MODULEBUILDRC=/home/thruk/perl5/.modulebuildrc PATH=/home/thruk/perl5/bin:/usr/local/bin:/usr/bin:/bin:/usr/games PERL_MM_OPT=INSTALL_BASE=/home/thruk/perl5
Install Module::Install
perl -MCPAN -e 'install Module::Install::Catalyst'
Git Clone Thruk
git clone https://github.com/sni/Thruk.git cd Thruk perl Makefile.PL
press <enter> here:
==> Auto-install the 35 mandatory module(s) from CPAN? [y]
then run make
make
This may take a while, as there are probably several modules missing.
|
yes
you can use /usr/bin/yes to automatically answer all questions with yes. (yes | make) |
Press <y> at this questions:
Do you want to build the XS Stash module? [y] Do you want to use the XS Stash by default? [y]
run perl Makefile.PL again to see if all dependencies are now installed properly.
perl Makefile.PL
Configuration
Copy thruk.conf to thruk_local.conf and adjust the livestatus settings to your needs.
%> cp thruk.conf thruk_local.conf
The thruk.conf will be overwritten with new defaults on updates. The thruk_local.conf contains the local overrides and will never be overwritten.
Edit cgi.conf and adjust settings to your needs.
See the [Thruk Configuration] section for detailed explanation of configuration options.
Start Server
After running these steps successfully, you should be able to test your installation:
./script/thruk_server.pl
Open your browser and open http://<your_host>:3000
Apache Configuration
|
apache is preconfigured when using packages
Apache configuration is not needed if you use OMD or packages. Apache is already preconfigured in that case. |
Integration in the Apache webserver is done by fastcgi. There are two fastcgi modules for Apache at the moment. Choose the one which fits best into your environment. If unsure, use mod_fcgid. The main difference is, that mod_fcgid starts the fastcgi process upon the first request whereas in mod_fastcgi you have to start the fastcgi process by yourself.
Do not use the port 3000 thruk server in production, it’s only for testing and development. It cannot handle authentication and is slower than the fastcgi variants.
|
lighthttpd
Francois Ponsard wrote an article on how to integrate Thruk in Lighthttpd: http://www.dahwa.fr/dotclear/index.php?post/2011/03/15/Thruk-in-Lighttpd |
mod_fcgid
|
Thruk runs with the webserver user in this scenario, make sure the webserver user has access to all Thruk files and perl modules. |
LoadModule fcgid_module /usr/lib/apache2/modules/mod_fcgid.so <VirtualHost *:80> ServerName thruk.company.local DocumentRoot /home/thruk/Thruk/root/ CustomLog /home/thruk/Thruk/logs/access.log combined ErrorLog /home/thruk/Thruk/logs/error.log <Directory /home/thruk/Thruk/root/> Options FollowSymLinks AllowOverride All order allow,deny allow from all </Directory> AliasMatch /thruk/(.*\.cgi|.*\.html) /home/thruk/Thruk/script/thruk_fastcgi.pl/thruk/$1 <Location /thruk> Options ExecCGI Order allow,deny Allow from all AuthName "Monitoring Access" AuthType Basic AuthUserFile /home/thruk/Thruk/htpasswd.users Require valid-user </Location> <IfModule mod_fcgid.c> AddHandler fcgid-script .pl MaxRequestsPerProcess 100 </IfModule> </VirtualHost>
mod_fastcgi
start your fcgi server:
%>./script/thruk_fastcgi.pl -n 5 \ -l /tmp/thruk_fastcgi.socket \ -p /tmp/thruk_fastcgi.pid
you may want to copy the init.d script to /etc/init.d and adjust its paths:
%> sudo cp ./script/thruk_fastcgi_server.sh /etc/init.d/thruk_fastcgi_server %> vi /etc/init.d/thruk_fastcgi_server %> sudo chown root: /etc/init.d/thruk_fastcgi_server
Or create a custom init.d script (additional modules required) with:
%> ./script/thruk_create.pl FastCGI::ExternalServer l=/tmp/thruk_fastcgi.socket n=5 p=/tmp/thruk_fastcgi.pid
use this apache example configuration:
-
replace /home/thruk/Thruk with your installation path
-
replace your-web-host.local with your hostname
-
create a /home/thruk/Thruk/htpasswd.users with htpasswd2
-
make sure the /home/thruk/Thruk/logs/ directory exists
<VirtualHost *:80> # ... existing configuration # thruk configuration <Directory /home/thruk/Thruk/root/> order allow,deny allow from all Options FollowSymLinks AllowOverride All </Directory> Alias /thruk/ /home/thruk/Thruk/root/thruk/ # authorization <Location "/thruk"> AuthName "Monitoring Access" AuthType Basic AuthUserFile /home/thruk/Thruk/htpasswd.users Order Allow,Deny Allow from all require valid-user </Location> # Load fastcgi module unless already loaded LoadModule fastcgi_module /usr/lib/apache2/modules/mod_fastcgi.so # fastcgi configuration FastCGIExternalServer /tmp/thruk_fastcgi.fcgi -socket /tmp/thruk_fastcgi.socket -idle-timeout 120 # Load rewrite module unless already loaded LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so # rewrite configuration RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^/thruk(.*)$ /tmp/thruk_fastcgi.fcgi/thruk$1 [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},QSA,L] </VirtualHost>
<VirtualHost *:80> ServerName thruk.your-host.local DocumentRoot /home/thruk/Thruk/root/ CustomLog /home/thruk/Thruk/logs/access.log combined ErrorLog /home/thruk/Thruk/logs/error.log <Directory /> order deny,allow deny from all </Directory> <Directory /home/thruk/Thruk/root/> Options FollowSymLinks AllowOverride All order allow,deny allow from all </Directory> # authorization <Location "/"> AuthName "Monitoring Access" AuthType Basic AuthUserFile /home/thruk/Thruk/htpasswd.users Order Allow,Deny Allow from all require valid-user </Location> # Load fastcgi module unless already loaded LoadModule fastcgi_module /usr/lib/apache2/modules/mod_fastcgi.so # fastcgi configuration FastCGIExternalServer /tmp/thruk_fastcgi.fcgi -socket /tmp/thruk_fastcgi.socket -idle-timeout 120 # Load rewrite module unless already loaded LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so # rewrite configuration RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ /tmp/thruk_fastcgi.fcgi/$1 [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},QSA,L] </VirtualHost>
Backend Configuration
You may connect multiple backends into one Thruk interface. Just specify multiple peer items.
Livestatus
Livestatus is a addon for Nagios or Icinga which provides real time status data. Contrary to database addons it adds very little overhead to the Nagios core which makes livestatus based gui fast and real time.
|
Shinken
Shinken has livestatus support built-in and does not require additional modules. |
Refer to http://mathias-kettner.de/checkmk_livestatus.html#H1:%20Setting%20up%20and%20using%20Livestatus on how to install livestatus onto your monitoring box. The Lab Consol Repository has livestatus rpm packages. For debian based Linux systems just use the provided packages of your distribution.
Basically you have to build the NEB module and add it to your nagios/icinga.cfg.
broker_module=/opt/local/livestatus/livestatus.o /tmp/live.sock
Then use the socket as peer parameter in your backend configuration.
HTTP
A HTTP connection is possible between multiple Thruk installations. A HTTP connection not only makes live data available, it also offers a secure way to manage object configuration from remote. To authenticate the central Thruk installation, you need to provide the secret key from the slave instance. This setup is perfect for managing several independent installations from a central point of view.
|
use SSL
It’s strongly recommended to use HTTPS for remote connections. |
# package installation %> cat /var/lib/thruk/secret.key # omd site OMD[site]:~$ cat var/thruk/secret.key
MongoDB
The MongoDB is not a real backend for status data, but it can be used as a logfile cache. If unsure whether to use MongoDB or MySQL, use MySQL which is newer and faster. The MongoDB logfile cache may be deprecated in the future.
ex.:
logcache = mongodb://localhost:27017/thruk_logs
Details are explained in the Logfile Cache section.
MySQL
The MySQL Database is not a real backend for status data, but it can be used as a logfile cache. If unsure whether to use MongoDB or MySQL, use MySQL which is newer and faster. The MongoDB logfile cache may be deprecated in the future.
ex.:
logcache = mysql://username:password@localhost:3306/thruk_logs
Details are explained in the Logfile Cache section.
Thruk Configuration
Configuration is managed mainly in these configuration files.
* thruk.conf # shipped default Thruk config * thruk_local.conf # local override of Thruks settings * cgi.cfg # Nagios cgi.cfg * log4perl.conf # Logging configuration * menu.conf # Thruks default side navigation * menu_local.conf # local override for the navigation
Config Files
thruk.conf
The thruk.conf contains the shipped defaults. You should not edit this file directly. Overwrite your settings in your thruk_local.conf instead.
thruk_local.conf
The thruk_local.conf is a copy of the thruk.conf. Both files are used by thruk. The idea is, that the thruk.conf is provided with the packaged defaults and the thruk_local.conf is to override these settings where needed.
General Settings
title_prefix
set the title prefix for all urls this piece of text will be prepended to all page titles.
ex.:
title_prefix = Prod
use_bookmark_titles
Sets the page title to the name of a bookmark if the url matches. Private bookmarks are processed first and the name of the first match is used.
ex.:
use_bookmark_titles = 1
use_dynamic_titles
Uses more descriptive page titles. Bookmark titles take precedence and can be overriden by adding the title parameter on most pages
use_intelligent_titles
Thruk will used more intelligent and descriptive page titles.
ex.:
use_dynamic_titles = 1
url_prefix
Changes the usual url path for Thruk. Don’t change it unless you plan to run multiple Thruk instances on the same webserver. You will have to change your fastcgi configuration too.
ex.:
url_prefix = /
use_timezone
Changes the timezone from the systems default to this timezone. Only set this if you have trouble with displaying the right timestamps.
ex.:
use_timezone = CET
mobile_agent
Specify user agents which will be redirected to the mobile plugin (if enabled).
ex.:
mobile_agent=iPhone,Android,IEMobile
default_theme
Default theme to use for all users. Must be a valid sub directory in the themes folder.
ex.:
default_theme = Thruk
first_day_of_week
Set first day of week. Used in reports. Sunday: 0 Monday: 1
ex.:
first_day_of_week = 0
report_use_temp_files
Large reports will use temp files to avoid extreme memory usage. With report_use_temp_files you may set the report duration in days which will trigger the use of temp files. Default is 14days, so for example the last31days report will use temp files, the thisweek not. Can be disabled by setting to 0.
ex.:
report_use_temp_files = 14
start_page
This link is used as startpage and points usually to the main.html with displays version information and general links.
ex.:
start_page = /thruk/main.html
home_link
This link is used whenever you click on one of the main logos. By default those logos are the Thruk logos and the link will take you to the Thruk homepage. Replace this with where you want your home location to be.
ex.:
home_link = http://www.thruk.org
documentation_link
This link is used in the side navigation menu as link to the documentation. Replace with your documentation location. Set it to a blank value if you don’t want a documentation link in the menu at all.
ex.:
documentation_link = /thruk/docs/
all_problems_link
Customizable link for the problems link in side menu. Can be useful to reflect your companies process of error handling.
ex.:
all_problems_link = /thruk/cgi-bin/status.cgi?...
allowed_frame_links
List of allowed patterns, where links inside frames can be set to. You can link to /thruk/frame.html?link=http://wiki.my-company.com/page/blah Your wiki will then be displayed with the Thruk navigation frame. Useful for other addons, so they don’t have to display a own navigation.
ex.:
allowed_frame_links = http://intranet.my-company.com allowed_frame_links = https://wiki.my-company.com
Authorization Settings
can_submit_commands
Set this if a contact should be allowed to send commands unless defined for the contact itself. This is the default value for all contacts unless the user has a can_submit_commands setting in your monitoring configuration.
ex.:
can_submit_commands = 1
command_disabled
Use this to disabled specific commands. Can be use multiple times to disabled multiple commands. The number can be found in the cmd_typ cgi parameter from links to the command page. You may use ranges here.
ex.:
command_disabled = 14 command_disabled = 35 command_disabled = 17-34,50-65
make_auth_user_lowercase
Convert authenticated username to lowercase.
ex.:
make_auth_user_lowercase = 1
make_auth_user_uppercase
Convert authenticated username to uppercase.
ex.:
make_auth_user_uppercase = 1
use_strict_host_authorization
When set to a true value, every contact will only see the hosts where he is contact for plus the services where he is contact for. When disabled, a host contact will see all services for this host regardless of whether he is a service contact or not.
ex.:
use_strict_host_authorization = 1
Path Settings
cgi_cfg
The path to your cgi.cfg. See cgi.cfg for details.
ex.:
cgi_cfg = cgi.cfg
log4perl_conf
The path to your log4perl configuration file.
ex.:
log4perl_conf = ./log4perl.conf
plugin_path
Path to your plugins directory. Can be used to specify different location for you Thruk plugins. Don’t forget to set appropriate apache alias or rewrite rules when changing the plugin path. Otherwise the static content from plugins is not accessible.
Example redirect rule for apache:
ex.:
plugin_path = ./plugins
themes_path
Path to your themes directory. Can be used to specify different location for you Thruk themes. Don’t forget to set appropriate apache alias or rewrite rules when changing the themes path. Otherwise the static content from your themes may not accessible.
ex.:
themes_path = ./themes
var_path
Path to the var directory. Thruk stores user specific date here.
ex.:
var_path = ./var
tmp_path
Path to a temporary directory. Defaults to /tmp if not set and usually this is a good place.
ex.:
tmp_path = /tmp
ssi_path
The path to your ssi (server side includes) files. See Server Side Includes for details.
ex.:
ssi_path = ssi/
user_template_path
Specify a additional directory for user supplied templates. This makes it easy to override thruks own templates. Template search order is:
-
users template path
-
themes template path
-
plugins template path
-
thruks template path
ex.:
user_template_path = ./my_templates
logo_path_prefix
Changes the path to your logo images. Default is $url_prefix+thruk/themes/$current_theme/images/logos/ and therefor relative to the current selected theme. You could set a fixed path here. Like usual, paths starting with a / will be absolute from your webserver root directory. Paths starting without a / will be relative to the cgi directory.
ex.:
logo_path_prefix = /icons/
physical_logo_path
Location of your logos in your filesystem. This directory should be mapped to your logo_path_prefix directory where logo_path_prefix is the path relative to your webserver root directory and physical_logo_path is the corresponding filesystem path.
ex.:
physical_logo_path = /usr/share/icons/
mode_file
Mode used when creating or saving files.
ex.:
mode_file = 0660
mode_dir
Mode used when creating folders
ex.:
mode_dir = 0770
resource_file
Set a general resource file. Make sure it does not contain any passwords or any other data which should not be displayed. Instead of using a general resource_file you could define one file per peer in your peer config.
ex.:
resource_file = /etc/nagios3/resource.cfg
Search Settings
use_new_search
Use the old or the classic search from the navigation. The new search supports regular expressions and searches in many attributes. For example: plugin_output, groups, names, descriptions
ex.:
use_new_search = 1
use_ajax_search
Enables the ajax search field. There will be suggestions while typing into the search field.
ex.:
use_ajax_search = 1
ajax_search_hosts
Enables the suggestion of hosts in the ajax search field. Depending on the number of hosts, this can make the search slow.
ex.:
ajax_search_hosts = 1
ajax_search_hostgroups
Enables the suggestion of hostgroups in the ajax search field.
ex.:
ajax_search_hostgroups = 1
ajax_search_services
Enables the suggestion of services in the ajax search field. Depending on the number of services, this can make the search slow.
ex.:
ajax_search_services = 1
ajax_search_servicegroups
Enables the suggestion of servicegroups in the ajax search field.
ex.:
ajax_search_servicegroups = 1
ajax_search_timeperiods
Enables the suggestion of timeperiods in the ajax search field. Timeperiods will only displayed when filtering by check- or notification period.
ex.:
ajax_search_timeperiods = 1
Paging Settings
use_pager
Using the pager will make huge pages much faster as most people don’t want a services page with 100.000 services displayed. Can be disabled if you don’t need it.
ex.:
use_pager = 1
paging_steps
Define the selectable paging steps. Use the * to set the default selected value.
ex.:
paging_steps = *100, 500, 1000, all
group_paging_overview
Just like the paging_steps, but only for the groups overview page.
ex.:
group_paging_overview = *3, 10, 100, all
group_paging_summary
Just like the paging_steps, but only for the groups summary page.
ex.:
group_paging_summary = *10, 50, 100, all
group_paging_grid
Just like the paging_steps, but only for the groups grip page.
ex.:
group_paging_grid = *5, 10, 50, all
Display Settings
host_action_icon
Change path to your host action icons. You may use relative paths to specify completely different location. You also may want to use action_pnp.png when using pnp. Icon can be overridden by a custom variable _ACTION_ICON.
ex.:
host_action_icon = action.gif
service_action_icon
Change path to your service action icons. You may use relative paths to specify completely different location. You also may want to use action_pnp.png when using pnp. Icon can be overridden by a custom variable _ACTION_ICON.
ex.:
service_action_icon = action.gif
initial_menu_state
Set initial menu state.
closed => 0 open => 1
ex.:
<initial_menu_state> General = 1 Current_Status = 1 Reports = 1 System = 1 Bookmarks = 1 </initial_menu_state>
use_frames
Set whether you want to use a framed navigation or not. With using frames it’s sometimes easier to include addons. See allowed_frame_links option for how to integrate addons.
ex.:
use_frames = 0
use_new_command_box
Show the new split command box on the host / service details page.
ex.:
use_new_command_box = 1
bug_email_rcpt
what email address bug reports will be sent to
ex.: bug_email_rcpt = bugs@thruk.org
datetime_format
Default timeformat. Use POSIX format.
ex.:
datetime_format = %Y-%m-%d %H:%M:%S
datetime_format_long
Default long timeformat.
ex.:
datetime_format_long = %a %b %e %H:%M:%S %Z %Y
datetime_format_log
Default log timeformat.
ex.:
datetime_format_log = %B %d, %Y %H
datetime_format_trends
Default trends timeformat.
ex.:
datetime_format_trends = %a %b %e %H:%M:%S %Y
datetime_format_today
Default timeformat for todays date. Can be useful if you want a shorter date format for today.
ex.:
datetime_format_today = %H:%M:%S
info_popup_event_type
On which event should the comments / downtime or longpluginoutput popup show up. Valid values are onclick or onmouseover.
ex.:
info_popup_event_type = onmouseover
info_popup_options
Options for the popup window used for long pluginoutput, downtimes and comments. See http://www.bosrup.com/web/overlib/?Command_Reference for what options are available
ex.:
info_popup_options = STICKY,CLOSECLICK,HAUTO,MOUSEOFF
show_notification_number
Display the current number of notification after the current / max attempts on the status details page.
ex.:
show_notification_number = 0
show_backends_in_table
Display the backend/site name in the status table. This is useful if you have same hosts or services on different backends and need to know which one returns an error. Valid values are:
1 - show site name at the end 2 - put site name in front
ex.:
show_backends_in_table = 0
show_config_edit_buttons
Show links to config tool for each host / service. You need to have the config tool plugin enabled and you need proper permissions for the link to appear.
ex.:
show_config_edit_buttons = 1
show_full_commandline
Display the full command line for host / service checks . Be warned, the command line could contain passwords and other confidential data. In order to replace the user macros for commands, you have to set the resource_file in your peer config or the general resource_file option.
-
0 = off, don’t show the command line at all
-
1 = show them for contacts with the role: authorized_for_configuration_information
-
2 = show them for everyone
ex.:
show_full_commandline = 0
show_full_commandline_source
Usually the source of your expanded check_command should be the check_command attribute of your host / service. But under certain circumstances you might want to use display expanded commands from a custom variable. In this case, set show_full_commandline_source to _CUST_VAR_NAME.
ex.:
show_full_commandline_source = check_command
show_logout_button
Show additional logout button next to the top right preferences button. (works only together with cookie authentication)
ex.:
show_logout_button=1
show_long_plugin_output
When a plugin returns more than one line of output, the output can be displayed directly in the status table, as popup or not at all. Choose between popup, inline and off
ex.:
show_long_plugin_output = popup
status_color_background
Color complete status line with status colour or just the status itself.
ex.:
status_color_background=0
show_modified_attributes
Show if a host / service has modified attributes.
ex.:
show_modified_attributes = 1
show_host_attempts
Show check attempts for hosts too. The default is to show them on the problems page only. Use this value to force a value.
ex.:
show_host_attempts = 1
perf_bar_mode
This option enables a performance bar inside the status/host list which create a graph from the performance data of the plugin output. Available options are match, first, all, worst and off.
match: try to set graph which matches the output all: graph all performance values available first: graph only the first performance value worst: graph only the graph for the worst state off: graph no value at all
ex.:
perf_bar_mode = match
perf_bar_pnp_popup
Show pnp popup if performance data are available and pnp is used as graph engine.
ex.:
perf_bar_pnp_popup = 1
shown_inline_pnp
Show inline pnp graph if available. If a service or host has a pnp4nagios action or notes url set. Thruk will show a inline graph on the extinfo page. This works for /pnp4nagios/ urls and /pnp/.
ex.:
shown_inline_pnp = 1
graph_word
graph_word is a regexp used to display any graph on the details page. if a service or host has a graph url in action url (or notes url) set it can be displayed by specifying a regular expression that always appears in this url. You can specify multiple graph_words.
sample service configuration for graphite:
define service{ service_description Load host_name localhost use generic-service action_url http://YOURGRAPHITE/render/?lineMode=connected&width=586&height=308&_salt=1355923874.899&target=cactiStyle($HOSTNAME$.$SERVICEDESC$.*)&xFormat=%25H%3A%25M&tz=Europe/Paris check_command check_load }
ex.:
graph_word = /pnp4nagios/ # for pnp4nagios graph_word = /render/ # for graphite
Info : Quotes are supported in the action_url statement, you may want to use it for special graphite function (http://graphite.readthedocs.org/en/1.0/functions.html) Do not escape double quotes here, otherwise graph won’t work.
show_custom_vars
Show custom vars in host / service ext info. List variable names to display in the host and service extinfo details page. Can be specified more than once to define multiple variables. You may use html in your variables. Use * as wildcard, ex.: _VAR*
ex.:
show_custom_vars = _VAR1
show_error_reports
Show link to bug reports when internal errors occur. Set to server to log js error server side.
ex.: show_error_reports = 1
skip_js_errors
don’t report some known harmless javascript errors
ex.: skip_js_errors = cluetip is not a function
strict_passive_mode
Normally passive checks would be marked as disabled. With this option set, disabled checks will only be displayed as disabled if their last result was active. Otherwise they would be marked as passive checks. This option also changes the passive icon only to be shown when the last check was passive, otherwise the disabled icon will be displayed.
ex.:
strict_passive_mode = 1
hide_passive_icon
Normally passive checks whould be displayed with a passive icon if their last result is passive. With this option, passive icon will be hidden in status details.
ex.: hide_passive_icon = 0
sitepanel
The sitepanel is used to display multiple backends/sites at a glance. With than 10 or more sites, the list of backends will be combined into the compact site panel which just displays the totals of available / down / disabled sites. The compact panel will also automatically be used if you use sections. With more than 50 backends, the collapsed will be selected in auto mode. Set sitepanel to list/compact/collapsed/auto/off to change the default behaviour.
ex.:
sitepanel = auto
Connection Settings
check_local_states
Get the status for remote backends from local instances. This can increase performance when using multiple remote sites. It is enabled by default when using more than one site. You have to define hostchecks in any local backend (using unix sockets) with a name or alias of the address of your remote backends. To explicitly connect a host to a specific backend, set state_host in that peer configuration.
ex.:
check_local_states = 1
backend_debug
Set logging of backend in verbose mode. This only makes sense when debug logging is activated.
ex.:
backend_debug = 1
connection_pool_size
Use connection pool when accessing multiple sites. Increases the performance because backends will be queried parallel but uses around 10mb of memory per pool member. Disabled when set to 0, number of concurrent connections otherwise.
ex.:
connection_pool_size = 5
logcache
Enables caching logfiles for faster access and less memory usage for the nagios process. Cache supports MongoDB and Mysql only. Prefered type is Mysql. Format is a Mysql/MongoDB connection string like mysql://hostname:port/db. Using a cache dramatically decreases cpu and memory usage of Thruk and Nagios when accessing logfiles, for example when creating reports.
ex.:
logcache = mysql://user:password@localhost:3306/thruk_log_cache
logcache = mongodb://localhost:27017/thruk_log_cache
delay_pages_after_backend_reload
Delay the page delivery until the backends uptime is at least this amount of seconds. Displaying pages soon after backend restarts may display wrong results and all services are pending. Enable this if you experience problems with pending services after reloading your backend. Should be obsolete with Livestatus versions greater than 1.2 ex.: setting this to 10 would start serving pages 10 seconds after the backend reload
ex.:
delay_pages_after_backend_reload = 10
ssl_verify_hostnames
Can be set to enable / disable hostname verification for https connections. For example for the cookie login or the http backend.
ex.:
ssl_verify_hostnames = 1