When you are setting up Nagios to monitor remote servers you need to create a new cfg file for each remote server. If you are monitoring a remote Linux server there are a listing of 7 services that are very typically set up to monitor by default. These are the same as what is the default set for the localhost list on your Nagios monitoring server. Here is a sample of what you would put into a file for a Linux server. In this case my server is named Kittyhawk and I would call the configuration file kittyhawk.cfg. Typically you would put this file in /etc/nagios/servers or you might find you need to put it in /usr/local/nagios/etc/servers. define host { use linux-server host_name kittyhawk alias My second server hostgroups linux-servers address xxx.xxx.xxx.xxx max_check_attempts 5 check_period 24x7 notification_interval 30 notification_period 24x7 } define service { use generic-service host_name kittyhawk service_description SSH check_command check_ssh notifications_enabled 0 } define service{ use generic-service host_name kittyhawk service_description CPU Load check_command check_nrpe!check_load } define service{ use generic-service host_name kittyhawk service_description Current Users check_command check_nrpe!check_users } define service{ use generic-service host_name kittyhawk service_description Boot disk space check_command check_nrpe!check_boot_disk } define service{ use generic-service host_name kittyhawk service_description Root disk space check_command check_nrpe!check_root_disk } define service{ use generic-service host_name kittyhawk service_description Total Processes check_command check_nrpe!check_total_procs } define service{ use generic-service host_name kittyhawk service_description Zombie Processes check_command check_nrpe!check_zombie_procs } You can add more services to monitor for the remote server depending on what it does and what you need to monitor. This one also assumes you are using nrpe to connect to the remote server.
0 Comments
Leave a Reply. |
AuthorI am truly a geeks geek. I have worked in computers for over three decades. I have worked on mainframes, Unix systems, Linux before almost anyone knew what it was, and many other systems. I love computers, and love making them do things people think is impossible. Archives
January 2018
Categories |
Home |
About |
Services |
Copyright © 2016