# Thruk Settings

######################################
#
# !!! DONT CHANGE THIS FILE !!!
#
# If you want to change configuration settings put
# the items you want to override in your thruk_local.conf.
# Configuration is merged from both files then.
# This file will be replaced on every update.
#
######################################

######################################
# set the url prefix for all urls
url_prefix = /

######################################
# fail after timeout seconds when generating a graph
#cli_graph_timeout = 30

######################################
# 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.
#logo_path_prefix = /icons/

# 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.
#physical_logo_path = /usr/local/share/icons

######################################
# set the title prefix for all urls
# this piece of text will be prepended to
# all page titles.
#title_prefix = Prod

######################################
# uses bookmark names as page titles where possible
# works best without frames
# can be overrided by adding the title
# parameter on most pages
use_bookmark_titles = 0

######################################
# uses more descriptive page titles.
# bookmark titles take precedence and
# can be overriden by adding the title
# parameter on most pages
use_dynamic_titles = 1

######################################
# set server timezone instead of using the systems timezone.
#server_timezone = CET

######################################
# since users can change their timezone setting, this is the default:
#default_user_timezone = "Server Setting"

######################################
# determines if host contacts are allowed for services
# on this host or not
use_strict_host_authorization = 0

######################################
# convert authenticated username to lowercase
#make_auth_user_lowercase = 0

# convert authenticated username to uppercase
#make_auth_user_uppercase = 0

# convert authenticated username by regular expression
#make_auth_replace_regex = s/^(.*?)@.*/$1/gmx

# Allow specific hosts to bypass the csrf protection which
# requires a generated token to submit certain post requests,
# for example sending commands. Wildcards are allowed.
csrf_allowed_hosts=127.0.0.1
csrf_allowed_hosts=::1

# Disable the possibility for a user to change his password.
# Only works with htpasswd passwords. To make this work
# you have to set a `htpasswd` entry in the Config Tool section.
disable_user_password_change = 0

# Sets the minimum lenght a password must have for users changing their passwords.
# Admins still can change the password any way they want in the config tool. This
# just affects the user password reset.
user_password_min_length = 5

# maximum memory usage (in MB) after which a
# thruk process will exit after the request
# (fcgid only)
max_process_memory = 1000

######################################
# location of your cgi.cfg
cgi.cfg             = cgi.cfg

######################################
# use trends, shows trend links
use_feature_trends = 1

######################################
# use recurring downtime, shows recurring downtime links
use_feature_recurring_downtime = 1

# set alternative source of host name display. Listed attributes will be tried
# in given order and first non-empty value wins. Custom variables are possible
# ex.: _NAME, name will first try the _NAME custom variable and use the host.name as fallback.
# Useful attributes are ex.: name, alias, address, display_name or custom variables
# NOTE: hosts will always be ordered by host_name
#host_name_source = display_name, name

# set alternative source of service description display. Listed attributes will be tried
# in given order and first non-empty value wins. Custom variables are possible
# ex.: _NAME, description will first try the _NAME custom variable and use the service.description as fallback.
# Useful attributes are ex.: description, display_name or custom variables
# NOTE: services will always be ordered by description
#service_description_source = display_name, description

######################################
# normally passive checks would be marked as disabled.
# with this option, disabled checks will only be displayed as disabled
# if their last result was active
strict_passive_mode = 1

######################################
# 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.
hide_passive_icon = 0

######################################
# hide_top sets the default value for showing/hiding the totals header
# on status pages. It can be set to one of:
# - auto (default) hides header initially on small screens
# - 0              always show header initially
# - 1              always hide header initially
hide_top = auto

######################################
# delay the page delivery until the backends uptime is
# at least this amount of seconds. Displaying pages soon
# after backend restarts displays wrong results and all
# services are pending. Enable this if you experience problems
# with pending services after reloading your backend
# ex.: setting this to 10 would start serving pages 10 seconds
# after the backend reload
delay_pages_after_backend_reload = 0

######################################
# ssl_verify_hostnames can be set to enable / disable hostname verification for https connections. For
# example for the cookie login, https backends or oauth requests. It is not recommended
# to disabled hostname verification, set `ssl_ca_path` or `ssl_ca_file` instead.
ssl_verify_hostnames=1

# ssl_ca_path set path to your certificates. Either set ssl_ca_path or ssl_ca_file.
# Not both. Defaults to `ssl_ca_file = Mozilla::CA::SSL_ca_file()` if Mozilla::CA perl
# module is installed or `ssl_ca_path = '/etc/ssl/certs'` otherwise.
#ssl_ca_path =

# ssl_ca_file set path to your ca store.
#ssl_ca_file =

######################################
# start page
# add a custom start page which will be displayed instead of the useless page
# with version information.
#start_page = /thruk/main.html

######################################
# target of the link when clicking on main logos
#home_link = https://www.thruk.org

######################################
# how the link is opened when clicking on main logos
#home_link_target = _blank

