check_mk (1) - Linux Man Pages
check_mk: command line utility for managing Check_MK
SYNOPSIScheck_mk [GLOBAL OPTIONS] [MODE] [MODE OPTIONS] [ARGUMENTS...]
DESCRIPTIONcheck_mk (or its alias cmk) is a command line utility for managing some aspects of the Check_MK Monitoring System. It can be used for diagnosis, for automating things in scripts and for doing some tasks more efficiently than with the web based WATO.
The following options work in all modes and all situations.
More verbose output. In good old Unix tradition check_mk only outputs texts
if something goes wrong. By using -v you can get some more information
about what's going on.
Even more vebose output. Some operations give even more details when this
options is used.
Disables the intern exception handling in Check_MK and let all Python
exceptions through. That way you can see the exact location in the code
where the actual problem is. This helps finding problems in self written
SERVICE DISCOVERYcmk [--checks=CHECK_TYPE1,CHECK_TYPE2,...] -I|-II [HOSTS...]
The options -I and -II do service discovery. Check_MK will analyse the agent output of the specified hosts (or all hosts if none are specified) and automatically create monitored services where it does make sense. While -I only creates new services and keeps the existing ones untouched, -II first removes all existing services before staring the discovery.
The option --checks= restricts the option to a list of check types (e.g. --checks=Bdf,diskstat). When combined with the mode -II only checks of the specified types are be removed and rediscovered.
When no hosts are specified then Check_MK will do a discovery for all hosts that are defined in your configuration. In order to speed this operation up no actual data is being fetched from the hosts but cached agent data will be used. When you specify host names then fresh data is fetched from these.
AD HOC CHECKINGcmk [-n] [-p] [--checks=CHECK_TYPE1,CHECK_TYPE2,...] -v HOST
This does an ad hoc checking of the host HOST via Check_MK. HOST must be a host that is configured in Check_MK. Check_MK does the same like in real monitoring - it fetches data from the agent and computes the result of all services. Then it outputs each result and sends the result to the monitoring core.
-p Also prints metrics data of the services.
-n Prevents the check results from being sent to the monitoring core. That way
-v Outputs the results of the passive checks on the terminal. Without this option Check_MK behaves like a classical monitoring plugin: it outputs one line of text (essentially the output of the Check_MK service) and exists with 0, 1, 2 or 3 (OK, WARN, CRIT, UNKNOWN). This was how Nagios called Check_MK in ancient times.
The option --checks= restricts the option to a list of check types (e.g. --checks=Bdf,diskstat). That way only a reduced set of service is being checked. This is useful for testing and debugging a check plugin.