Alignak allows to define a check_command that do not require executing a plugin to make the host or service state change. The main interest of this feature is to allow defining and testing a monitored system configuration with many hosts dependencies without the need to check everything in a real environment. It also allows having an Alignak demo mode with some activity ;)

Note

the default shipped configuration defines some few hosts / services with only internal checks :)

Alignak allows to define a check_command that makes it consider an host to have always the same state. Defining the _host_internal_check command as the host check_command will make the host always have the same state and output.

If the plugin output is an empty string, Alignak will build an output message as Hostinternalcheckresult:X where X is the plugin exit code.

If the plugin exit code is composed as a comma separated list, Alignak will randomly choose one of the values as the exit code. This allows to use internal checks to simply simulate hosts states changing.

When several values are used, the first value is always the most probable one that will be used. The choice rules are:

80 / 20 for 2 values

70 / 20 /10 for 3 values

60 / 20 / 10 / 10 for 4 values

40 / 20 / 20 / 10 / 10 for 5 values

Note

If the syntax of this command is not correct, the check will be considered as and unknown check and the output will be Malformed host internal check.

Alignak allows to define a check_command that makes it consider a service to have always the same state. Defining the _service_internal_check command as the service check_command will make the service always have the same state and output.

If the plugin output is an empty string, Alignak will build an output message as Serviceinternalcheckresult:X where X is the plugin exit code.

If the plugin exit code is composed as a comma separated list, Alignak will randomly choose one of the values as the exit code. This allows to use internal checks to simply simulate services states changing.

When several values are used, the first value is always the most probable one that will be used. The choice rules are:

80 / 20 for 2 values

70 / 20 /10 for 3 values

60 / 20 / 10 / 10 for 4 values

40 / 20 / 20 / 10 / 10 for 5 values

Note

If the syntax of this command is not correct, the check will be considered as and unknown check and the output will be Malformed host internal check.

When Alignak checks the status of services, it will be able to detect when a service changes between OK, WARNING, UNKNOWN, and CRITICAL states and take appropriate action. These state changes result in different state types (HARD or SOFT), which can trigger event handlers to be run and notifications to be sent out. Service state changes can also trigger on-demand host checks. Detecting and dealing with state changes is what Alignak is all about.

Soft (state type is SOFT) states occur when the service checks return a non-OK state and are in the process of being retried. Hard states (state type is HARD) result when the service checks have been checked a specified maximum number of times and the current state is confirmed.

When services change state too frequently they are considered to be “flapping”. Alignak can detect when services start flapping, and can suppress notifications until flapping stops and the service’s state stabilizes. More information on the flap detection logic can be found here.