Checkmk
to checkmk.com

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 a site is to be updated and started, in order to evaluate a new Checkmk version. In practice the following prerequisites are applicable in this mode:

  • All service data – if available – will be drawn from cached 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 site will continue to run as normal:

  • Notifications still take place! It is therefore advisable to deactivate notifications in the test site, or to alter the rule so that only you receive all 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 sites in a distributed monitoring will continue to be monitored as usual. Only in a distributed setup will the simulation mode be passed on to the other remote sites.

  • Metric 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 metrics to function will become stale.

2. Activation

There are two possible ways of setting up the simulation mode. One possibility is to activate the mode directly in Setup. The option can be found via Setup > General > Global settings > Execution of checks > Simulation mode:

omd basics simulation

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 before the site is started. In this case, manually insert the appropriate lines into the global.mk file in the copied site:

~/etc/check_mk/conf.d/wato/global.mk
simulation_mode = True

Ensure that the True has a capital. To effect the change, next create a new configuration of the monitoring core:

OMD[mysite]:~$ cmk -U
Generating configuration for core (type cmc)...
Starting full compilation for all hosts Creating global helper config...OK
 Creating cmc protobuf configuration...OK

The site can now be started without live data being retrieved from the hosts:

OMD[mysite]:~$ omd start
Creating temporary filesystem /omd/sites/mysite/tmp...OK
Starting agent-receiver...OK
Starting mkeventd...OK
Starting liveproxyd...OK
Starting mknotifyd...OK
Starting rrdcached...OK
Starting cmc...OK
Starting apache...OK
Starting dcd...OK
Starting redis...OK
Initializing Crontab...OK

3. Files and directories

Path Function

~/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 cached 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.

On this page