#===============================================================================
# BROKER
#===============================================================================
# Description: The broker is responsible for:
# - Exporting centralized logs of all Shinken daemon processes
# - Exporting status data
# - Exporting performance data
# - Exposing Shinken APIs:
# - Status data
# - Performance data
# - Command interface
#===============================================================================
define broker {
#========== Daemon name and address ==========================================================
# Daemon name. Must be unique
broker_name broker-master
# IP/fqdn of this daemon (note: you MUST change it by the real ip/fqdn of this server)
address localhost
# Port (HTTP/HTTPS) exposed by this daemon
port 7772
# 0 = use HTTP, 1 = use HTTPS
use_ssl 0
#BROKER
#===============================================================================
# Description: The broker is responsible for:
# - Exporting centralized logs of all Shinken daemon processes
# - Exporting status data
# - Exporting performance data
# - Exposing Shinken APIs:
# - Status data
# - Performance data
# - Command interface
#========================================= Master or spare selection =========
# 1 = is a spare, 0 = is not a spare
spare 0
# spare_daemon: name of the daemon that will take this daemon job if it dies
# IMPORTANT:
# * a spare_daemon can only be the spare of 1 (and only one) master daemon============================
define broker {
# Shinken Enterprise. Lines added by import core. Do not remove it, it's used by Shinken Enterprise to update your objects if you re-import them.
_SE_UUID core-broker-060340145ade11e5b703080027f08538
_SE_UUID_HASH 8e00136f9e61061e07ca0f4a63509b68
# End of Shinken Enterprise part
#======== Daemon name and address =========
# Daemon name. *Must a spare_daemon cannot have a spare_daemon
be unique
broker_name # * the spare must have modules with the same module_type than the master broker-master
# Example: spare_daemon broker-spareIP/fqdn of this daemon (note: you MUST change it by the real ip/fqdn of this server)
spare_daemon
address #======== Daemon connection timeout and down state limit =========
# timeout: how manylocalhost
seconds to consider a# node don't answer
timeoutPort (HTTP/HTTPS) exposed by this daemon
port 3
# data_timeout: how many second to consider a configuration transfert to be failed
# because the network brandwith is too small.
data_timeout 7772
# 0 = use HTTP, 1 = use HTTPS
use_ssl 1200
# max_check_attempts: how many fail check to consider this daemon as DEAD
max_check_attempts 3
# Check this daemon every X seconds
check_interval======== Master or spare selection =========
# 1 = is a spare, 0 = is not a spare
spare 0
60
#======== Modules to enable for# spare_daemon: name of the daemon that will take this daemon ========= job if it dies
# AvailableIMPORTANT:
# - Simple-log * a spare_daemon can only be the spare of 1 (and :only saveone) all logs into a common filemaster daemon
# - WebUI * a spare_daemon cannot have a spare_daemon
# * the spare :must visualisationhave interface
modules with the same #module_type -as Graphite-Perfdatathe master
:# save all metrics into a- graphitedepending database
of the value of # - slathe broker__manage_spare__spare_must_have_the_same_list_of_module_type parameter
# Example: spare_daemon : savebroker-spare
sla into a databasespare_daemon
# -1 Livestatus= (default) the spare defined with spare_daemon must have the same module_type :as TCPthis APImaster
to query element state,# used0 by= nagiosthe externalspare toolsmodule_type likeare NagVisnot or Thrukchecked
# - event-manager-writer : save events for events manager (do not forget to activate the module in your webui to see data)
modules broker__manage_spare__spare_must_have_the_same_list_of_module_type 1
#======== Daemon connection timeout and down state limit =========
# timeout: how many seconds to consider a node don't answer
timeout Simple-log, WebUI, Graphite-Perfdata, sla, event-manager-writer
3
#======== Realm and architecture settings =========
# Realm to set this daemon into
realm data_timeout: how many second to consider a configuration transfer to be failed
# because the network bandwidth is too small.
data_timeout All120
# 1 = take data from the daemon realm and its sub realms
max_check_attempts: how many fail check to consider this daemon as DEAD
max_check_attempts # 03
= take data only# fromCheck thethis daemon every realmX seconds
manage_sub_realmscheck_interval 160
# In NATted environments, you declare each satellite ip[:port] as seen by======== Modules to enable for this daemon =========
# Available:
# *this*- brokerWebUI (if port not set, the port declared by satellite itself
# is used)
: #satellitemapVisualisation interface
scheduler-1=1.2.3.4:7768, poller-1=1.2.3.5:7771
#======== Memory protection ========= # - Graphite-Perfdata : Save all metrics into a graphite database
# Are- thesla daemon module process and worker process are waiting for enough
# memory to be available before being launch. Default: 1 (enabled)
broker__manage_brok__enable_sub_processes_memory_usage_protection 1
Save sla into a database
# The- subLivestatus process memory usage protection can have a system reserved memory
# that won't be: TCP API to query element state, used by nagios external thesestools sublike processNagVis whenor launchedThruk
# By default: 0 (no reserved memory)
# Example: 10 (means 10% of the total memory is reserved for the system)
broker__manage_brok__sub_process_memory_usage_system_reserved_memory 0
# If a sub process cannot be started because of the protection, how many seconds
# it will be retry and wait that the system memory is freed until it fail to start
# By default: 5 (seconds)
broker__manage_brok__sub_processes_memory_usage_protection_max_retry_time 5
- broker-module-livedata : REST API to query all monitored element data (host, cluster or check)
# - event-manager-writer : Save events for events manager (do not forget to activate the module in your webui to see data)
# - Simple-log : Save all logs into a common file, Use this module only if you need to have all the check results in one file.
modules WebUI, Graphite-Perfdata, sla, event-manager-writer
#======== Realm Brokand pusherarchitecture workersettings =========
# TheRealm brokerto spawnset broksthis pusherdaemon subinto
process to push torealm external modules (like WebUI)
# the broker will look at this worker execution time, and will kill if it timeout All
# 1 The= brokertake willdata computefrom the averagedaemon executionrealm timeand ofits previoussub workers torealms
# decide0 about= howtake manydata timeonly thisfrom workerthe willdaemon takerealm
based on:
manage_sub_realms # number of broks to send /1
past average send speed (broks/s)
# If this time is reach, it means that the pusher process is killed
# For small amount of broks to send, it should lead to ridicusly small allowed execution time# In NATted environments, you declare each satellite ip[:port] as seen by
# *this* daemon (if port not set, the port declared by satellite itself
# andis theused)
fac to spawn the#satellitemap sub process can be higher than this value, so we are using a minimal
# execution timeout scheduler-1=1.2.3.4:7768, scheduler-2=1.2.3.5:7771
# Exchange between brokers <- schedulers can be limited by packet size (in kB)
# DefaultNote: 5 (second)
broker__manage_brok__sub_process_broks_pusher_min_execution_timeout 5
as compression is automatic, this is a higher limit, and in real case the
# In order to manage the fact thatpackets thewill serverbe canlower slowthan downthis duringvalue
this send, you can setup a# broks_packet_size 1024
# ratio that will be used to increase the allowed timeout by multiply it======== Memory protection =========
# Are the daemon module process and worker process are waiting for enough
# memory to be available before being launch. Default: 51 (enabled)
broker__manage_brok__enable_sub_processprocesses_broksmemory_pusher_security_ratiousage_protection 1
# The sub process memory usage protection can have a system reserved 5memory
# Atthat thewon't brokerbe startused withoutby stats,theses thissub valudprocess will be used for the timeoutwhen launched
# By Defaultdefault: 2400 (seconds)
no reserved memory)
# Example: 10 (means 10% of the total memory is reserved for the system)
broker__manage_brok__sub_process_broksmemory_pusherusage_maxsystem_executionreserved_timeoutmemory 2400
# If a sub process reachcannot abe timeout,started itbecause will be killed and relaunched. After max retry,
# the attached module will be restartedof the protection, how many seconds
# it will be retry and wait that the system memory is freed until it fail to start
# DefaultBy default: 5 3(seconds)
broker__manage_brok__sub_processprocesses_memory_broksusage_pusherprotection_max_retry_time 5
3
#======== EnableBrok orpusher notworker this daemon =========
# 1The =broker isspawn enabled,broks 0pusher =sub isprocess disabled
to push to external enabledmodules (like WebUI)
# the broker will look at this worker execution time, and will kill if it 1
}
timeout
# The broker will compute the average execution time of previous workers to
# decide about how many time this worker will take based on:
# number of broks to send / past average send speed (broks/s)
# If this time is reach, it means that the pusher process is killed
# For small amount of broks to send, it should lead to ridiculously small allowed execution time
# and the fac to spawn the sub process can be higher than this value, so we are using a minimal
# execution timeout
# Default: 5 (second)
broker__manage_brok__sub_process_broks_pusher_min_execution_timeout 5
# In order to manage the fact that the server can slow down during this send, you can setup a
# ratio that will be used to increase the allowed timeout by multiply it
# Default: 5
broker__manage_brok__sub_process_broks_pusher_security_ratio 5
# At the broker start without stats, this valid will be used for the timeout
# Default: 240 (seconds)
broker__manage_brok__sub_process_broks_pusher_max_execution_timeout 240
# If a sub process reach a timeout, it will be killed and relaunched. After max retry,
# the attached module will be restarted
# Default: 3
broker__manage_brok__sub_process_broks_pusher_max_retry 3
# broker__manage_brok__sub_process_broks_pusher_queue_batch_size:
# * defines the maximum number of broks the "queue brok pusher"
# process will handle per send to external module ( like WebUI ) .
# * Remaining broks will be handled in next send.
# * IMPORTANT: increase this value can lead to error on the socket
# Default: 100000 (broks/batch)
# broker__manage_brok__sub_process_broks_pusher_queue_batch_size 100000
# Broks whose serialization time exceeds this threshold will generate a warning
# Default: 100 (milliseconds)
# broker__manage_brok__oversized_data_warning_threshold__serialization_time 100
# Broks whose serialization time exceeds this threshold will generate an error
# Default: 500 (milliseconds)
# broker__manage_brok__oversized_data_error_threshold__serialization_time 500
#======== VMWare / ESXi ==========
# 1 (default) = if vmware get the ESXi CPU stats value, 0 = do not get value
vmware__statistics_compute_enable 1
#======== Enable or not this daemon =========
# 1 = is enabled, 0 = is disabled
enabled 1
}
|