######################################
# target of the docs link, you may add your monitoring
# documenation here
# use a blank value to remove the docs link
#documentation_link = /thruk/docs/index.html

######################################
# customized link for all problems
#all_problems_link = /thruk/cgi-bin/status.cgi?style=combined&amp;hst_s0_hoststatustypes=4&amp;hst_s0_servicestatustypes=31&amp;hst_s0_hostprops=10&amp;hst_s0_serviceprops=0&amp;svc_s0_hoststatustypes=3&amp;svc_s0_servicestatustypes=28&amp;svc_s0_hostprops=10&amp;svc_s0_serviceprops=10&amp;svc_s0_hostprop=2&amp;svc_s0_hostprop=8&amp;title=All+Unhandled+Problems

######################################
# allowed framed links
# which links in addition to the documentation_link
# can be framed by linking to /thruk/frame.html?link=...
#allowed_frame_links = http://my-company/

######################################
# pattern for link targets to specify the target
#link_target = _blank ^https?://cannot-run-in-frame.example.com/bar

######################################
# default service filter
#default_service_filter = service_description_filter

# default main filter
#default_main_filter = contact = $REMOTE_USER$

# exclude some hostgroups from the top 5 list on the "Home" page
# main_exclude_top5_hostgroups =

######################################
# maximum number of allowed search boxes
#maximum_search_boxes = 9

######################################
# search long_plugin_output in default search
#search_long_plugin_output = 1

######################################
# themes
default_theme      = Light
default_theme_dark = Dark

######################################
# path used for cookies. Do not change unless you have weird url rewrites which
# breaks setting cookies.
#cookie_path = /

######################################
# sets all cookies with secure=1 if enabled.
#cookie_secure_only = 1

######################################
# temporary directory, used for template cache...
#tmp_path = /tmp

######################################
# var directory, used to store user settings
#var_path = ./var

######################################
# mode used when creating or saving files
#mode_file = 0660
#mode_dir  = 0770

######################################
# files owners for new / changed files
#thruk_user=thruk
#thruk_group=thruk

######################################
# server side includes
#ssi_path = ssi/

######################################
# path to your plugins
# see documentation for further steps if
# you change the plugin path
#plugin_path = plugins/

######################################
# url to fetch new plugins from
#plugin_registry_url = https://api.thruk.org/v1/plugin/list.json

######################################
# path to your themes
# see documentation for further steps if
# you change the themes path
#themes_path = themes/

######################################
# custom templates
#user_template_path = ./my_templates

######################################
# log4perl config
#log4perl_conf = ./log4perl.conf

######################################
# verbosity / debug level
# same as setting THRUK_VERBOSE environment.
# 0 = info / warnings (default)
# 1 = verbose
# 2 = debug
# 3 = enables performance debug output for each request (same as THRUK_PERFORMANCE_DEBUG=3 in env)
# 4 = trace
#thruk_verbose = 0

# enable author tweaks
# same as setting THRUK_AUTHOR environment.
# Only required for development, disables caches, enables template strict mode and more.
#thruk_author = 0

# if a page takes longer to render than this amount of seonds, a
# profile will be logged. Set to 0 to disable logging completely.
#slow_page_log_threshold = 30

# set level of machine information send in bug reports.
# prod: contains release information (default)
# full: contains uname and release information
# none: no information
#machine_debug_info = prod

######################################
# audit log settings
#<audit_logs>
#    #logfile         = /var/log/audit/thruk-%Y.%m.%d.log  # if set, audit log will be appended to this file. strftime format can used in the filename.
#    login            = 1    # log if user logs in
#    logout           = 1    # log if user logs out
#    session          = 0    # session creation / cleanup
#    external_command = 1    # log external commands
#    configtool       = 1    # log changes made with the config tool
#</audit_logs>

######################################
# use paged data instead of all data in one huge page
# the * sets the default selected paging size
paging_steps          = *100, 500, 1000, 5000, all

# paging for groups pages has different size
group_paging_overview = *3,  10, 100, all
group_paging_summary  = *10, 50, 100, all
group_paging_grid     = *5,  10, 50,  all

# cut off objects on problems page, set 0 to disable limit completely.
problems_limit = 500

# set default for showing main data table at full size or not.
main_table_full = 0

######################################
# status page
# 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
show_long_plugin_output = popup

# color complete status line with status colour or just the status
# itself.
status_color_background = 0

# show number of notifications on the status details page
show_notification_number = 1

# show links to config tool for each host / service
# you need to have the config tool plugin enabled
# and you need sufficient permissions for the link to appear
show_config_edit_buttons = 0

# display the backend/site name in the status details table
show_backends_in_table=0

# list of default columns on host details page.
# determines which columns and the order of the displayed columns.
# rename columns with column1,column2:name,...
#default_host_columns = name,state,last_check,duration,plugin_output

# list of default columns on service details page.
# determines which columns and the order of the displayed columns.
# rename columns with column1,column2:name,...
#default_service_columns = host_name,description,state,last_check,duration,current_attempt,plugin_output

