Main configuration file (alignak.cfg) options¶
When creating and/or editing configuration files, keep the following in mind:
Lines that start with a
#character are comments that are not processed
Variable names are case-sensitive
If you want to configure a process to use a specific module:
- You must define the module in a xxx.cfg file in the modules directory
- You must reference it in the modules section for that process, e.g. the broker.cfg file
The main configuration file is named
Default used options¶
Cfg dir and Cfg files¶
Those are statements and not parameters. The arbiter considers them as order to open other(s) configuration(s) file(s)
cfg_dir one, the arbiter reads recursively the specified directory and only reads the files ending with ”.cfg”. It does not consider lines into those files as statements anymore (no more
cfg_file are considered in the read files).
Thus, the arbiter handles the main configuration files differently than any other files.
Automatic state retention update interval¶
This setting determines how often (in minutes) that Alignak scheduler will automatically save retention data during normal operation. If you set this value to 0, it will not save retention data at regular intervals, but it will still save retention data before shutting down or restarting. If you have disabled state retention (with the State Retention Option option), this option has no effect.
Maximum Host/Service check spread¶
This option determines the maximum number of minutes from when Alignak starts that all hosts/services (that are scheduled to be regularly checked) are checked. This option will ensure that the initial checks of all hosts/services occur within the timeframe you specify. Default value is 30 (minutes).
Service/Host check timeout¶
This is the maximum number of seconds that Alignak will allow service/host checks to run. If checks exceed this limit, they are killed and a CRITICAL state is returned. A timeout error will also be logged.
There is often widespread confusion as to what this option really does. It is meant to be used as a last ditch mechanism to kill off plugins which are misbehaving and not exiting in a timely manner. It should be set to something high (like 60 seconds or more), so that each check normally finishes executing within this time limit. If a check runs longer than this limit, Alignak will kill it off thinking it is a runaway processes.
Timeout exit status¶
State set by Alignak in case of timeout. The value is a state identifier, thus:
- 0: OK/UP
- 1: WARNING/UNREACHABLE
- 2: CRITICAL/DOWN
- 3: UNKNOWN
This option is used to set the history size of states keep by the scheduler to make the flapping calculation. By default, the value is 20 states kept.
The size in memory is for the scheduler daemon : 4Bytes * flap_history * (nb hosts + nb services). For a big environment, it costs 4 * 20 * (1000+10000) - 900Ko. So you can raise it to higher value if you want. To have more information about flapping, you can read this.
Maximum plugins output length¶
This option is used to set the max size in bytes for the checks plugins output. So if you have some truncated output like for huge disk check when you have a lot of partitions, increase this value.
Enable problem/impacts states change¶
This option is used to know if we apply or not the state change when a host or service is impacted by a root problem (like the service’s host going down or a host’s parent being down too). The state will be changed by UNKNONW for a service and UNREACHABLE for a host until their next schedule check. This state change do not count as a attempt, it’s just for console so the users know that theses objects got problems and the previous states are not sure.
Disable old nagios parameters whining¶
If 1, disable all notice and warning messages when the Arbiter is checking the configuration.
use_timezone=<tz from tz database>
This option allows you to override the default timezone that this instance of Alignak runs in. Useful if you have multiple instances of Alignak that need to run from the same server, but have different local times associated with them. If not specified, Alignak will use the system configured timezone.
Environment macros option¶
This option determines whether or not the Alignak daemon will make all standard macros available as environment variables to your check, notification, event hander, etc. commands. In large installations this can be problematic because it takes additional CPU to compute the values of all macros and make them available to the environment. It also costs an increased network communication between schedulers and pollers.
- 0 = Don’t make macros available as environment variables
- 1 = Make macros available as environment variables
Initial states logging option¶
This variable determines whether or not Alignak will force all initial host and service states to be logged, even if they result in an OK state. Initial service and host states are normally only logged when there is a problem on the first check. Enabling this option is useful if you are using an application that scans the log file to determine long-term state statistics for services and hosts.
- 0 = Don’t log initial states
- 1 = Log initial states
Notification logging option¶
This variable determines whether or not notification messages are logged. If you have a lot of contacts or regular service failures your log file will grow (let say some Mo by day for a huge configuration, so it’s quite OK for nearly every one to log them). Use this option to keep contact notifications from being logged.
- 0 = Don’t log notifications
- 1 = Log notifications
Service/Host check retry logging option¶
This variable determines whether or not service/host check retries are logged. Service check retries occur when a service check results in a non-OK state, but you have configured Alignak to retry the service more than once before responding to the error. Services in this situation are considered to be in “soft” states. Logging service check retries is mostly useful when attempting to debug Alignak or test out service/host event handlers.
- 0 = Don’t log service/host check retries (default)
- 1 = Log service/host check retries
Event handlers logging option¶
This variable determines whether or not service and host event handlers are logged. Event handlers are optional commands that can be run whenever a service or hosts changes state. Logging event handlers is most useful when debugging Alignak or first trying out your event handler scripts.
- 0 = Don’t log event handlers
- 1 = Log event handlers
External commands logging option¶
This variable determines whether or not Alignak will log external commands that it receives.
- 0 = Don’t log external commands
- 1 = Log external commands (default)
Passive checks logging option¶
This variable determines whether or not Alignak will log passive host and service checks that it receives.
- 0 = Don’t log passive checks
- 1 = Log passive checks (default)
Active checks logging option¶
This variable determines whether or not Alignak will log active host and service checks that it runs.
- 0 = Don’t log active checks (default)
- 1 = Log active checks
Host/Service flapping logging option¶
This variable determines whether or not Alignak will log host/service flapping it detects.
- 0 = Don’t log snapshots
- 1 = Log snapshots (default)
Snaphosts logging option¶
This variable determines whether or not Alignak will log the snaphosts it built.
- 0 = Don’t log snapshots
- 1 = Log snapshots (default)
Event Handler during downtimes¶
This option determines whether or not Alignak will run event handlers when the host or service is in a scheduled downtime.
- 0 = Launch event handlers (Nagios behavior)
- 1 = Don’t launch event handlers
Performance data parameters¶
Performance data processing option¶
This value determines whether or not Alignak will process host and service check performance data.
- 0 = Don’t process performance data
- 1 = Process performance data (default)
If you want to use tools like PNP, NagiosGrapher or Graphite set it to 1.
Performance data processor command timeout¶
This is the maximum number of seconds that Alignak will allow a host performance data processor command or service performance data processor command to run. If a command exceeds this time limit it will be killed and a warning will be logged.
Host/Service performance data processing command¶
This option allows you to specify a command to be run after every host/service check to process host/service performance data that may be returned from the check. The command argument is the short name of a command definition that you define in your object configuration file. This command is only executed if the Performance Data Processing Option option is enabled globally and if the
process_perf_data directive in the host definition is enabled.
Advanced scheduling parameters¶
Passive host checks are SOFT option¶
This option determines whether or not Alignak will treat passive host checks as HARD states or SOFT states. As a default, a passive host check result will put a host into a HARD state type. You can change this behavior by enabling this option.
- 0 = Passive host checks are HARD (default)
- 1 = Passive host checks are SOFT
This option is not yet implemented.
Predictive Host/Service dependency checks option¶
This option determines whether or not Alignak will execute predictive checks of hosts/services that are being depended upon (as defined in host/services dependencies) for a particular host/service when it changes state. Predictive checks help ensure that the dependency logic is as accurate as possible.
- 0 = Disable predictive checks
- 1 = Enable predictive checks (default)
This option is not yet implemented.
Orphaned Host/Service check option¶
This option allows you to enable or disable checks for orphaned service/host checks. Orphaned checks are checks which have been launched to pollers but have not had any results reported in a long time.
Since no results have come back in for it, it is not rescheduled in the event queue. This can cause checks to stop being executed. Normally it is very rare for this to happen - it might happen if an external user or process killed off the process that was being used to execute a check.
If this option is enabled and Alignak finds that results for a particular check have not come back, it will log an error message and reschedule the check. If you start seeing checks that never seem to get rescheduled, enable this option and see if you notice any log messages about orphaned services.
- 0 = Don’t check for orphaned service checks
- 1 = Check for orphaned service checks (default)
This option is not yet implemented.
Soft state dependencies option¶
Format: soft_state_dependencies=<0/1> Example: soft_state_dependencies=0
This option determines whether or not Alignak will use soft state information when checking host and service dependencies. Normally it will only use the latest hard host or service state when checking dependencies. If you want it to use the latest state (regardless of whether its a soft or hard state type), enable this option.
- 0 = Don’t use soft state dependencies (default)
- 1 = Use soft state dependencies
This option is not yet implemented.
Cached Host/Service check horizon¶
This option determines the maximum amount of time (in seconds) that the state of a previous host check is considered current. Cached host states (from host/service checks that were performed more recently than the time specified by this value) can improve host check performance immensely. Too high of a value for this option may result in (temporarily) inaccurate host/service states, while a low value may result in a performance hit for host/service checks. Use a value of 0 if you want to disable host/service check caching. More information on cached checks can be found here.
Nagios default is 15s, but it’s a tweak that make checks less accurate. So Alignak uses 0s as a default. If you have performance problems and you can’t add a new scheduler or poller, increase this value and start to buy a new server because this won’t be magical ;).
This option is not yet implemented.
Large installation tweaks option¶
This option determines whether or not the Alignak daemon will take shortcuts to improve performance. These shortcuts result in the loss of a few features, but larger installations will likely see a lot of benefit from doing so. If you can’t add new satellites to manage the load (like new pollers), you can activate it.
- 0 = Don’t use tweaks (default)
- 1 = Use tweaks
Flap detection option¶
This option determines whether or not Alignak will try and detect hosts and services that are “flapping”. Flapping occurs when a host or service changes between states too frequently, resulting in a barrage of notifications being sent out. When Alignak detects that a host or service is flapping, it will temporarily suppress notifications for that host/service until it stops flapping.
More information on how flap detection and handling works can be found here.
- 0 = Don’t enable flap detection (default)
- 1 = Enable flap detection
Low Service/Host flap threshold¶
This option is used to set the low threshold for detection of host/service flapping. For more information on how flap detection and handling works (and how this option affects things) read this.
High Service/Host flap threshold¶
This option is used to set the high threshold for detection of host/service flapping. For more information on how flap detection and handling works (and how this option affects things) read this.
Various commands timeouts¶
event_handler_timeout=<seconds> # default: 30s notification_timeout=<seconds> # default: 30s ocsp_timeout=<seconds> # default: 15s ochp_timeout=<seconds> # default: 15s
This is the maximum number of seconds that Alignak will allow event handlers, notifications to be run. If an command exceeds this time limit it will be killed and a warning will be logged.
There is often widespread confusion as to what this option really does. It is meant to be used as a last ditch mechanism to kill off commands which are misbehaving and not exiting in a timely manner. It should be set to something high (like 60 seconds or more for notification), so that each event handler command normally finishes executing within this time limit. If an event handler runs longer than this limit, Alignak will kill it off thinking it is a runaway processes.
Host/Service freshness checking option¶
This option determines whether or not Alignak will periodically check the “freshness” of host/service checks. Enabling this option is useful for helping to ensure that passive service checks are received in a timely manner. More information on freshness checking can be found here.
- 0 = Don’t check host/service freshness
- 1 = Check host/service freshness (default)
Host/Service freshness check interval¶
This setting determines how often (in seconds) Alignak will periodically check the “freshness” of host/service check results. If you have disabled host/service freshness checking (with the
check_service_freshness option), this option has no effect. More information on freshness checking can be found here.
Additional freshness threshold latency option¶
This option determines the number of seconds Alignak will add to any host or services freshness threshold it automatically calculates (e.g. those not specified explicitly by the user). More information on freshness checking can be found here.
Used to specify the trigger directory. It will open the directory and look recursively for .trig files.
This option determines whether or not Alignak will send out notifications. If this option is disabled, Alignak will not send out notifications for any host or service.
- Values are as follows:
- 0 = Disable notifications
- 1 = Enable notifications (default)
External command check option¶
This option determines whether or not Alignak will execute the external commands that it receives. More information on external commands can be found here.
- 0 = Don’t check external commands (default)
- 1 = Check external commands (default)
Service/Host check execution option¶
This option determines whether or not Alignak will execute active host/service checks. If this option is disabled, Alignak will not execute any active host/service checks.
- 0 = Don’t execute service checks
- 1 = Execute service checks (default)
Passive Host/Service check acceptance option¶
This option determines whether or not Alignak will accept passive host/service checks. If this option is disabled, Alignak will not accept any passive host/service checks.
- 0 = Don’t accept passive service/host checks
- 1 = Accept passive service/host checks (default)
Event handlers option¶
This option determines whether or not Alignak will run event handlers.
- 0 = Disable event handlers
- 1 = Enable event handlers (default)
Global Host/Service event handlers option¶
This option allows you to specify a host event handler command that is to be run for every host state change. The global event handler is executed immediately prior to the event handler that you have optionally specified in each host definition. The command argument is the short name of a command that you define in your commands definition. The maximum amount of time that this command can run is controlled by the Event Handler Timeout option. More information on event handlers can be found here.
Such commands should not be so useful with the new Alignak distributed architecture. If you use it, look if you can avoid it because such commands will kill your performance!
Timing interval length¶
This is the number of seconds per “unit interval” used for timing in the scheduling queue, re-notifications, etc. “Units intervals” are used in the object configuration file to determine how often to run a service check, how often to re-notify a contact, etc.
The default value for this is set to 60, which means that a “unit value” of 1 in the object configuration file will mean 60 seconds (1 minute).
Changing this option is not a good thing with Alignak. It’s not designed to be a hard real time monitoring system...
Naming and macros parameters¶
Illegal object name characters¶
This option allows you to specify illegal characters that cannot be used in host names, service descriptions, or names of other object types. Alignak will allow you to use most characters in object definitions, but we recommend not using the characters shown in the example above because it may give you problems in the web interface, notification commands, etc.
Illegal macro output characters¶
This option allows you to specify illegal characters that should be stripped from macros before being used in notifications, event handlers, and other commands. This DOES NOT affect macros used in service or host check commands. You can choose to not strip out the characters shown in the example above, but I recommend you do not do this. Some of these characters are interpreted by the shell (i.e. the backtick) and can lead to security problems. The following macros are stripped of the characters you specify:
Administrator email address¶
This is the email address for the administrator of the local machine (i.e. the one that Alignak is running on). This value can be used in notification commands by using the “$ADMINEMAIL$” macro.
Administrator pager (unused)¶
This is the pager number (or pager email gateway) for the administrator of the local machine (i.e. the one that Alignak is running on). The pager number/address can be used in notification commands by using the $ADMINPAGER$ macro.
Enable or not the statsd communication. By default it’s disabled.
statsd_host=<host or ip>
Configure your local statsd daemon address.
Configure your local statsd daemon port. Notice that the port is in UDP
The prefix to add before all your stats so you will find them easily in graphite