Database Reference
In-Depth Information
The rest of the configuration file contains a list of services defined for the server—in this case, hc1nn.
Although space prevents me from explaining every service definition, you can find details at
http://nagios.sourceforge.net/docs .
15 define service {
16 use generic-service
17 host_name hc1nn
18 service_description SSH
19 check_command check_ssh
20 notifications_enabled 0
21 }
22
23 define service {
24 use generic-service
25 host_name hc1nn
26 service_description Current Load
27 check_command check_local_load!5.0,4.0,3.0!10.0,6.0,4.0
28 }
29
30 ##### extra checks
31
32 define service{
33 use local-service
34 host_name hc1nn
35 service_description Root Partition
36 check_command check_local_disk!20%!10%!/
37 }
38
39 define service{
40 use local-service
41 host_name hc1nn
42 service_description Current Users
43 check_command check_local_users!20!50
44 }
45
46 define service{
47 use local-service
48 host_name hc1nn
49 service_description Total Processes
50 check_command check_local_procs!250!400!RSZDT
51 }
I used the file /etc/nagios/objects/localhost.cfg as a template for each server configuration file, simply by
changing the server name and IP address for each to match the corresponding server. These files give Nagios a map of
servers that it needs to do the monitoring.
With the service configuration files finished, I configure the nrpe.cfg file on each server under /etc/nagios. The
nrpe (Nagios remote plugin executor) process on each host executes the Nagios plug-ins:
vi /etc/nagios/nrpe.cfg
 
Search WWH ::




Custom Search