# list of default columns on service overview page.
#default_overview_columns = name,state,services,actions

# list of default columns on service grid page.
#default_grid_columns = name,state,actions

# show additional logout button next to the top right preferences button.
# (works only together with cookie authentication)
#show_logout_button=1

# Change url of logout link. Might be useful in combination with oauth.
#logout_link=/thruk/cgi-bin/login.cgi?logout

# for historical reasons (there was no explicit admin role in the past) any user with both, the
# - authorized_for_system_commands and
# - authorized_for_configuration_information
# gains the full admin role as well. This behaviour can be disabled
# with this admin_role_from_system_and_conf switch. This is deprecated
# and the default will change in a future release.
admin_role_from_system_and_conf = 1

# 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 a general resource_file
# option.
# See the next option.
# 0 = off, don't show the command line at all
# 1 = show them for all with the role: authorized_for_configuration_information
# 2 = show them for everyone
show_full_commandline = 1

# Replace pattern for expanded command lines. Could be used to replace
# sensitive information from beeing displayed in the gui.
# The pattern is a simple perl regular substitute expression in the form of
# /pattern/replacement/
#commandline_obfuscate_pattern = /(\-\-password=")[^"]*(")/$1"***"$2/

# 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'.
show_full_commandline_source = check_command

# Set a general resource file.
# Be warned: if any macros contain sensitive data like passwords, setting
# this option could expose that data to unauthorized user. It is strongly
# recommended that this option is only used if no passwords are used in
# this file or in combination with the 'expand_user_macros' option which
# will limit which macros are exposed to the user.
# Instead of using a general resource_file, you could define one file
# per peer in your peer config.
#
#resource_file = path_to_your/resource.cfg

# enable 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'.
perf_bar_mode = match

# show pnp popup if performance data are available and
# pnp is used as graph engine.
perf_bar_pnp_popup = 1

# show inline pnp graph if available
# if a service or host has a pnp4nagios action url set
# thruk will show a inline graph on the extinfo page
shown_inline_pnp = 1

# 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.
# examples:
#  for graphite:   /render/
#graph_word =


# graph_replace is another regular expression to rewrite special characters
# in the url. For example graphite requires all non-word characters replaced
# by underscores while graphios needs spaces removed too. You can use this
# setting multiple times.
# examples:
#  for pnp4nagios:
#  for graphite:   s/[^\w\-]/_/gmx
#  for graphios:   s/\s//gmx
#graph_replace = s/[^\w\-]/_/gmx

# the http_backend_reverse_proxy will proxy requests for pnp or grafana action_urls via the
# http backend if possible. This only works for http backends and if cookie auth is enabled.
# Can be used to proxy thruk nodes (experimental).
# Possible options:
# disabled: 0
# enabled:  1
#http_backend_reverse_proxy = 1


# 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*
# To show a host custom variable for services too, prepend
# _HOST, ex.:  _HOSTVAR1. To show all host variables, use
# wildcards like _HOST*
# Host variables are only used with HOST*, not by * alone.
#show_custom_vars = _VAR1
#show_custom_vars = _VAR2

# expose custom vars sets a list of custom variables
# which is safe for all users/contacts to view.
# They will be used in filtering and column selection
# as well as in json result sets. Basically they will
# be handled the same way as `show_custom_vars` except they
# will not be displayed automatically.
# Syntax is the same as `show_custom_vars`.
#expose_custom_vars = _VAR1



# Expand user macros ($USERx$) for host / service
# commands and custom variables.
# Can be specified more than once to define multiple
# user macros to expand.
# Be warned: some user macros can contain passwords
# and expanding them could expose them to unauthorized
# users.
# Use * as wildcard, ex.: USER*
#
#Defaults to 'ALL' which means all user macros are expanded, because
#its limited to admin users anyway.
#expand_user_macros = USER1
#expand_user_macros = USER10-20
#expand_user_macros = PLUGIN*
#expand_user_macros = ALL  # expands all user macros
#expand_user_macros = NONE # do not expand user macros


# show if a host / service has modified attributes.
show_modified_attributes = 1

# show host / service contacts (if user has configuration_information role)
show_contacts = 1

######################################
# seconds after which the "is_executing" icons disappear
#is_executing_timeout = 5

# Show check attempts for hosts too. The default is to show
# them on the problems page only. Use this value to force a value.
#show_host_attempts = 1

# replace pattern with links, ex.: in plugin output, comments and downtimes.
# syntax is: | regex pattern | [link name](link target) |
#short_link = |(INC\d+)|[$1](https://tickets.company.com/ticket/$1)|
#short_link = |GH#(\d+)|[Issue $1](https://github.com/sni/thruk/issues/$1)|

# replace copy/paste pattern with clickable links, ex.: in plugin output, comments and downtimes.
#copy_paste_link = (run command: )(.*?)( \\))

