############################################################################### # 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 linux-server ; Inherit default values from a template 這邊要參照/etc/nagios/objects/templates.cfg 內的名稱 host_name suseserver129 ; The name we're giving to this host 主機名稱(簡稱) alias openSUSE Server2; A longer name associated with the host 主機名稱(長) address 192.168.3.129 ; IP address of the host 這邊請修改為實際上的IP # hostsgroups ; 依照實際群組來指定,例如 labs-group, 參考 /etc/nagios/objects/templates.cfg # contacts ; 依照聯絡人來指定 # notes ; 這邊可以加入 notes } ############################################################################### ############################################################################### # # HOST GROUP DEFINITIONS # ############################################################################### ############################################################################### ############################################################################### ############################################################################### # # SERVICE DEFINITIONS # ############################################################################### ############################################################################### # Create a service for monitoring the version of NSCLient++ that is installed # Change the host_name to match the name of the host you defined above # 這邊要配合 /etc/nagios/objects/templates.cfg 裡面的 command 設定 define service{ use nrpe-check_users host_name suseserver129 } # Create a service for monitoring the uptime of the server # Change the host_name to match the name of the host you defined above define service{ use nrpe-check_sda1 host_name suseserver129 } define service{ use nrpe-check_sda2 host_name suseserver129 } # Create a service for monitoring CPU load # Change the host_name to match the name of the host you defined above #define service{ # use nrpe-check_vda1 # host_name suseserver129 # } #define service{ # use nrpe-check_vda2 # host_name suseserver129 # } # Create a service for monitoring memory usage # Change the host_name to match the name of the host you defined above define service{ use nrpe-check_load host_name suseserver129 } # Create a service for monitoring C:\ disk usage # Change the host_name to match the name of the host you defined above define service{ use nrpe-check_total_procs host_name suseserver129 } # Create a service for monitoring the W3SVC service # Change the host_name to match the name of the host you defined above define service{ use nrpe-check_ssh host_name suseserver129 } # 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 suseserver129 # service_description Check SMTP # check_command check_nrpe!check_smtp # }