1. The fundamentals
With the simulation mode Checkmk's general functionality can be tested without contacting the monitoring agents on target hosts. This can can be advantageous, for example, when the copy of an instance is to be updated and started, in order to evaluate a new version Checkmk. In practice the following prerequites are applicable in this mode:
- All service data – if available – will be drawn from buffered files and NO host query goes over the network. It is thus quite possible to operate a single site without network access. If a cache-file is not available for a host, the service concerned enters the UNKNOWN state.
- All active network queries (Ping, HTTP, etc.), will be ‘bent’ to 127.0.0.1. All hosts will thus be viewed as UP, as long as their state is being determined via Ping or Smart-Ping. HTTP-Checks attempt to contact the monitoring server itself – which can of course lead to different results.
Everything else in the instance will continue to run as normal:
- A notification can still be generated! It is therefore advisable to deactivate notifications in the test instance, or to alter the rule so that only the test instance itself receives its notifications.
- Notifications and SNMP-Traps in the Event Console will continue to be processed.
- Any configured backup jobs will be executed at their scheduled times.
- Hosts and services on other instances in a distributed monitoring will continue to be monitored as usual. Only in a distributed WATO will the simulation mode be passed on to the other sites/slaves.
- Performance data values remain unchanged at the last stand, but will continue to be recorded.
Since only existing data is used in simulation mode, the check results will not change. Thus services requiring performance counters to function will become stale.
There are two possible ways of setting up the simluation mode. One possibility is to activate the mode directly in WATO. The option can be found via Global Settings ➳ Execution of checks ➳ Simulation mode:
Another possibility is to activate the mode directly in it's configuration file. This may be necessary if you made a copy of a site and want to activate the mode bevor the site is started. In this case, manually insert the appropriate lines into the global.mk file in the copied site:
simulation_mode = True
Ensure that the ‘True’ has a capital. To effect the change, next create a new configuration of the core:
OMD[mysite]:~$ cmk -U Generating configuration for core (type cmc)...OK
The instance can now be started without live data being retrieved from the hosts:
OMD[mysite]:~$ omd start Starting liveproxyd...OK Starting mknotifyd...OK Starting rrdcached...OK Starting cmc...OK Starting apache...OK Initializing Crontab...OK
3. Files and directories
|etc/check_mk/conf.d/wato/global.mk||Among other things, the simulation mode is activated here. If the ‘simulation_mode’ value has not been set in this file, the standard value (off) will be used.|
|tmp/check_mk/cache/||The buffered agent data can be found here. The directory is empty if agent data has never been retrieved. Because all such data is located in tmp/ in a RAM disk, this directory will be empty after a restart.|