######################################
# Command Settings
# 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.
can_submit_commands = 1

# disable some commands completely
# you can use ranges here, ex.: 5,10-47,99
# if you only want to allow a few commands, use `command_enabled` instead.
#command_disabled = 14 # shutdown
#command_disabled = 35 # start executing service checks
#command_disabled = 36 # stop executing service checks
#command_disabled = 88 # start executing host checks
#command_disabled = 89 # stop executing host checks

# enable only specific commands
# if set, all commands except these are not allowed.
#command_enabled = 1-4         # allow adding and removing comments
#command_enabled = 33,34,51,52 # allow acknowledgments
#command_enabled = 55,56,78,79 # allow downtimes

# default states for commands option checkboxes
<cmd_defaults>
    ahas                   = 0  # For Hosts Too
    broadcast_notification = 0  # Broadcast
    force_check            = 0  # Forced Check
    force_notification     = 0  # Forced Notification
    send_notification      = 1  # Send Notification
    sticky_ack             = 1  # Sticky Acknowledgement
    comment                = "" # Default comment
    persistent_comments    = 1  # Persistent Comments
    persistent_ack         = 0  # Persistent Acknowledgement Comments
    ptc                    = 0  # For Child Hosts Too
    use_expire             = 0  # Use expire for acknowledgements (for cores which support this)
    childoptions           = 0  # 0 = Do nothing with child hosts, 1 = Triggered downtime for all child hosts, 2 = Non-triggered downtime for all childs
    hostserviceoptions     = 0  # 0 = Do nothing with services, 1 = Schedule downtime for all services
</cmd_defaults>

# configure which commands should be available as quick status commands
<cmd_quick_status>
    default                = "reschedule next check"  # text has to match the select text
    reschedule             = 1  # Reschedule next check
    downtime               = 1  # Add/remove downtimes
    comment                = 1  # Add/remove comments
    acknowledgement        = 1  # Add/remove acknowledgements
    active_checks          = 1  # Enable/disable active checks
    notifications          = 1  # Enable/disable notifications
    eventhandler           = 1  # Enable/disable eventhandler
    submit_result          = 1  # Submit passive check result
    reset_attributes       = 1  # Reset modified attributes
</cmd_quick_status>

# force acknowledgments to be sticky
force_sticky_ack           = 0

# force notification to be sent on acknowledgement
force_send_notification    = 0

# force comments on acknowledgements to be persistent
force_persistent_ack       = 0

# for regular comments to be persistent
force_persistent_comments  = 0

# default duration of new downtimes
downtime_duration   = 7200

# maximum duration of new downtimes. Use quantifiers like d=days, w=weeks,
# y=years to set human readable values. Default is unlimited.
#downtime_max_duration = 4w

# show expire acknowledgement form
has_expire_acks = 1

# default duration of acknowledgements with expire date
expire_ack_duration = 86400

# command alias can be used for agent based checks, where the active agent
# check should be rescheduled instead of the passive check.
# Have a look at the documentation for a detailed description.
#command_reschedule_alias = servicename_or_commandname_pattern;agent_service_name

######################################
## If set to 1, the user has to enter a comment for all disable active checks /
## disable notifications / disable event handler commands.
#require_comments_for_disable_cmds = 0

######################################
# Time Format Settings
datetime_format        = %Y-%m-%d  %H:%M:%S
datetime_format_today  = %H:%M:%S
datetime_format_long   = %a %b %e %H:%M:%S %Z %Y
datetime_format_log    = %B %d, %Y  %H
datetime_format_trends = %a %b %e %H:%M:%S %Y

#####################################
# default state order from worse to good used in business processes and
# panorama dashboards
default_state_order = down, unreachable, \
                      unknown, critical, warning, \
                      acknowledged_down, acknowledged_unreachable, \
                      acknowledged_unknown, acknowledged_critical, acknowledged_warning, \
                      downtime_down, downtime_unreachable, \
                      downtime_unknown, downtime_critical, downtime_warning, downtime_up, downtime_ok, \
                      up, ok, downtime_pending, pending

#####################################
# This one activates all problem/impact and criticity
# features. Currently it will only work with shinken
# backends. Dont enable it unless all your backends are shinken.
# If not set, it will be automatically enabled when using only
# shinken backends.
#enable_shinken_features = 0

# configure names for the priorities of your hosts / services
# this is a shinken specific feature only (criticity)
#<priorities>
#  5   = Business Critical
#  4   = Top Production
#  3   = Production
#  2   = Standard
#  1   = Testing
#  0   = Development
#</priorities>

#####################################
# This one activates all icinga specific features
# When not set, Thruk will try to autodetect the core,
# but this currently only works within OMD.
#enable_icinga_features = 0

#####################################
# Apache Status
# You can integrate the output of apache status into Thruk.
# The following list of apache status pages will be accessible
# from the performance info page.
<apache_status>
    # Site        http://127.0.0.1:5000/server-status
    # System      http://127.0.0.1/server-status
    # Other       http://127.0.0.1/server-status
</apache_status>

#####################################
# cron settings
# Specifiy a file which is then completely under the control of Thruk.
# It will be used to store cronjobs, ex. for reports. The file has to
# be writable by Thruk.
cron_file          = /tmp/thruk_cron.tmp

# The pre edit cmd can be used to do run a command just before thruk
# will edit the crontab.
cron_pre_edit_cmd  = /usr/bin/crontab -l > /tmp/thruk_cron.tmp

# The post edit cmd is necessary for OMD where you need to reload the
# crontab after editing.
cron_post_edit_cmd = /usr/bin/crontab /tmp/thruk_cron.tmp && rm -f /tmp/thruk_cron.tmp

#####################################
# path setting
# Path to your thruk executable. Will be used in cronjobs.
#thruk_bin = /usr/bin/thruk

# Path to your thruk init script. Will be used to restart thruk.
#thruk_init = /etc/init.d/thruk

# Set first day of week. Used in reports.
# Sunday: 0
# Monday: 1
#first_day_of_week = 1

# 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.
# report_use_temp_files = 14

# Don't create reports with more hosts / services than this number.
# The purpose is to don't wrack the server due to extended memory
# usage. Increase this number if you hit that limit and have plenty
# of memory left.
# report_max_objects = 1000

# Include messages with class = 2 (program messages) in reports.
# Setting this to 0 allows the MySQL backend to use indexes efficiently
# 0 = off
# 1 = auto (default)
# 2 = on
# report_include_class2 = 1

# Should thruk update the logcache databases before running reports?
# Setting this to 0 reduces the time taken to run reports but the most
# recent data is not necessarily available.  If you use this option
# you should probably create a cron to run "thruk logcache update"
# report_update_logcache = 1

#####################################
# Waiting is a livestatus feature. When enabled, Thruk will wait
# after rescheduling hosts/services checks until the
# check has been really executed up to a maximum of 20 seconds.
use_wait_feature = 1

# Amount of seconds to wait until a rescheduled check finishes. Thruk
# will wait this amount and display the result immediately.
wait_timeout = 10

#####################################
# set initial menu state.
# closed => 0
# open   => 1
<initial_menu_state>
    General        = 1
    Current_Status = 1
    Reports        = 0
    System         = 0
    Bookmarks      = 0
</initial_menu_state>

#####################################
# bug reporting
# show link to bug reports when internal errors occur.
# set to 'server' to log js error server side. Set to 'both'
# to show the error icon and log it on the server.
show_error_reports = both

# don't report some known harmless javascript errors
skip_js_errors  = cluetip is not a function

# what email address bug reports will be sent to
#bug_email_rcpt = bugs@thruk.org

######################################
# COOKIE AUTH
# cookie auth requires additional webserver settings, see the documentation
# for detailed instructions.
cookie_auth_login_url             = thruk/cgi-bin/login.cgi
cookie_auth_restricted_url        = http://localhost/thruk/cgi-bin/restricted.cgi
cookie_auth_session_timeout       = 604800
cookie_auth_session_cache_timeout = 30
cookie_auth_session_cache_fail_timeout = 30
cookie_auth_login_timeout         = 10
#cookie_auth_domain               = .domain.com
#cookie_auth_login_hook           = ./bin/hook.sh
# make thruk_auth script more verbose. warning: passwords may end up in your logs if set higher than 2.
cookie_auth_verbose               = 0

# disable account after this number of failed login attempts. This feature will be disabled if set to zero.
cookie_auth_disable_after_failed_logins = 10

# error message when account is locked, may contain html
locked_message                    = account is locked, please contact an administrator

######################################
# OAUTH
# show basic auth login mask next to oauth logins
#basic_auth_enabled               = 1

# oauth configuration block (can have multiple provider)
#<auth_oauth>
#  <provider name>
#    login         = "Login with OAuth"
#    client_id     = <required>
#    client_secret = <required>
#    scopes        = openid profile email
#    auth_url      = https://oauthserver/oauth2/v1/authorize
#    token_url     = https://oauthserver/oauth2/v1/token
#    api_url       = https://oauthserver/oauth2/v1/userinfo
#    login_field   = login
#    # https_proxy   = http://<server>:<port> # optional
#  </provider>
#</auth_oauth>

######################################
# Add a Internet Explorer (IE) compatibility header to the html header.
#useragentcompat                  = edge

######################################
# LMD - livestatus multitool daemon
# enable lmd cache handling the backend connections.
# LMD handles all backend connections in a separate process
# which will be started automatically with thruk if enabled.

# Enable lmd connection handling. Set to 1 to enable.
#use_lmd_core=0

# path to lmd binary
#lmd_core_bin=/usr/local/go/src/github.com/sni/lmd/lmd/lmd

# path to lmd configuration
#lmd_core_config=/etc/thruk/lmd.ini

