############################################################################### ############################################################################### # # HOST DEFINITIONS # ############################################################################### ############################################################################### # Define a host for the Windows machine we'll be monitoring # Change the host_name, alias, and address to fit your situation # 監控專案的 Windows Host, 因為不是自己的伺服器所以只監控服務部份 define host{ use windows-server ; Inherit default values from a template 這邊要參照/etc/nagios/objects/templates.cfg 內的名稱 host_name percomp ; The name we're giving to this host 主機名稱(簡稱) alias percomp NCHC; 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!9869 # 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 # }