[nagios監控] 監控samba服務
監控samba服務
www.2cto.com
1> 監控端設置
a> 下載監控腳本
cd /usr/local/nagios/libexec/
wget ftp://192.168.68.254/monitor/nagios/scripts/check_smb
chmod +x check_smb
b> 添加服務命令
vim /usr/local/nagios/etc/objects/commands.cfg
# 'check_smb' command definition
define command{
command_name check_smb
command_line $USER1$/check_smb -H $HOSTADDRESS$
}
c> 添加監控主機
vim /usr/local/nagios/etc/objects/192.168.68.214.cfg
# Define a service to check SMB on the local machine.
define service{
use generic-service
host_name test-samba
service_description Samba
check_command check_smb
process_perf_data 1
}