# thruk waits this timeout for lmd to respond, otherwise it gets killed and restarted.
# set to 0 to turn off automatic restarts (it will still be started if it is not running).
#lmd_timeout=15

# set some extra command line options when starting lmd.
#lmd_options=

# use existing lmd process from this address.
#lmd_remote=localhost:3333

######################################
# CLUSTERING
# Set to 1 to enable cluster features or 0 for single node setups.
#cluster_enabled = 0

# Define generic url pattern to connect all cluster nodes. Each
# cluster node must be available on the given address.
# 3 variables will be replaced to make this url generic:
#  - $hostname$:   hostname from `hostname`
#  - $url_prefix$: contains the url prefix from `url_prefix`
#  - $proto$:      contains autodetected http/https protocol
#                  (autodetect only works with OMD)
# when having a fixed number of cluster nodes, set multiple
# cluster_nodes with fixed hostnames instead of the generic url.
#cluster_nodes = http://$hostname$/$url_prefix$/

# Set timeout after which a node is removed from the cluster.
#cluster_node_stale_timeout = 120

######################################
# BACKENDS
# set logging of backend in verbose mode. This only
# makes sense when debug logging is activated
#backend_debug = 0

# use connection pool when accessing multiple sites.
# Increases the performance because backends will be queried
# parallel but uses around 50mb of memory per pool member.
# Disabled when set to 0. (experimental feature)
#connection_pool_size = 0

######################################
# Enables caching logfiles for faster access. Cache supports MongoDB
# and Mysql. Format is a connection string like 'mysql://hostname:port/db'.
# Using a cache dramatically decreases cpu and memory usage of Thruk
# when accessing logfiles, for example when creating reports.
#logcache=mysql://hostname:port/thruk_logs

# Define filter which prevents the logcache from overgrowing with useless
# log messages. Since the main reason for the logcache are availability reports
# it is ok to remove some entries. Can be used multiple times.
#logcache_import_exclude = "Warning: Passive check result was received for"

# This option enables/disables the delta updates of the logcache whenever somebody
# opens a page which requires logfiles, ex.: the showlog page. This improves
# the responsiveness of the page but you miss the latest log entries since the
# last manual update.
#logcache_delta_updates = 0

# When having multiple sites, you can change the number of parallel updates
# with the logcache_worker option.
#logcache_worker = auto

# Default duration when running `thruk logcache clean`.
#logcache_clean_duration = 2y

# Default duration when running `thruk logcache compact`. Compact removes
# duplicate alerts having the same state. It also removes basically everything
# not required for sla reports and keeps a few extras like notifications.
#logcache_compact_duration = 10w

# Define wether logcache will be bypassed if the start / end time of a log querys
# is outside the range of the cache.
# 0 = never, only use cached logs and return empty result if outside cached range (default)
# 1 = partially, bypass logcache if start and end are outside cache range, otherwise return partialy result
# 2 = always, bypass logcache if either start or end are outside the cache range
#logcache_auto_bypass = 0

# The import command replaces the builtin logcache update with an external
# script which is then responsible for updating the logcache database.
# This might be useful if you pull the logfiles from a ndo/ido database
# and then manually import those files.
# There are some useful enviromenet variables set before the script is started:
# REMOTE_USER contains the current user.
# THRUK_BACKENDS is a semicolon separated list of the selected backends.
# THRUK_LOGCACHE is the connection string to the thruk logcache database.
# THRUK_LOGCACHE_MODE is either 'import' on first initial import or 'update' for further consecutive updates.
#logcache_import_command = .../importscript.sh

# The fetchlogs command is very similar to the `logcache_import_command` but it
# replaces only the the fetching logs part from the bultin logcache.
# This script should return the plain text logfiles on stdout.
# This might be useful if you pull the logfiles from a ndo/ido database.
# There are some useful enviromenet variables set before the script is started:
# REMOTE_USER contains the current user.
# THRUK_BACKEND  is a the id of the backends to import.
# THRUK_LOGCACHE_START is start date to fetch
# THRUK_LOGCACHE_END   is the end date to fetch
# THRUK_LOGCACHE_LIMIT is the optional limit of logfiles to fetch
#logcache_fetchlogs_command = .../fetchlogsscript.sh

######################################
# 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' panel will be selected in 'auto' mode.
# With more than 100 backends, the 'tree' panel will be selected in 'auto' mode.
# Set sitepanel to list/compact/collapsed/tree/auto/off to change the default behaviour.
#sitepanel=auto

######################################
# API settings

# Using api keys can be disabled by setting this to 0.
# Note: this value cannot be overriden on a per user/group basis because
# it is used on pre-authentication stage.
#api_keys_enabled = 1

# Limit amount of keys a user may create, set to 0 to disable creating new keys completely
#max_api_keys_per_user = 10

