您好,登錄后才能下訂單哦!
客戶端配置:
客戶端下載安裝NSclient
下載地址:http://nsclient.org/nscp/downloads
安裝NSCP-0.4.1.090-Win32 .msi (本人windows系統為32位,如果是64位系統下載64位安裝即可)
安裝完成后運行nscp.exe會自動打開12489端口,用于nagios采集數據
使用netstat -an |more 查看端口是否開啟
安裝完成后如果要修改Nagios服務器地址, 編輯nsclient安裝目錄下的nsclient.ini,找到allowed hosts = 192.168.0.54 ,更改hosts后面的ip為nagios服務器的ip就可以了。
服務器端配置:
1. 修改nagios.cfg,加載windows.cfg文件
[root@localhost /]# vi /usr/local/nagios/etc/nagios.cfg
cfg_file=/usr/local/nagios/etc/objects/windows.cfg // 取消這一行的注釋
2. 修改windows.cfg文件中host主機的address為被監控主機,其他保持默認(使用默認模版)
★如果更改host_name注意要將下面service里面引用的host_name都統一更改
★如果要增加一臺windows監控,在新建一個define host{}進行添加
★如果要添加windows監控的服務,新建一個define serice 進行添加
define host{
use windows-server ; Inherit default values from a template
host_name zrer-win ; The name we're giving to this host
alias zrer-windows ; A longer name associated with the host
address 192.168.0.9 ; IP address of the host 被監控主機ip
}
define hostgroup{
hostgroup_name windows-servers ; The name of the hostgroup
alias Windows Servers ; Long name of the group
}
define service{
use generic-service
host_name zrer-win
service_description NSClient++ Version
check_command check_nt!CLIENTVERSION
}
define service{
use generic-service
host_name zrer-win
service_description Uptime
check_command check_nt!UPTIME
}
define service{
use generic-service
host_name zrer-win
service_description CPU Load
check_command check_nt!CPULOAD!-l 5,80,90
}
define service{
use generic-service
host_name zrer-win
service_description Memory Usage
check_command check_nt!MEMUSE!-w 80 -c 90
}
define service{
use generic-service
host_name zrer-win
service_description C:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90
}
define service{
use generic-service
host_name zrer-win
service_description Explorer
check_command check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
}
3. 重啟nagios服務
[root@localhost /]# service nagios restart
打開Nagios web界面查看監控信息
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。