f37 -> f39
[infrastructure.git] / nagios / configurator / generic.cfg
1 ###############################################################################
2 # MINIMAL.CFG
3 #
4 # MINIMALISTIC OBJECT CONFIG FILE (Template-Based Object File Format)
5 #
6 # Last Modified: 05-30-2006
7 #
8 #
9 # NOTE: This config file is intended to be used to test a Nagios installation
10 #       that has been compiled with support for the template-based object
11 #       configuration files.
12 #
13 #       This config file is intended to servce as an *extremely* simple 
14 #       example of how you can create your object configuration file(s).
15 #       If you're interested in more complex object configuration files for
16 #       Nagios, look in the sample-config/template-object/ subdirectory of
17 #       the distribution.
18 #
19 ###############################################################################
20
21
22
23 ###############################################################################
24 ###############################################################################
25 #
26 # TIME PERIODS
27 #
28 ###############################################################################
29 ###############################################################################
30
31 # This defines a timeperiod where all times are valid for checks, 
32 # notifications, etc.  The classic "24x7" support nightmare. :-)
33
34 define timeperiod{
35         timeperiod_name                 24x7
36         alias                           24 Hours A Day, 7 Days A Week
37         sunday                          00:00-24:00
38         monday                          00:00-24:00
39         tuesday                         00:00-24:00
40         wednesday                       00:00-24:00
41         thursday                        00:00-24:00
42         friday                          00:00-24:00
43         saturday                        00:00-24:00
44         }
45
46
47 ################################################################################
48 #
49 # SERVICE CHECK COMMANDS
50 #
51 ################################################################################
52
53 # 'check_udp' command definition
54 define command{
55         command_name    check_udp
56         command_line    $USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$
57         }
58
59 define command{
60         command_name    check_ssh
61         command_line    $USER1$/check_ssh $HOSTADDRESS$
62         }
63
64 define command{
65         command_name    check_ssh_root
66         command_line    $USER1$/check_by_ssh -H $HOSTADDRESS$ -l root -i /etc/nagios/root_ssh_key.rsa -C date
67         }
68
69 define command{
70         command_name    check_ssh_pl_conf
71         command_line    $USER1$/check_by_ssh -H $HOSTADDRESS$ -l root -i /etc/nagios/root_ssh_key.rsa -C "server pl_conf status 2>/dev/null"
72         }
73
74 define command{
75         command_name    check_planetlab
76         command_line    $USER1$/check_planetlab.py -t 3 $HOSTADDRESS$ 
77         }
78
79 ################################################################################
80 #
81 # HOST CHECK COMMAND
82 #
83 ################################################################################
84
85 # This command checks to see if a host is "alive" by pinging it
86 # The check must result in a 100% packet loss or 5 second (5000ms) round trip 
87 # average time to produce a critical error.
88 # Note: Only one ICMP echo packet is sent (determined by the '-p 1' argument)
89
90 # 'check-host-alive' command definition
91 define command{
92         command_name    check-host-alive
93         command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,40% -c 5000.0,80% -p 1
94         }
95
96 ###############################################################################
97 ###############################################################################
98 #
99 # HOSTS
100 #
101 ###############################################################################
102 ###############################################################################
103
104 # Generic host definition template - This is NOT a real host, just a template!
105
106 define host{
107         name                            generic-host    ; The name of this host template
108         notifications_enabled           1       ; Host notifications are enabled
109         event_handler_enabled           1       ; Host event handler is enabled
110         flap_detection_enabled          1       ; Flap detection is enabled
111         failure_prediction_enabled      1       ; Failure prediction is enabled
112         process_perf_data               1       ; Process performance data
113         retain_status_information       1       ; Retain status information across program restarts
114         retain_nonstatus_information    1       ; Retain non-status information across program restarts
115         check_command                   check-host-alive
116         max_check_attempts              10
117         check_period                    24x7
118         notification_interval           1440
119         notification_period             24x7
120         notification_options            d,r
121         register                        0       ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
122         }
123
124 # actual hosts to be defined by python in planetlab.cfg
125
126 ###############################################################################
127 ###############################################################################
128 #
129 # SERVICES
130 #
131 ###############################################################################
132 ###############################################################################
133
134 # Generic service definition template - This is NOT a real service, just a template!
135
136 define service{
137         name                            generic-service ; The 'name' of this service template
138         active_checks_enabled           1       ; Active service checks are enabled
139         passive_checks_enabled          1       ; Passive service checks are enabled/accepted
140         parallelize_check               1       ; Active service checks should be parallelized (disabling this can lead to major performance problems)
141         obsess_over_service             1       ; We should obsess over this service (if necessary)
142         check_freshness                 0       ; Default is to NOT check service 'freshness'
143         notifications_enabled           1       ; Service notifications are enabled
144         event_handler_enabled           1       ; Service event handler is enabled
145         flap_detection_enabled          1       ; Flap detection is enabled
146         failure_prediction_enabled      1       ; Failure prediction is enabled
147         process_perf_data               1       ; Process performance data
148         retain_status_information       1       ; Retain status information across program restarts
149         retain_nonstatus_information    1       ; Retain non-status information across program restarts
150         register                        0       ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
151         is_volatile                     0
152         check_period                    24x7
153         max_check_attempts              2
154         normal_check_interval           240     ; every 2 hours is OK
155         retry_check_interval            5
156 ### 
157         notification_options            c,r
158         notification_interval           1440
159         notification_period             24x7
160         }
161
162
163 ### ping tunings
164 # warning  is set to 2 seconds, 40% packet loss
165 # critical is set to 5 seconds, 80% packet loss
166 ### We DONT register this service because it's basically what nagios reverts to
167 # if the others services turn out to be not responding
168 define service{
169         use                             generic-service
170         name                            generic-ping
171         service_description             ping
172 #       check_command                   check_ping!100.0,20%!500.0,60%
173         check_command                   check_ping!2000.0,40%!5000.0,80%
174         register                        0
175         }
176
177
178 define service{
179         use                             generic-service
180         name                            generic-ssh
181         service_description             ssh server
182         check_command                   check_ssh
183         register                        0
184         }
185
186 define service{
187         use                             generic-service
188         name                            generic-ssh-root
189         service_description             ssh root
190         check_command                   check_ssh_root
191         register                        0
192         }
193
194 define service{
195         use                             generic-service
196         name                            generic-ssh-pl_conf
197         service_description             pl_conf vserver
198         check_command                   check_ssh_pl_conf
199         register                        0
200         }
201
202 define service{
203         use                             generic-service
204         name                            generic-planetlab
205         service_description             comon
206         check_command                   check_planetlab
207         register                        0
208         }
209
210 # actual services to be defined by python in planetlab.cfg
211
212 # EOF