1 | ################################################################# |
---|
2 | # |
---|
3 | # CGI.CFG - Sample CGI Configuration File for Nagios |
---|
4 | # |
---|
5 | # Last Modified: 05-05-2005 |
---|
6 | # |
---|
7 | ################################################################# |
---|
8 | |
---|
9 | |
---|
10 | # MAIN CONFIGURATION FILE |
---|
11 | # This tells the CGIs where to find your main configuration file. |
---|
12 | # The CGIs will read the main and host config files for any other |
---|
13 | # data they might need. |
---|
14 | |
---|
15 | main_config_file=/etc/nagios/nagios.cfg |
---|
16 | |
---|
17 | |
---|
18 | |
---|
19 | # PHYSICAL HTML PATH |
---|
20 | # This is the path where the HTML files for Nagios reside. This |
---|
21 | # value is used to locate the logo images needed by the statusmap |
---|
22 | # and statuswrl CGIs. |
---|
23 | |
---|
24 | physical_html_path=/usr/share/nagios/share |
---|
25 | |
---|
26 | |
---|
27 | |
---|
28 | # URL HTML PATH |
---|
29 | # This is the path portion of the URL that corresponds to the |
---|
30 | # physical location of the Nagios HTML files (as defined above). |
---|
31 | # This value is used by the CGIs to locate the online documentation |
---|
32 | # and graphics. If you access the Nagios pages with an URL like |
---|
33 | # http://www.myhost.com/nagios, this value should be '/nagios' |
---|
34 | # (without the quotes). |
---|
35 | |
---|
36 | url_html_path=/nagios |
---|
37 | |
---|
38 | |
---|
39 | |
---|
40 | # CONTEXT-SENSITIVE HELP |
---|
41 | # This option determines whether or not a context-sensitive |
---|
42 | # help icon will be displayed for most of the CGIs. |
---|
43 | # Values: 0 = disables context-sensitive help |
---|
44 | # 1 = enables context-sensitive help |
---|
45 | |
---|
46 | show_context_help=0 |
---|
47 | |
---|
48 | |
---|
49 | |
---|
50 | # NAGIOS PROCESS CHECK COMMAND |
---|
51 | # This is the full path and filename of the program used to check |
---|
52 | # the status of the Nagios process. It is used only by the CGIs |
---|
53 | # and is completely optional. However, if you don't use it, you'll |
---|
54 | # see warning messages in the CGIs about the Nagios process |
---|
55 | # not running and you won't be able to execute any commands from |
---|
56 | # the web interface. The program should follow the same rules |
---|
57 | # as plugins; the return codes are the same as for the plugins, |
---|
58 | # it should have timeout protection, it should output something |
---|
59 | # to STDIO, etc. |
---|
60 | # |
---|
61 | # Note: The command line for the check_nagios plugin below may |
---|
62 | # have to be tweaked a bit, as different versions of the plugin |
---|
63 | # use different command line arguments/syntaxes. |
---|
64 | |
---|
65 | nagios_check_command=/usr/lib/nagios/plugins/check_nagios /var/log/nagios/status.dat 5 '/usr/sbin/nagios' |
---|
66 | |
---|
67 | |
---|
68 | |
---|
69 | # AUTHENTICATION USAGE |
---|
70 | # This option controls whether or not the CGIs will use any |
---|
71 | # authentication when displaying host and service information, as |
---|
72 | # well as committing commands to Nagios for processing. |
---|
73 | # |
---|
74 | # Read the HTML documentation to learn how the authorization works! |
---|
75 | # |
---|
76 | # NOTE: It is a really *bad* idea to disable authorization, unless |
---|
77 | # you plan on removing the command CGI (cmd.cgi)! Failure to do |
---|
78 | # so will leave you wide open to kiddies messing with Nagios and |
---|
79 | # possibly hitting you with a denial of service attack by filling up |
---|
80 | # your drive by continuously writing to your command file! |
---|
81 | # |
---|
82 | # Setting this value to 0 will cause the CGIs to *not* use |
---|
83 | # authentication (bad idea), while any other value will make them |
---|
84 | # use the authentication functions (the default). |
---|
85 | |
---|
86 | use_authentication=1 |
---|
87 | |
---|
88 | |
---|
89 | |
---|
90 | # DEFAULT USER |
---|
91 | # Setting this variable will define a default user name that can |
---|
92 | # access pages without authentication. This allows people within a |
---|
93 | # secure domain (i.e., behind a firewall) to see the current status |
---|
94 | # without authenticating. You may want to use this to avoid basic |
---|
95 | # authentication if you are not using a sercure server since basic |
---|
96 | # authentication transmits passwords in the clear. |
---|
97 | # |
---|
98 | # Important: Do not define a default username unless you are |
---|
99 | # running a secure web server and are sure that everyone who has |
---|
100 | # access to the CGIs has been authenticated in some manner! If you |
---|
101 | # define this variable, anyone who has not authenticated to the web |
---|
102 | # server will inherit all rights you assign to this user! |
---|
103 | |
---|
104 | #default_user_name=guest |
---|
105 | |
---|
106 | |
---|
107 | |
---|
108 | # SYSTEM/PROCESS INFORMATION ACCESS |
---|
109 | # This option is a comma-delimited list of all usernames that |
---|
110 | # have access to viewing the Nagios process information as |
---|
111 | # provided by the Extended Information CGI (extinfo.cgi). By |
---|
112 | # default, *no one* has access to this unless you choose to |
---|
113 | # not use authorization. You may use an asterisk (*) to |
---|
114 | # authorize any user who has authenticated to the web server. |
---|
115 | |
---|
116 | authorized_for_system_information=presbrey@MIT.EDU,quentin@MIT.EDU,geofft@MIT.EDU |
---|
117 | |
---|
118 | |
---|
119 | |
---|
120 | # CONFIGURATION INFORMATION ACCESS |
---|
121 | # This option is a comma-delimited list of all usernames that |
---|
122 | # can view ALL configuration information (hosts, commands, etc). |
---|
123 | # By default, users can only view configuration information |
---|
124 | # for the hosts and services they are contacts for. You may use |
---|
125 | # an asterisk (*) to authorize any user who has authenticated |
---|
126 | # to the web server. |
---|
127 | |
---|
128 | authorized_for_configuration_information=presbrey@MIT.EDU,quentin@MIT.EDU,geofft@MIT.EDU |
---|
129 | |
---|
130 | |
---|
131 | |
---|
132 | # SYSTEM/PROCESS COMMAND ACCESS |
---|
133 | # This option is a comma-delimited list of all usernames that |
---|
134 | # can issue shutdown and restart commands to Nagios via the |
---|
135 | # command CGI (cmd.cgi). Users in this list can also change |
---|
136 | # the program mode to active or standby. By default, *no one* |
---|
137 | # has access to this unless you choose to not use authorization. |
---|
138 | # You may use an asterisk (*) to authorize any user who has |
---|
139 | # authenticated to the web server. |
---|
140 | |
---|
141 | authorized_for_system_commands=presbrey@MIT.EDU,quentin@MIT.EDU,geofft@MIT.EDU |
---|
142 | |
---|
143 | |
---|
144 | |
---|
145 | # GLOBAL HOST/SERVICE VIEW ACCESS |
---|
146 | # These two options are comma-delimited lists of all usernames that |
---|
147 | # can view information for all hosts and services that are being |
---|
148 | # monitored. By default, users can only view information |
---|
149 | # for hosts or services that they are contacts for (unless you |
---|
150 | # you choose to not use authorization). You may use an asterisk (*) |
---|
151 | # to authorize any user who has authenticated to the web server. |
---|
152 | |
---|
153 | |
---|
154 | authorized_for_all_services=* |
---|
155 | authorized_for_all_hosts=* |
---|
156 | #authorized_for_all_services=presbrey@MIT.EDU,jbarnold@MIT.EDU |
---|
157 | #authorized_for_all_hosts=presbrey@MIT.EDU,jbarnold@MIT.EDU |
---|
158 | |
---|
159 | |
---|
160 | |
---|
161 | # GLOBAL HOST/SERVICE COMMAND ACCESS |
---|
162 | # These two options are comma-delimited lists of all usernames that |
---|
163 | # can issue host or service related commands via the command |
---|
164 | # CGI (cmd.cgi) for all hosts and services that are being monitored. |
---|
165 | # By default, users can only issue commands for hosts or services |
---|
166 | # that they are contacts for (unless you you choose to not use |
---|
167 | # authorization). You may use an asterisk (*) to authorize any |
---|
168 | # user who has authenticated to the web server. |
---|
169 | |
---|
170 | authorized_for_all_service_commands=presbrey@MIT.EDU,jbarnold@MIT.EDU,quentin@MIT.EDU,geofft@MIT.EDU |
---|
171 | authorized_for_all_host_commands=presbrey@MIT.EDU,jbarnold@MIT.EDU,quentin@MIT.EDU,geofft@MIT.EDU |
---|
172 | |
---|
173 | |
---|
174 | |
---|
175 | |
---|
176 | # STATUSMAP BACKGROUND IMAGE |
---|
177 | # This option allows you to specify an image to be used as a |
---|
178 | # background in the statusmap CGI. It is assumed that the image |
---|
179 | # resides in the HTML images path (i.e. /usr/local/nagios/share/images). |
---|
180 | # This path is automatically determined by appending "/images" |
---|
181 | # to the path specified by the 'physical_html_path' directive. |
---|
182 | # Note: The image file may be in GIF, PNG, JPEG, or GD2 format. |
---|
183 | # However, I recommend that you convert your image to GD2 format |
---|
184 | # (uncompressed), as this will cause less CPU load when the CGI |
---|
185 | # generates the image. |
---|
186 | |
---|
187 | #statusmap_background_image=smbackground.gd2 |
---|
188 | |
---|
189 | |
---|
190 | |
---|
191 | # DEFAULT STATUSMAP LAYOUT METHOD |
---|
192 | # This option allows you to specify the default layout method |
---|
193 | # the statusmap CGI should use for drawing hosts. If you do |
---|
194 | # not use this option, the default is to use user-defined |
---|
195 | # coordinates. Valid options are as follows: |
---|
196 | # 0 = User-defined coordinates |
---|
197 | # 1 = Depth layers |
---|
198 | # 2 = Collapsed tree |
---|
199 | # 3 = Balanced tree |
---|
200 | # 4 = Circular |
---|
201 | # 5 = Circular (Marked Up) |
---|
202 | |
---|
203 | default_statusmap_layout=5 |
---|
204 | |
---|
205 | |
---|
206 | |
---|
207 | # DEFAULT STATUSWRL LAYOUT METHOD |
---|
208 | # This option allows you to specify the default layout method |
---|
209 | # the statuswrl (VRML) CGI should use for drawing hosts. If you |
---|
210 | # do not use this option, the default is to use user-defined |
---|
211 | # coordinates. Valid options are as follows: |
---|
212 | # 0 = User-defined coordinates |
---|
213 | # 2 = Collapsed tree |
---|
214 | # 3 = Balanced tree |
---|
215 | # 4 = Circular |
---|
216 | |
---|
217 | default_statuswrl_layout=4 |
---|
218 | |
---|
219 | |
---|
220 | |
---|
221 | # STATUSWRL INCLUDE |
---|
222 | # This option allows you to include your own objects in the |
---|
223 | # generated VRML world. It is assumed that the file |
---|
224 | # resides in the HTML path (i.e. /usr/local/nagios/share). |
---|
225 | |
---|
226 | #statuswrl_include=myworld.wrl |
---|
227 | |
---|
228 | |
---|
229 | |
---|
230 | # PING SYNTAX |
---|
231 | # This option determines what syntax should be used when |
---|
232 | # attempting to ping a host from the WAP interface (using |
---|
233 | # the statuswml CGI. You must include the full path to |
---|
234 | # the ping binary, along with all required options. The |
---|
235 | # $HOSTADDRESS$ macro is substituted with the address of |
---|
236 | # the host before the command is executed. |
---|
237 | # Please note that the syntax for the ping binary is |
---|
238 | # notorious for being different on virtually ever *NIX |
---|
239 | # OS and distribution, so you may have to tweak this to |
---|
240 | # work on your system. |
---|
241 | |
---|
242 | ping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$ |
---|
243 | |
---|
244 | |
---|
245 | |
---|
246 | # REFRESH RATE |
---|
247 | # This option allows you to specify the refresh rate in seconds |
---|
248 | # of various CGIs (status, statusmap, extinfo, and outages). |
---|
249 | |
---|
250 | refresh_rate=60 |
---|
251 | |
---|
252 | |
---|
253 | |
---|
254 | # SOUND OPTIONS |
---|
255 | # These options allow you to specify an optional audio file |
---|
256 | # that should be played in your browser window when there are |
---|
257 | # problems on the network. The audio files are used only in |
---|
258 | # the status CGI. Only the sound for the most critical problem |
---|
259 | # will be played. Order of importance (higher to lower) is as |
---|
260 | # follows: unreachable hosts, down hosts, critical services, |
---|
261 | # warning services, and unknown services. If there are no |
---|
262 | # visible problems, the sound file optionally specified by |
---|
263 | # 'normal_sound' variable will be played. |
---|
264 | # |
---|
265 | # |
---|
266 | # <varname>=<sound_file> |
---|
267 | # |
---|
268 | # Note: All audio files must be placed in the /media subdirectory |
---|
269 | # under the HTML path (i.e. /usr/local/nagios/share/media/). |
---|
270 | |
---|
271 | #host_unreachable_sound=hostdown.wav |
---|
272 | #host_down_sound=hostdown.wav |
---|
273 | #service_critical_sound=critical.wav |
---|
274 | #service_warning_sound=warning.wav |
---|
275 | #service_unknown_sound=warning.wav |
---|
276 | #normal_sound=noproblem.wav |
---|
277 | |
---|