############################################################################### # WINDOWS.CFG - SAMPLE CONFIG FILE FOR MONITORING A WINDOWS MACHINE # # Last Modified: 06-13-2007 # # NOTES: This config file assumes that you are using the sample configuration # files that get installed with the Nagios quickstart guide. # ############################################################################### ############################################################################### ############################################################################### # # HOST DEFINITIONS # ############################################################################### ############################################################################### # Define a host for the Windows machine we'll be monitoring # Change the host_name, alias, and address to fit your situation define host{ use rack-host ; Inherit default values from a template 這邊要參照/etc/nagios/objects/templates.cfg 內的名稱 host_name S_B11_09U ; The name we're giving to this host 主機名稱(簡稱)(機房位置_機櫃位置_起始U數) alias Shinchu B11 09U - Dell R720; A longer name associated with the host 主機名稱(長) address 192.168.1.3 ; IP address of the host 這邊請修改為實際上的IP # hostsgroups ; 依照實際群組來指定,例如 labs-group, 參考 /etc/nagios/objects/templates.cfg # contacts ; 依照聯絡人來指定 # notes ; 這邊可以加入 notes } ############################################################################### ############################################################################### # # SERVICE DEFINITIONS # ############################################################################### ############################################################################### # #define service{ # use generic-service # check_command check_http # service_description Check HTTP # host_name percomp # 可以利用 contacts 來指定聯絡的人, 搭配contacts.cfg # contacts # } # #define service{ # use generic-service # check_command check_ssh # service_description Check SSH # host_name percomp # 可以利用 contacts 來指定聯絡的人, 搭配contacts.cfg # contacts # } # #define service{ # use generic-service # check_command check_tcp # service_description Check TCP 9869 # host_name percomp # 可以利用 contacts 來指定聯絡的人, 搭配contacts.cfg # contacts # } # Create a service for monitoring the Explorer.exe process # Change the host_name to match the name of the host you defined above #define service{ # use generic-service # host_name percomp # service_description Check SMTP # check_command check_nrpe!check_smtp # 可以利用 contacts 來指定聯絡的人, 搭配contacts.cfg # contacts # }