- 思路
- 更改ftp的默认端口
- 在监控主机的配置文件localhost.cfg文件里加上监控命令
- 如果命令没有在command.cfg就需要自己写
- 编译流程
- vim /etc/vsftpd/vsftpd.conf
- listen_port=2121
- service vsftpd restart
- netstat -nltp|grep vsftpd --查看端口
- vim localhost.cfg
- check_command check_ftp!2!5!2121
- vim commands.cfg
- command_line *** 后面加上 -p $ARG3$
- service nagios restart
- ./../libexec/check_ftp -H localhost -w 2 -c 5 -p 2121