Linux command
check_mk 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Check a host manually
cmk -nv [hostname]
Discover services on a host
cmk -I [hostname]
Discover services on all hosts
cmk -I
Update configuration and reload
cmk -O
Show agent output from a host
cmk -d [hostname]
List all hosts
cmk --list-hosts
Activate changes
cmk -R
说明
Checkmk (formerly Check_MK) is a comprehensive IT monitoring solution built on Nagios monitoring core concepts. The cmk command is the central CLI tool for managing hosts, services, and configuration. The system uses agents installed on monitored hosts that collect metrics and status information. The cmk command processes this data, discovers available services, performs checks, and manages the configuration. Discovery (cmk -I) scans hosts for monitorable services. Configuration changes require activation with cmk -O or cmk -R. The tool supports distributed monitoring, agent bakery for deployment, and extensive plugin architecture.
参数
- -I, --discover
- Discover new services on hosts.
- -II
- Remove vanished services and discover new ones.
- -n
- Simulate check without submitting results (dry run).
- -v
- Verbose output. Commonly combined as -nv for testing.
- -d
- Dump agent output from host.
- -O, --reload
- Reload configuration without restart.
- -R, --restart
- Restart monitoring core.
- --list-hosts
- List all configured hosts.
- --list-checks
- List all available check plugins.
- --paths
- Show Checkmk directory paths.
- -P, --package _action_
- Manage extension packages (install, remove, list).
- --snmpwalk _HOSTNAME_
- Perform an SNMP walk on a host for diagnostics.
- --debug
- Enable debug output.
FAQ
What is the check_mk command used for?
Checkmk (formerly Check_MK) is a comprehensive IT monitoring solution built on Nagios monitoring core concepts. The cmk command is the central CLI tool for managing hosts, services, and configuration. The system uses agents installed on monitored hosts that collect metrics and status information. The cmk command processes this data, discovers available services, performs checks, and manages the configuration. Discovery (cmk -I) scans hosts for monitorable services. Configuration changes require activation with cmk -O or cmk -R. The tool supports distributed monitoring, agent bakery for deployment, and extensive plugin architecture.
How do I run a basic check_mk example?
Run `cmk -nv [hostname]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -I, --discover do in check_mk?
Discover new services on hosts.