nagios研究-實現遠程監控windows伺服器上的自訂TCP連接埠

來源:互聯網
上載者:User

 

一、監控需求:

實現遠程監控windows伺服器上的自訂TCP連接埠

1.LInux機器比較簡單,使用check_tcp外掛程式(步驟省略)

2.windows機器,使用check_nt外掛程式,check_nt的詳細用法見 http://nagiosplugins.org/man/check_nt

a、先安裝NSClient++

b、編輯

/usr/local/nagios/etc/objects/commands.cfg設定檔

在裡面加入以下這段

 

# 'check_port' command definition

#add by chengh 09-09-11

define command{

command_name        check_port

command_line        $USER1$/check_nt -H $ARG1$ -p $ARG2$ -s 0Qxdf7rQFHfdrUy7 -v $ARG3$

}

註:-s選項不是必須

c、編輯/usr/local/nagios/etc/objects下面的監控主機配置,添加自訂要監控的主機地址和TCP連接埠

 

define service{

    use                     System

    host_name               nd-InfoPlatform-91note-cnc-1

    service_description     checkAccountServerPort9867

    normal_check_interval   4

    retry_check_interval    1

    contact_groups          91noteAccountServer

    check_command           check_port!58.22.105.139!9867!CLIENTVERSION

         #check_command       check_port!ip address!port value!CLIENTVERSION

    }

註:IP地址和連接埠之間要用!分隔

 

d、配置防火牆或ipsec,開啟相應連接埠的存取權限

e、/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

f、killall -HUP nagios

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.