######################################
# Backend Configuration, enter your backends here
<Component Thruk::Backend>
#    <peer>
#        name   = Local Naemon
#        type   = livestatus
#        hidden = 1             # make this backend hidden by default
#        groups = admins        # make this backend only visible to the admin group
#        <options>
#            peer          = /tmp/livestatus.socket
#            resource_file = path_to_your/resource.cfg
#       </options>
#       <configtool>
#            core_conf      = /etc/naemon/naemon.cfg
#            obj_check_cmd  = /etc/init.d/naemon checkconfig
#            obj_reload_cmd = /etc/init.d/naemon reload
#       </configtool>
#    </peer>
#    <peer>
#        name   = External Naemon
#        type   = livestatus
#        <options>
#            peer    = 172.16.0.1:9999
#       </options>
#    </peer>
#    <peer>
#        name   = External Icinga
#        type   = livestatus
#        <options>
#            peer    = 172.16.0.2:9999
#       </options>
#    </peer>
#    <peer>
#        name   = External Shinken
#        type   = livestatus
#        <options>
#            peer    = 127.0.0.01:50000
#       </options>
#    </peer>
#   <peer>
#       name   = Another Thruk
#       type   = http
#       <options>
#           peer        = http://172.16.0.4/thruk/
#           auth        = secret_key_from_remote_instance
#      </options>
#   </peer>
</Component>


######################################
# PLUGINS
######################################

######################################
# CONFIG TOOL
# enable config tool by setting path to different components
# config files. Users with the roles
# authorized_for_configuration_information and authorized_for_system_commands
# will then have access to the config tool.
<Component Thruk::Plugin::ConfigTool>
    show_plugin_syntax_helper = 1

    thruk    = ./thruk_local.conf
    cgi.cfg  = ./cgi.cfg
    #htpasswd = ./htpasswd

    #pre_obj_save_cmd    =
    #post_obj_save_cmd   =
    #git_base_dir        =
    #show_summary_prompt = 1

    #extra_custom_var_host    = _WORKER
    #extra_custom_var_service = _WORKER, _SNMP_COMMUNITY

    #obj_readonly        = /templates/

    # default_keys_host     = host_name use:host-pnp,generic-host alias address contact_groups:example
    # default_keys_service  = service_description use:srv-pnp,generic-service host_name check_command contact_groups
    # default_keys_contact  = contact_name use:generic-contact alias email can_submit_commands
</Component>

######################################
# PANORAMA
<Component Thruk::Plugin::Panorama>
    # Can be a list (comma seperated) of
    # (public) dashboards which will be
    # used as default view if the user has not set
    # its own view already.
    #default_dashboard = <nr>

    # make panels, tabs and dashboard readonly.
    # users will not be able to change, resize or add
    # panels.
    #readonly = 0

    # full page reload every 3 hours to prevent memory
    # leaks. Disabled when set to 0.
    full_reload_interval = 10800

    # set start number for new files
    new_files_start_at = 1

    # default state order from worse to good, use this to override globale default_state_order
    #default_state_order = down, unreachable, ...

    #default_maintenance_text = "this dashboard is currently in maintenance mode"

    # default start for new geo maps (lon,lat)
    geo_map_default_center = 13.74,47.77
    geo_map_default_zoom   = 5

    # wms provider serve map tile data for geo maps according to
    # http://dev.openlayers.org/docs/files/OpenLayers/Layer/WMS-js.html#OpenLayers.Layer.WMS.OpenLayers.Layer.WMS
    # find more wms provider here: http://wiki.openstreetmap.org/wiki/WMS#OSM_WMS_Servers
    wms_provider = Open Street Map   = ["https://maps.thruk.org/service?", {"layers": "osm", "format": "image/png"}, { "attribution": "&copy; OpenStreetMap <a href='http://www.openstreetmap.org/copyright/en' target='_blank'>contributors<a>", "numZoomLevels": 20 }]
</Component>

######################################
# REPORTS 2
<Component Thruk::Plugin::Reports2>
    # execute regular scheduled reports with this nice level
    #report_nice_level = 5

    # maximum number of running reports at a time
    #max_concurrent_reports = 2

    # url used to replace relative links in html reports
    #report_base_url=http://host.local/thruk/cgi-bin/

    # pnp export script is used to export pnp graphs into reports
    #pnp_export = /path/to/pnp_export.sh

    # set the from address used in e-mail reports
    #report_from_email = User Name <example@mail.com>

    # force the subject of emailed reports to start with string
    #report_subject_prepend = URGENT REPORT:

    # set arbitrary headers used in e-mail reports
    #<default_mail_headers>
    #   Reply-To = some_other_address
    #</default_mail_headers>

    # set the way the mail will be send out (see MIME::Lite module: https://metacpan.org/pod/MIME::Lite#send)
    #mail_type = smtp

    # pass some arguments for the send type (smtp host, auth....)
    # might have different config format (scalar, hash ...)
    # take care of order!
    #mail_args = smtp_host_ip_or_name
    #<mail_named_args>
    #   AuthUser = user
    #   AuthPass = pass
    #</mail_named_args>

    # set the default template used for new reports
    #default_template = sla_report.tt
</Component>

#####################################
# MINEMAP
<Component Thruk::Plugin::Minemap>
    # you may change the default minemap link here
    #default_link = /thruk/cgi-bin/minemap.cgi
</Component>

#####################################
# Business Process
<Component Thruk::Plugin::BP>
    # Results will be send back by using the spool folder.
    # This folder should point to the 'check_result_path' of your core.
    #spool_dir = /var/naemon/rw/check_results

    # as alternative to the spool_dir, a livestatus connection can be used
    # to send results to the core.
    #result_backend = sitename

    # Save objects to this file. Content will be overwritten.
    #objects_save_file = /etc/naemon/conf.d/thruk_bp_generated.cfg

    # Save format can be either 'nagios' or 'icinga2'.
    #objects_save_format = nagios

    # User maintained file containing templates used for business process services.
    #objects_templates_file = /etc/naemon/conf.d/thruk_templates.cfg

    # Command to apply changes to the objects_save_file. If not set and
    # and result_backend is used, the restart will be triggered as external command.
    #objects_reload_cmd = /etc/init.d/naemon reload

    # hooks which will be executed before or after saving a single bp.
    #pre_save_cmd   =
    #post_save_cmd  =

    # global hooks
    #post_refresh_cmd =

    # Refresh interval defines how often business processes
    # will be recalculated and refreshed. (in minutes).
    # Set to zero to disable automatic bp calculations.
    #refresh_interval = 1

    # Favorite custom function will be displayed on the 'Type' tab
    # so you don't have to select custom first. Syntax is <name>;<function>
    #favorite_custom_function = echo ; echo_function

    # Worker
    # increase the number of parallel bp calculations
    # Set to zero to disable automatic bp calculations.
    #worker = 5

    # Offline Backends
    # in case of multiple backends, set the grace period
    # to wait until a backend is considered offline.
    #offline_grace_time = 180

    # How to handle offline backends (0 = do nothing, 1 = calculation normally after grace time, 2 = set all bps to unknown)
    #offline_handling=1

    # Default filter
    # add filter to all business processes, can be set multiple times
    #default_filter = add_recursive_output_filter

    # default state order from worse to good, use this to override globale default_state_order
    #default_state_order = down, unreachable, ...

    # Set downtime/acknowledgement for business process if all child nodes are in downtime/acknowledged
    # valid values are: 0 - disabled, 1 - display only, 2 - set downtime/acknowledgement by external command
    # (sync does not work in combination with spool_dir)
    #sync_downtime_ack_state = 1

    # read_only
    # make all business processes readonly
    #read_only = 1
</Component>

#####################################
# Action Menus
#action_menu_items_folder = ./action_menus/

<action_menu_items>
    #hostmenu = {\
    #   "icon": "/thruk/themes/{{theme}}/images/dropdown.png",\
    #   "title": "Host Menu",\
    #   "menu": [\
    #       {\
    #           "icon": "/thruk/themes/{{theme}}/images/page_white_text.png",\
    #           "label": "Example Link",\
    #           "action": "https://example.org",\
    #           "target": "_blank"\
    #       },\
    #       "-",\
    #       {\
    #           "icon": "fa-solid fa-rotate",\
    #           "label": "Refresh",\
    #           "action": "server://refresh/$HOSTNAME$",\
    #           "target": "_blank"\
    #       },\
    #   ]\
    #}
    #servicemenu = {\
    #   "icon": "/thruk/themes/{{theme}}/images/dropdown.png",\
    #   "title": "Service Menu",\
    #   "menu": [\
    #       {\
    #           "icon": "/thruk/themes/{{theme}}/images/logo_thruk_small.png",\
    #           "label": "Example Link",\
    #           "action": "https://example.org",\
    #           "target": "_blank"\
    #       },\
    #       "-",\
    #       {\
    #           "icon": "fa-solid fa-rotate",\
    #           "label": "Refresh",\
    #           "action": "server://refresh/$HOSTNAME/$SERVICEDESC$",\
    #           "target": "_blank"\
    #       },\
    #   ]\
    #}
</action_menu_items>

<action_menu_actions>
    #example   = /usr/local/bin/sample.sh $HOSTNAME$ $SERVICEDESC$ $USER20$
    #refresh   = /usr/local/bin/refresh.sh otherargs
</action_menu_actions>

<action_menu_apply>
    #hostmenu    = .*;$             # matches all hosts only
    #servicemenu = .*;.+$           # matches all services on all hosts
    #specialmenu = ^Host;Service$   # matches an exact service on one host only
    #cpu_menu    = .*;^CPU          # matches all services starting with 'CPU'
    #hostmenu    = ^Host            # matches all hosts starting with 'Host'
    #demomenu    = ^Demo;           # matches all services on the 'Demo' host
    #demomenu    = ^Test;           # a menu name can be used multiple times
</action_menu_apply>
