您的位置:首页 > 移动开发 > IOS开发

nagios监控windows服务器远程桌面3389端口

2013-02-26 15:23 274 查看
添加check_3389脚本插件

vim /opt/nagios/nagiosweb/libexec/check_3389

#!/bin/sh

/opt/nagios/nagiosweb/libexec/check_tcp -H $1 -p 3389 -t 3 > /dev/null

if [[ $? == 0 ]]

then

echo "CRITICAL:3389 open"

exit 2

else

echo "OK:3389 close"

exit 0

fi

-------------------------------------------------------------------

添加监控命令

vim /opt/nagios/nagiosweb/etc/objects/commands.cfg

define command{

command_name check_3389

command_line $USER1$/check_3389 $HOSTADDRESS$

}

-------------------------------------------------------------------------

添加nagios监控服务和主机

define host{

use windows-server ;

host_name kan34 ;

alias kan34 ;

address 118.26.230.34 ;

}

define service{

use generic-service

host_name kan34 ; The name we're giving to this host

service_description TCP3389

check_command check_3389

}

页面效果如下

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: