最後更新: 2020-10-15
安裝 Plugin
Centos:
# Install ALL plugin
yum installnagios-plugins-all
OR
# Install plugin one by one
yum install nagios-plugins-swap
# Plugin
- nagios-plugins-tcp
- nagios-plugins-users
- nagios-plugins-procs
- nagios-plugins-load
- nagios-plugins-disk
- nagios-plugins-ssh
- nagios-plugins-mysql
- nagios-plugins-mailq
Plugin Path
# Centos 6
/usr/lib/nagios/plugins/XXXX
Plugin 與 command 的分別
雖然系統已經安裝了 check_tcp, 不過, 在 command 裡要再定義了一次
這樣會定義了 command, 在 service 可以去 call 希有參數的 plugin
Example
定義 command: check_tcp
# 'check_tcp' command definition
define command{
command_name check_tcp
command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$
}
在 service 內調用
define service{ use service-medium host_name MyServer service_description Softether check_command check_tcp!8443 }