tailieunhanh - Automating Linux and Unix System Administration phần 8
Bạn sẽ tìm thấy nó dễ dàng để cấu hình một Solaris 10 hệ thống đồng bộ hóa thời gian sử dụng NTP. Chúng tôi sẽ tự động cấu hình trên tất cả các hệ thống Solaris sau này, nhưng đầu tiên sẽ kiểm tra cấu hình của chúng tôi trên một máy chủ duy nhất để xác nhận nó. Đơn giản chỉ cần sao chép, và bình luận những dòng này: | 296 CHAPTER 10 MONITORING Figure 10-1. Nagios service detail screen for the system localhost By default Nagios assumes that the standard plug-ins are installed which is true in our case and it has an object configuration file called that sets up the checks you see on that page. Note that there is a failed check CRITICAL state for the HTTP service because we onlyrun an SSL-enabledApache server at our site for Nagios and we have no HTTP service at all. We ll take steps to make Nagios monitor the correct service in step 14. Step 14 Modifying the Nagios Localhost-Only Monitoring to Check HTTPS The only system monitored at this point is the actual host running Nagios etchlamp since only the host localhost has checks defined in the default Nagios configuration files. We had to change these lines in PROD repl root usr pkg nagios-conf objects in order to properly monitor HTTPS on this host CHAPTER 10 MONITORING 297 define service use host_name service_description check_command notifications_enabled local-service localhost HTTP check_http 0 service template to use We changed them to this define service use host_name service_description check_command notifications_enabled local-service service template to use localhost HTTPS check_https 4431 0 If you re following along with the book in an environment of your own you ll notice a problem there isn t a check_https command definition. We had to create it with this addition to PROD repl root usr pkg nagios-conf objects define command command_name check_https command_line USERl check_http -S -L -H HOSTNAME -p ARG1 -u ARG2 This new command object definition calls the check_http plug-in with the appropriate arguments to test an HTTPS-enabled web site. Once this was copied to our Nagios server and Nagios automaticallyrestarted by cfengine the proper command was executed and the check cleared in Nagios. Nagios is now in a fully functional state in our environment but we don t find it very .
đang nạp các trang xem trước