Cache filesJuly 13. 2009
What are cache files?Every time check_mk successfully gets data from a host's agent, it stores it into a cache file. The default path is /var/lib/check_mk/cache/HOSTNAME. This cache file is useful for:
Cachefiles and InventoryWhen you do an inventory with check_mk -I check_mk will use information from the cache files instead of contacting the agent only if all of the following conditions hold:
The idea behind the first condition is that if you do an inventory over all hosts, then the speedup of cache files is crucial - especially for large installations. If you do inventory only for one specific host, check_mk assumes that you want to use current data - the speedup is marginal in that case anyway. You can override the 120 secs in main.mk: main.mk # maximum age for inventory cache files: inventory_max_cachefile_age = 60 Cachefiles and ClustersWhen check_mk checks a cluster then it needs to get the information from all its nodes and merges them before examining the data. But since the nodes of the clusters will be checked themselves for the services that are not clustered, the information about each node would have to be fetched twice each check cycle. Therefore - when checking clusters - check_mk uses cache files if the are not older then 90 seconds. So if you do regular checks once a minute the cache files will be created when checking the physical nodes and be recent enough when the cluster is checked. If your check cycle is larger then one minute you can define another maximum cache file age for cluster checks in main.mk: main.mk # Use cache files for cluster checks if not older then 150 secs. cluster_max_cachfile_age = 150 Cachefiles and SNMPAs of version 1.0.38, also SNMP data is written to cache files. Since data is fetched separately for each check type, several cache files are used. |
| ||||||||||||||||||||||||||||||