Debian Codegraph @

sample-config/nagios.cfg.in

raw ◀ ▶
Source reconstructed at patch state 2 of 3 — not the installed (fully patched) source.
3 Debian patches touch this file
1 ##############################################################################
2 #
3 # NAGIOS.CFG - Sample Main Config File for Nagios @VERSION@
4 #
5 # Read the documentation for more information on this configuration
6 # file. I've provided some comments here, but things may not be so
7 # clear without further explanation.
8 #
9 #
10 ##############################################################################
11
12
13 # LOG FILE
14 # This is the main log file where service and host events are logged
15 # for historical purposes. This should be the first option specified
16 # in the config file!!!
17
18 log_file=/var/log/nagios4/nagios.log
19
20
21
22 # Debian also defaults to using the check commands defined by the debian
23 # monitoring-plugins package
24 cfg_dir=/etc/nagios-plugins/config
25
26 # Debian uses by default a configuration directory where nagios4-common,
27 # other packages and the local admin can dump or link configuration
28 # files into.
29 cfg_dir=@sysconfdir@/conf.d
30
31
32
33 # OBJECT CONFIGURATION FILE(S)
34 # These are the object configuration files in which you define hosts,
35 # host groups, contacts, contact groups, services, etc.
36 # You can split your object definitions across several config files
37 # if you wish (as shown below), or keep them all in a single config file.
38
39 # You can specify individual object config files as shown below:
40 cfg_file=@sysconfdir@/objects/commands.cfg
41 cfg_file=@sysconfdir@/objects/contacts.cfg
42 cfg_file=@sysconfdir@/objects/timeperiods.cfg
43 cfg_file=@sysconfdir@/objects/templates.cfg
44
45 # Definitions for monitoring the local (Linux) host
46 cfg_file=@sysconfdir@/objects/localhost.cfg
47
48 # Definitions for monitoring a Windows machine
49 #cfg_file=@sysconfdir@/objects/windows.cfg
50
51 # Definitions for monitoring a router/switch
52 #cfg_file=@sysconfdir@/objects/switch.cfg
53
54 # Definitions for monitoring a network printer
55 #cfg_file=@sysconfdir@/objects/printer.cfg
56
57
58 # You can also tell Nagios to process all config files (with a .cfg
59 # extension) in a particular directory by using the cfg_dir
60 # directive as shown below:
61
62 #cfg_dir=@sysconfdir@/servers
63 #cfg_dir=@sysconfdir@/printers
64 #cfg_dir=@sysconfdir@/switches
65 #cfg_dir=@sysconfdir@/routers
66
67
68
69
70 # OBJECT CACHE FILE
71 # This option determines where object definitions are cached when
72 # Nagios starts/restarts. The CGIs read object definitions from
73 # this cache file (rather than looking at the object config files
74 # directly) in order to prevent inconsistencies that can occur
75 # when the config files are modified after Nagios starts.
76
77 object_cache_file=@localstatedir@/objects.cache
78
79
80
81 # PRE-CACHED OBJECT FILE
82 # This options determines the location of the precached object file.
83 # If you run Nagios with the -p command line option, it will preprocess
84 # your object configuration file(s) and write the cached config to this
85 # file. You can then start Nagios with the -u option to have it read
86 # object definitions from this precached file, rather than the standard
87 # object configuration files (see the cfg_file and cfg_dir options above).
88 # Using a precached object file can speed up the time needed to (re)start
89 # the Nagios process if you've got a large and/or complex configuration.
90 # Read the documentation section on optimizing Nagios to find our more
91 # about how this feature works.
92
93 precached_object_file=@localstatedir@/objects.precache
94
95
96
97 # RESOURCE FILE
98 # This is an optional resource file that contains $USERx$ macro
99 # definitions. Multiple resource files can be specified by using
100 # multiple resource_file definitions. The CGIs will not attempt to
101 # read the contents of resource files, so information that is
102 # considered to be sensitive (usernames, passwords, etc) can be
103 # defined as macros in this file and restrictive permissions (600)
104 # can be placed on this file.
105
106 resource_file=@sysconfdir@/resource.cfg
107
108
109
110 # STATUS FILE
111 # This is where the current status of all monitored services and
112 # hosts is stored. Its contents are read and processed by the CGIs.
113 # The contents of the status file are deleted every time Nagios
114 # restarts.
115
116 status_file=@localstatedir@/status.dat
117
118
119
120 # STATUS FILE UPDATE INTERVAL
121 # This option determines the frequency (in seconds) that
122 # Nagios will periodically dump program, host, and
123 # service status data.
124
125 status_update_interval=10
126
127
128
129 # NAGIOS USER
130 # This determines the effective user that Nagios should run as.
131 # You can either supply a username or a UID.
132
133 nagios_user=@nagios_user@
134
135
136
137 # NAGIOS GROUP
138 # This determines the effective group that Nagios should run as.
139 # You can either supply a group name or a GID.
140
141 nagios_group=@nagios_grp@
142
143
144
145 # EXTERNAL COMMAND OPTION
146 # This option allows you to specify whether or not Nagios should check
147 # for external commands (in the command file defined below).
148 # By default Nagios will check for external commands.
149 # If you want to be able to use the CGI command interface
150 # you will have to enable this.
151 # Values: 0 = disable commands, 1 = enable commands
152
153 check_external_commands=1
154
155
156
157 # EXTERNAL COMMAND FILE
158 # This is the file that Nagios checks for external command requests.
159 # It is also where the command CGI will write commands that are submitted
160 # by users, so it must be writeable by the user that the web server
161 # is running as (usually 'nobody'). Permissions should be set at the
162 # directory level instead of on the file, as the file is deleted every
163 # time its contents are processed.
164
165 command_file=@localstatedir@/rw/nagios.cmd
166
167
168
169 # QUERY HANDLER INTERFACE
170 # This is the socket that is created for the Query Handler interface
171
172 #query_socket=@localstatedir@/rw/nagios.qh
173
174
175
176 # LOCK FILE
177 # This is the lockfile that Nagios will use to store its PID number
178 # in when it is running in daemon mode.
179
180 lock_file=@subsyslockfile@
181
182
183
184 # TEMP FILE
185 # This is a temporary file that is used as scratch space when Nagios
186 # updates the status log, cleans the comment file, etc. This file
187 # is created, used, and deleted throughout the time that Nagios is
188 # running.
189
190 temp_file=@localstatedir@/nagios.tmp
191
192
193
194 # TEMP PATH
195 # This is path where Nagios can create temp files for service and
196 # host check results, etc.
197
198 temp_path=@TMPDIR@
199
200
201
202 # EVENT BROKER OPTIONS
203 # Controls what (if any) data gets sent to the event broker.
204 # Values: 0 = Broker nothing
205 # -1 = Broker everything
206 # <other> = See documentation
207
208 event_broker_options=-1
209
210
211
212 # EVENT BROKER MODULE(S)
213 # This directive is used to specify an event broker module that should
214 # by loaded by Nagios at startup. Use multiple directives if you want
215 # to load more than one module. Arguments that should be passed to
216 # the module at startup are separated from the module path by a space.
217 #
218 #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
219 # WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING
220 #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
221 #
222 # Do NOT overwrite modules while they are being used by Nagios or Nagios
223 # will crash in a fiery display of SEGFAULT glory. This is a bug/limitation
224 # either in dlopen(), the kernel, and/or the filesystem. And maybe Nagios...
225 #
226 # The correct/safe way of updating a module is by using one of these methods:
227 # 1. Shutdown Nagios, replace the module file, restart Nagios
228 # 2. Delete the original module file, move the new module file into place,
229 # restart Nagios
230 #
231 # Example:
232 #
233 # broker_module=<modulepath> [moduleargs]
234
235 #broker_module=/somewhere/module1.o
236 #broker_module=/somewhere/module2.o arg1 arg2=3 debug=0
237
238
239
240 # LOG ROTATION METHOD
241 # This is the log rotation method that Nagios should use to rotate
242 # the main log file. Values are as follows..
243 # n = None - don't rotate the log
244 # h = Hourly rotation (top of the hour)
245 # d = Daily rotation (midnight every day)
246 # w = Weekly rotation (midnight on Saturday evening)
247 # m = Monthly rotation (midnight last day of month)
248
249 log_rotation_method=d
250
251
252
253 # LOG ARCHIVE PATH
254 # This is the directory where archived (rotated) log files should be
255 # placed (assuming you've chosen to do log rotation).
256
257 log_archive_path=/var/log/nagios4/archives
258
259
260
261 # LOGGING OPTIONS
262 # If you want messages logged to the syslog facility, as well as the
263 # Nagios log file set this option to 1. If not, set it to 0.
264
265 use_syslog=1
266
267
268
269 # NOTIFICATION LOGGING OPTION
270 # If you don't want notifications to be logged, set this value to 0.
271 # If notifications should be logged, set the value to 1.
272
273 log_notifications=1
274
275
276
277 # SERVICE RETRY LOGGING OPTION
278 # If you don't want service check retries to be logged, set this value
279 # to 0. If retries should be logged, set the value to 1.
280
281 log_service_retries=1
282
283
284
285 # HOST RETRY LOGGING OPTION
286 # If you don't want host check retries to be logged, set this value to
287 # 0. If retries should be logged, set the value to 1.
288
289 log_host_retries=1
290
291
292
293 # EVENT HANDLER LOGGING OPTION
294 # If you don't want host and service event handlers to be logged, set
295 # this value to 0. If event handlers should be logged, set the value
296 # to 1.
297
298 log_event_handlers=1
299
300
301
302 # INITIAL STATES LOGGING OPTION
303 # If you want Nagios to log all initial host and service states to
304 # the main log file (the first time the service or host is checked)
305 # you can enable this option by setting this value to 1. If you
306 # are not using an external application that does long term state
307 # statistics reporting, you do not need to enable this option. In
308 # this case, set the value to 0.
309
310 log_initial_states=0
311
312
313
314 # CURRENT STATES LOGGING OPTION
315 # If you don't want Nagios to log all current host and service states
316 # after log has been rotated to the main log file, you can disable this
317 # option by setting this value to 0. Default value is 1.
318
319 log_current_states=1
320
321
322
323 # EXTERNAL COMMANDS LOGGING OPTION
324 # If you don't want Nagios to log external commands, set this value
325 # to 0. If external commands should be logged, set this value to 1.
326 # Note: This option does not include logging of passive service
327 # checks - see the option below for controlling whether or not
328 # passive checks are logged.
329
330 log_external_commands=1
331
332
333
334 # PASSIVE CHECKS LOGGING OPTION
335 # If you don't want Nagios to log passive host and service checks, set
336 # this value to 0. If passive checks should be logged, set
337 # this value to 1.
338
339 log_passive_checks=1
340
341
342
343 # GLOBAL HOST AND SERVICE EVENT HANDLERS
344 # These options allow you to specify a host and service event handler
345 # command that is to be run for every host or service state change.
346 # The global event handler is executed immediately prior to the event
347 # handler that you have optionally specified in each host or
348 # service definition. The command argument is the short name of a
349 # command definition that you define in your host configuration file.
350 # Read the HTML docs for more information.
351
352 #global_host_event_handler=somecommand
353 #global_service_event_handler=somecommand
354
355
356
357 # SERVICE INTER-CHECK DELAY METHOD
358 # This is the method that Nagios should use when initially
359 # "spreading out" service checks when it starts monitoring. The
360 # default is to use smart delay calculation, which will try to
361 # space all service checks out evenly to minimize CPU load.
362 # Using the dumb setting will cause all checks to be scheduled
363 # at the same time (with no delay between them)! This is not a
364 # good thing for production, but is useful when testing the
365 # parallelization functionality.
366 # n = None - don't use any delay between checks
367 # d = Use a "dumb" delay of 1 second between checks
368 # s = Use "smart" inter-check delay calculation
369 # x.xx = Use an inter-check delay of x.xx seconds
370
371 service_inter_check_delay_method=s
372
373
374
375 # MAXIMUM SERVICE CHECK SPREAD
376 # This variable determines the timeframe (in minutes) from the
377 # program start time that an initial check of all services should
378 # be completed. Default is 30 minutes.
379
380 max_service_check_spread=30
381
382
383
384 # SERVICE CHECK INTERLEAVE FACTOR
385 # This variable determines how service checks are interleaved.
386 # Interleaving the service checks allows for a more even
387 # distribution of service checks and reduced load on remote
388 # hosts. Setting this value to 1 is equivalent to how versions
389 # of Nagios previous to 0.0.5 did service checks. Set this
390 # value to s (smart) for automatic calculation of the interleave
391 # factor unless you have a specific reason to change it.
392 # s = Use "smart" interleave factor calculation
393 # x = Use an interleave factor of x, where x is a
394 # number greater than or equal to 1.
395
396 service_interleave_factor=s
397
398
399
400 # HOST INTER-CHECK DELAY METHOD
401 # This is the method that Nagios should use when initially
402 # "spreading out" host checks when it starts monitoring. The
403 # default is to use smart delay calculation, which will try to
404 # space all host checks out evenly to minimize CPU load.
405 # Using the dumb setting will cause all checks to be scheduled
406 # at the same time (with no delay between them)!
407 # n = None - don't use any delay between checks
408 # d = Use a "dumb" delay of 1 second between checks
409 # s = Use "smart" inter-check delay calculation
410 # x.xx = Use an inter-check delay of x.xx seconds
411
412 host_inter_check_delay_method=s
413
414
415
416 # MAXIMUM HOST CHECK SPREAD
417 # This variable determines the timeframe (in minutes) from the
418 # program start time that an initial check of all hosts should
419 # be completed. Default is 30 minutes.
420
421 max_host_check_spread=30
422
423
424
425 # MAXIMUM CONCURRENT SERVICE CHECKS
426 # This option allows you to specify the maximum number of
427 # service checks that can be run in parallel at any given time.
428 # Specifying a value of 1 for this variable essentially prevents
429 # any service checks from being parallelized. A value of 0
430 # will not restrict the number of concurrent checks that are
431 # being executed.
432
433 max_concurrent_checks=0
434
435
436
437 # HOST AND SERVICE CHECK REAPER FREQUENCY
438 # This is the frequency (in seconds!) that Nagios will process
439 # the results of host and service checks.
440
441 check_result_reaper_frequency=10
442
443
444
445
446 # MAX CHECK RESULT REAPER TIME
447 # This is the max amount of time (in seconds) that a single
448 # check result reaper event will be allowed to run before
449 # returning control back to Nagios so it can perform other
450 # duties.
451
452 max_check_result_reaper_time=30
453
454
455
456
457 # CHECK RESULT PATH
458 # This is directory where Nagios stores the results of host and
459 # service checks that have not yet been processed.
460 #
461 # Note: Make sure that only one instance of Nagios has access
462 # to this directory!
463
464 check_result_path=@CHECKRESULTDIR@
465
466
467
468
469 # MAX CHECK RESULT FILE AGE
470 # This option determines the maximum age (in seconds) which check
471 # result files are considered to be valid. Files older than this
472 # threshold will be mercilessly deleted without further processing.
473
474 max_check_result_file_age=3600
475
476
477
478
479 # CACHED HOST CHECK HORIZON
480 # This option determines the maximum amount of time (in seconds)
481 # that the state of a previous host check is considered current.
482 # Cached host states (from host checks that were performed more
483 # recently that the timeframe specified by this value) can immensely
484 # improve performance in regards to the host check logic.
485 # Too high of a value for this option may result in inaccurate host
486 # states being used by Nagios, while a lower value may result in a
487 # performance hit for host checks. Use a value of 0 to disable host
488 # check caching.
489
490 cached_host_check_horizon=15
491
492
493
494 # CACHED SERVICE CHECK HORIZON
495 # This option determines the maximum amount of time (in seconds)
496 # that the state of a previous service check is considered current.
497 # Cached service states (from service checks that were performed more
498 # recently that the timeframe specified by this value) can immensely
499 # improve performance in regards to predictive dependency checks.
500 # Use a value of 0 to disable service check caching.
501
502 cached_service_check_horizon=15
503
504
505
506 # ENABLE PREDICTIVE HOST DEPENDENCY CHECKS
507 # This option determines whether or not Nagios will attempt to execute
508 # checks of hosts when it predicts that future dependency logic test
509 # may be needed. These predictive checks can help ensure that your
510 # host dependency logic works well.
511 # Values:
512 # 0 = Disable predictive checks
513 # 1 = Enable predictive checks (default)
514
515 enable_predictive_host_dependency_checks=1
516
517
518
519 # ENABLE PREDICTIVE SERVICE DEPENDENCY CHECKS
520 # This option determines whether or not Nagios will attempt to execute
521 # checks of service when it predicts that future dependency logic test
522 # may be needed. These predictive checks can help ensure that your
523 # service dependency logic works well.
524 # Values:
525 # 0 = Disable predictive checks
526 # 1 = Enable predictive checks (default)
527
528 enable_predictive_service_dependency_checks=1
529
530
531
532 # SOFT STATE DEPENDENCIES
533 # This option determines whether or not Nagios will use soft state
534 # information when checking host and service dependencies. Normally
535 # Nagios will only use the latest hard host or service state when
536 # checking dependencies. If you want it to use the latest state (regardless
537 # of whether its a soft or hard state type), enable this option.
538 # Values:
539 # 0 = Don't use soft state dependencies (default)
540 # 1 = Use soft state dependencies
541
542 soft_state_dependencies=0
543
544
545
546 # TIME CHANGE ADJUSTMENT THRESHOLDS
547 # These options determine when Nagios will react to detected changes
548 # in system time (either forward or backwards).
549
550 #time_change_threshold=900
551
552
553
554 # AUTO-RESCHEDULING OPTION
555 # This option determines whether or not Nagios will attempt to
556 # automatically reschedule active host and service checks to
557 # "smooth" them out over time. This can help balance the load on
558 # the monitoring server.
559 # WARNING: THIS IS AN EXPERIMENTAL FEATURE - IT CAN DEGRADE
560 # PERFORMANCE, RATHER THAN INCREASE IT, IF USED IMPROPERLY
561
562 auto_reschedule_checks=0
563
564
565
566 # AUTO-RESCHEDULING INTERVAL
567 # This option determines how often (in seconds) Nagios will
568 # attempt to automatically reschedule checks. This option only
569 # has an effect if the auto_reschedule_checks option is enabled.
570 # Default is 30 seconds.
571 # WARNING: THIS IS AN EXPERIMENTAL FEATURE - IT CAN DEGRADE
572 # PERFORMANCE, RATHER THAN INCREASE IT, IF USED IMPROPERLY
573
574 auto_rescheduling_interval=30
575
576
577
578 # AUTO-RESCHEDULING WINDOW
579 # This option determines the "window" of time (in seconds) that
580 # Nagios will look at when automatically rescheduling checks.
581 # Only host and service checks that occur in the next X seconds
582 # (determined by this variable) will be rescheduled. This option
583 # only has an effect if the auto_reschedule_checks option is
584 # enabled. Default is 180 seconds (3 minutes).
585 # WARNING: THIS IS AN EXPERIMENTAL FEATURE - IT CAN DEGRADE
586 # PERFORMANCE, RATHER THAN INCREASE IT, IF USED IMPROPERLY
587
588 auto_rescheduling_window=180
589
590
591
592 # TIMEOUT VALUES
593 # These options control how much time Nagios will allow various
594 # types of commands to execute before killing them off. Options
595 # are available for controlling maximum time allotted for
596 # service checks, host checks, event handlers, notifications, the
597 # ocsp command, and performance data commands. All values are in
598 # seconds.
599
600 service_check_timeout=60
601 host_check_timeout=30
602 event_handler_timeout=30
603 notification_timeout=30
604 ocsp_timeout=5
605 ochp_timeout=5
606 perfdata_timeout=5
607
608
609
610 # RETAIN STATE INFORMATION
611 # This setting determines whether or not Nagios will save state
612 # information for services and hosts before it shuts down. Upon
613 # startup Nagios will reload all saved service and host state
614 # information before starting to monitor. This is useful for
615 # maintaining long-term data on state statistics, etc, but will
616 # slow Nagios down a bit when it (re)starts. Since its only
617 # a one-time penalty, I think its well worth the additional
618 # startup delay.
619
620 retain_state_information=1
621
622
623
624 # STATE RETENTION FILE
625 # This is the file that Nagios should use to store host and
626 # service state information before it shuts down. The state
627 # information in this file is also read immediately prior to
628 # starting to monitor the network when Nagios is restarted.
629 # This file is used only if the retain_state_information
630 # variable is set to 1.
631
632 state_retention_file=@localstatedir@/retention.dat
633
634
635
636 # RETENTION DATA UPDATE INTERVAL
637 # This setting determines how often (in minutes) that Nagios
638 # will automatically save retention data during normal operation.
639 # If you set this value to 0, Nagios will not save retention
640 # data at regular interval, but it will still save retention
641 # data before shutting down or restarting. If you have disabled
642 # state retention, this option has no effect.
643
644 retention_update_interval=60
645
646
647
648 # USE RETAINED PROGRAM STATE
649 # This setting determines whether or not Nagios will set
650 # program status variables based on the values saved in the
651 # retention file. If you want to use retained program status
652 # information, set this value to 1. If not, set this value
653 # to 0.
654
655 use_retained_program_state=1
656
657
658
659 # USE RETAINED SCHEDULING INFO
660 # This setting determines whether or not Nagios will retain
661 # the scheduling info (next check time) for hosts and services
662 # based on the values saved in the retention file. If you
663 # If you want to use retained scheduling info, set this
664 # value to 1. If not, set this value to 0.
665
666 use_retained_scheduling_info=1
667
668
669
670 # RETAINED ATTRIBUTE MASKS (ADVANCED FEATURE)
671 # The following variables are used to specify specific host and
672 # service attributes that should *not* be retained by Nagios during
673 # program restarts.
674 #
675 # The values of the masks are bitwise ANDs of values specified
676 # by the "MODATTR_" definitions found in include/common.h.
677 # For example, if you do not want the current enabled/disabled state
678 # of flap detection and event handlers for hosts to be retained, you
679 # would use a value of 24 for the host attribute mask...
680 # MODATTR_EVENT_HANDLER_ENABLED (8) + MODATTR_FLAP_DETECTION_ENABLED (16) = 24
681
682 # This mask determines what host attributes are not retained
683 retained_host_attribute_mask=0
684
685 # This mask determines what service attributes are not retained
686 retained_service_attribute_mask=0
687
688 # These two masks determine what process attributes are not retained.
689 # There are two masks, because some process attributes have host and service
690 # options. For example, you can disable active host checks, but leave active
691 # service checks enabled.
692 retained_process_host_attribute_mask=0
693 retained_process_service_attribute_mask=0
694
695 # These two masks determine what contact attributes are not retained.
696 # There are two masks, because some contact attributes have host and
697 # service options. For example, you can disable host notifications for
698 # a contact, but leave service notifications enabled for them.
699 retained_contact_host_attribute_mask=0
700 retained_contact_service_attribute_mask=0
701
702
703
704 # INTERVAL LENGTH
705 # This is the seconds per unit interval as used in the
706 # host/contact/service configuration files. Setting this to 60 means
707 # that each interval is one minute long (60 seconds). Other settings
708 # have not been tested much, so your mileage is likely to vary...
709
710 interval_length=60
711
712
713
714 # CHECK FOR UPDATES
715 # This option determines whether Nagios will automatically check to
716 # see if new updates (releases) are available. It is recommend that you
717 # enable this option to ensure that you stay on top of the latest critical
718 # patches to Nagios. Nagios is critical to you - make sure you keep it in
719 # good shape. Nagios will check once a day for new updates. Data collected
720 # by Nagios Enterprises from the update check is processed in accordance
721 # with our privacy policy - see https://api.nagios.org for details.
722
723 check_for_updates=1
724
725
726
727 # BARE UPDATE CHECK
728 # This option determines what data Nagios will send to api.nagios.org when
729 # it checks for updates. By default, Nagios will send information on the
730 # current version of Nagios you have installed, as well as an indicator as
731 # to whether this was a new installation or not. Nagios Enterprises uses
732 # this data to determine the number of users running specific version of
733 # Nagios. Enable this option if you do not want this information to be sent.
734
735 bare_update_check=0
736
737
738
739 # AGGRESSIVE HOST CHECKING OPTION
740 # If you don't want to turn on aggressive host checking features, set
741 # this value to 0 (the default). Otherwise set this value to 1 to
742 # enable the aggressive check option. Read the docs for more info
743 # on what aggressive host check is or check out the source code in
744 # base/checks.c
745
746 use_aggressive_host_checking=0
747
748
749
750 # SERVICE CHECK EXECUTION OPTION
751 # This determines whether or not Nagios will actively execute
752 # service checks when it initially starts. If this option is
753 # disabled, checks are not actively made, but Nagios can still
754 # receive and process passive check results that come in. Unless
755 # you're implementing redundant hosts or have a special need for
756 # disabling the execution of service checks, leave this enabled!
757 # Values: 1 = enable checks, 0 = disable checks
758
759 execute_service_checks=1
760
761
762
763 # PASSIVE SERVICE CHECK ACCEPTANCE OPTION
764 # This determines whether or not Nagios will accept passive
765 # service checks results when it initially (re)starts.
766 # Values: 1 = accept passive checks, 0 = reject passive checks
767
768 accept_passive_service_checks=1
769
770
771
772 # HOST CHECK EXECUTION OPTION
773 # This determines whether or not Nagios will actively execute
774 # host checks when it initially starts. If this option is
775 # disabled, checks are not actively made, but Nagios can still
776 # receive and process passive check results that come in. Unless
777 # you're implementing redundant hosts or have a special need for
778 # disabling the execution of host checks, leave this enabled!
779 # Values: 1 = enable checks, 0 = disable checks
780
781 execute_host_checks=1
782
783
784
785 # PASSIVE HOST CHECK ACCEPTANCE OPTION
786 # This determines whether or not Nagios will accept passive
787 # host checks results when it initially (re)starts.
788 # Values: 1 = accept passive checks, 0 = reject passive checks
789
790 accept_passive_host_checks=1
791
792
793
794 # NOTIFICATIONS OPTION
795 # This determines whether or not Nagios will sent out any host or
796 # service notifications when it is initially (re)started.
797 # Values: 1 = enable notifications, 0 = disable notifications
798
799 enable_notifications=1
800
801
802
803 # EVENT HANDLER USE OPTION
804 # This determines whether or not Nagios will run any host or
805 # service event handlers when it is initially (re)started. Unless
806 # you're implementing redundant hosts, leave this option enabled.
807 # Values: 1 = enable event handlers, 0 = disable event handlers
808
809 enable_event_handlers=1
810
811
812
813 # PROCESS PERFORMANCE DATA OPTION
814 # This determines whether or not Nagios will process performance
815 # data returned from service and host checks. If this option is
816 # enabled, host performance data will be processed using the
817 # host_perfdata_command (defined below) and service performance
818 # data will be processed using the service_perfdata_command (also
819 # defined below). Read the HTML docs for more information on
820 # performance data.
821 # Values: 1 = process performance data, 0 = do not process performance data
822
823 process_performance_data=0
824
825
826
827 # HOST AND SERVICE PERFORMANCE DATA PROCESSING COMMANDS
828 # These commands are run after every host and service check is
829 # performed. These commands are executed only if the
830 # enable_performance_data option (above) is set to 1. The command
831 # argument is the short name of a command definition that you
832 # define in your host configuration file. Read the HTML docs for
833 # more information on performance data.
834
835 #host_perfdata_command=process-host-perfdata
836 #service_perfdata_command=process-service-perfdata
837
838
839
840 # HOST AND SERVICE PERFORMANCE DATA FILES
841 # These files are used to store host and service performance data.
842 # Performance data is only written to these files if the
843 # enable_performance_data option (above) is set to 1.
844
845 #host_perfdata_file=@localstatedir@/host-perfdata
846 #service_perfdata_file=@localstatedir@/service-perfdata
847
848
849
850 # HOST AND SERVICE PERFORMANCE DATA FILE TEMPLATES
851 # These options determine what data is written (and how) to the
852 # performance data files. The templates may contain macros, special
853 # characters (\t for tab, \r for carriage return, \n for newline)
854 # and plain text. A newline is automatically added after each write
855 # to the performance data file. Some examples of what you can do are
856 # shown below.
857
858 #host_perfdata_file_template=[HOSTPERFDATA]\t$TIMET$\t$HOSTNAME$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$
859 #service_perfdata_file_template=[SERVICEPERFDATA]\t$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$
860
861
862
863 # HOST AND SERVICE PERFORMANCE DATA FILE MODES
864 # This option determines whether or not the host and service
865 # performance data files are opened in write ("w") or append ("a")
866 # mode. If you want to use named pipes, you should use the special
867 # pipe ("p") mode which avoid blocking at startup, otherwise you will
868 # likely want the default append ("a") mode.
869
870 #host_perfdata_file_mode=a
871 #service_perfdata_file_mode=a
872
873
874
875 # HOST AND SERVICE PERFORMANCE DATA FILE PROCESSING INTERVAL
876 # These options determine how often (in seconds) the host and service
877 # performance data files are processed using the commands defined
878 # below. A value of 0 indicates the files should not be periodically
879 # processed.
880
881 #host_perfdata_file_processing_interval=0
882 #service_perfdata_file_processing_interval=0
883
884
885
886 # HOST AND SERVICE PERFORMANCE DATA FILE PROCESSING COMMANDS
887 # These commands are used to periodically process the host and
888 # service performance data files. The interval at which the
889 # processing occurs is determined by the options above.
890
891 #host_perfdata_file_processing_command=process-host-perfdata-file
892 #service_perfdata_file_processing_command=process-service-perfdata-file
893
894
895
896 # HOST AND SERVICE PERFORMANCE DATA PROCESS EMPTY RESULTS
897 # These options determine whether the core will process empty perfdata
898 # results or not. This is needed for distributed monitoring, and intentionally
899 # turned on by default.
900 # If you don't require empty perfdata - saving some cpu cycles
901 # on unwanted macro calculation - you can turn that off. Be careful!
902 # Values: 1 = enable, 0 = disable
903
904 #host_perfdata_process_empty_results=1
905 #service_perfdata_process_empty_results=1
906
907
908 # OBSESS OVER SERVICE CHECKS OPTION
909 # This determines whether or not Nagios will obsess over service
910 # checks and run the ocsp_command defined below. Unless you're
911 # planning on implementing distributed monitoring, do not enable
912 # this option. Read the HTML docs for more information on
913 # implementing distributed monitoring.
914 # Values: 1 = obsess over services, 0 = do not obsess (default)
915
916 obsess_over_services=0
917
918
919
920 # OBSESSIVE COMPULSIVE SERVICE PROCESSOR COMMAND
921 # This is the command that is run for every service check that is
922 # processed by Nagios. This command is executed only if the
923 # obsess_over_services option (above) is set to 1. The command
924 # argument is the short name of a command definition that you
925 # define in your host configuration file. Read the HTML docs for
926 # more information on implementing distributed monitoring.
927
928 #ocsp_command=somecommand
929
930
931
932 # OBSESS OVER HOST CHECKS OPTION
933 # This determines whether or not Nagios will obsess over host
934 # checks and run the ochp_command defined below. Unless you're
935 # planning on implementing distributed monitoring, do not enable
936 # this option. Read the HTML docs for more information on
937 # implementing distributed monitoring.
938 # Values: 1 = obsess over hosts, 0 = do not obsess (default)
939
940 obsess_over_hosts=0
941
942
943
944 # OBSESSIVE COMPULSIVE HOST PROCESSOR COMMAND
945 # This is the command that is run for every host check that is
946 # processed by Nagios. This command is executed only if the
947 # obsess_over_hosts option (above) is set to 1. The command
948 # argument is the short name of a command definition that you
949 # define in your host configuration file. Read the HTML docs for
950 # more information on implementing distributed monitoring.
951
952 #ochp_command=somecommand
953
954
955
956 # TRANSLATE PASSIVE HOST CHECKS OPTION
957 # This determines whether or not Nagios will translate
958 # DOWN/UNREACHABLE passive host check results into their proper
959 # state for this instance of Nagios. This option is useful
960 # if you have distributed or failover monitoring setup. In
961 # these cases your other Nagios servers probably have a different
962 # "view" of the network, with regards to the parent/child relationship
963 # of hosts. If a distributed monitoring server thinks a host
964 # is DOWN, it may actually be UNREACHABLE from the point of
965 # this Nagios instance. Enabling this option will tell Nagios
966 # to translate any DOWN or UNREACHABLE host states it receives
967 # passively into the correct state from the view of this server.
968 # Values: 1 = perform translation, 0 = do not translate (default)
969
970 translate_passive_host_checks=0
971
972
973
974 # PASSIVE HOST CHECKS ARE SOFT OPTION
975 # This determines whether or not Nagios will treat passive host
976 # checks as being HARD or SOFT. By default, a passive host check
977 # result will put a host into a HARD state type. This can be changed
978 # by enabling this option.
979 # Values: 0 = passive checks are HARD, 1 = passive checks are SOFT
980
981 passive_host_checks_are_soft=0
982
983
984
985 # ORPHANED HOST/SERVICE CHECK OPTIONS
986 # These options determine whether or not Nagios will periodically
987 # check for orphaned host service checks. Since service checks are
988 # not rescheduled until the results of their previous execution
989 # instance are processed, there exists a possibility that some
990 # checks may never get rescheduled. A similar situation exists for
991 # host checks, although the exact scheduling details differ a bit
992 # from service checks. Orphaned checks seem to be a rare
993 # problem and should not happen under normal circumstances.
994 # If you have problems with service checks never getting
995 # rescheduled, make sure you have orphaned service checks enabled.
996 # Values: 1 = enable checks, 0 = disable checks
997
998 check_for_orphaned_services=1
999 check_for_orphaned_hosts=1
1000
1001
1002
1003 # SERVICE FRESHNESS CHECK OPTION
1004 # This option determines whether or not Nagios will periodically
1005 # check the "freshness" of service results. Enabling this option
1006 # is useful for ensuring passive checks are received in a timely
1007 # manner.
1008 # Values: 1 = enabled freshness checking, 0 = disable freshness checking
1009
1010 check_service_freshness=1
1011
1012
1013
1014 # SERVICE FRESHNESS CHECK INTERVAL
1015 # This setting determines how often (in seconds) Nagios will
1016 # check the "freshness" of service check results. If you have
1017 # disabled service freshness checking, this option has no effect.
1018
1019 service_freshness_check_interval=60
1020
1021
1022
1023 # SERVICE CHECK TIMEOUT STATE
1024 # This setting determines the state Nagios will report when a
1025 # service check times out - that is does not respond within
1026 # service_check_timeout seconds. This can be useful if a
1027 # machine is running at too high a load and you do not want
1028 # to consider a failed service check to be critical (the default).
1029 # Valid settings are:
1030 # c - Critical (default)
1031 # u - Unknown
1032 # w - Warning
1033 # o - OK
1034
1035 service_check_timeout_state=c
1036
1037
1038
1039 # HOST FRESHNESS CHECK OPTION
1040 # This option determines whether or not Nagios will periodically
1041 # check the "freshness" of host results. Enabling this option
1042 # is useful for ensuring passive checks are received in a timely
1043 # manner.
1044 # Values: 1 = enabled freshness checking, 0 = disable freshness checking
1045
1046 check_host_freshness=0
1047
1048
1049
1050 # HOST FRESHNESS CHECK INTERVAL
1051 # This setting determines how often (in seconds) Nagios will
1052 # check the "freshness" of host check results. If you have
1053 # disabled host freshness checking, this option has no effect.
1054
1055 host_freshness_check_interval=60
1056
1057
1058
1059
1060 # ADDITIONAL FRESHNESS THRESHOLD LATENCY
1061 # This setting determines the number of seconds that Nagios
1062 # will add to any host and service freshness thresholds that
1063 # it calculates (those not explicitly specified by the user).
1064
1065 additional_freshness_latency=15
1066
1067
1068
1069
1070 # FLAP DETECTION OPTION
1071 # This option determines whether or not Nagios will try
1072 # and detect hosts and services that are "flapping".
1073 # Flapping occurs when a host or service changes between
1074 # states too frequently. When Nagios detects that a
1075 # host or service is flapping, it will temporarily suppress
1076 # notifications for that host/service until it stops
1077 # flapping. Flap detection is very experimental, so read
1078 # the HTML documentation before enabling this feature!
1079 # Values: 1 = enable flap detection
1080 # 0 = disable flap detection (default)
1081
1082 enable_flap_detection=1
1083
1084
1085
1086 # FLAP DETECTION THRESHOLDS FOR HOSTS AND SERVICES
1087 # Read the HTML documentation on flap detection for
1088 # an explanation of what this option does. This option
1089 # has no effect if flap detection is disabled.
1090
1091 low_service_flap_threshold=5.0
1092 high_service_flap_threshold=20.0
1093 low_host_flap_threshold=5.0
1094 high_host_flap_threshold=20.0
1095
1096
1097
1098 # DATE FORMAT OPTION
1099 # This option determines how short dates are displayed. Valid options
1100 # include:
1101 # us (MM-DD-YYYY HH:MM:SS)
1102 # euro (DD-MM-YYYY HH:MM:SS)
1103 # iso8601 (YYYY-MM-DD HH:MM:SS)
1104 # strict-iso8601 (YYYY-MM-DDTHH:MM:SS)
1105 #
1106
1107 date_format=us
1108
1109
1110
1111
1112 # TIMEZONE OFFSET
1113 # This option is used to override the default timezone that this
1114 # instance of Nagios runs in. If not specified, Nagios will use
1115 # the system configured timezone.
1116 #
1117 # NOTE: In order to display the correct timezone in the CGIs, you
1118 # will also need to alter the Apache directives for the CGI path
1119 # to include your timezone. Example:
1120 #
1121 # <Directory "/usr/local/nagios/sbin/">
1122 # SetEnv TZ "Australia/Brisbane"
1123 # ...
1124 # </Directory>
1125
1126 #use_timezone=US/Mountain
1127 #use_timezone=Australia/Brisbane
1128
1129
1130
1131 # ILLEGAL OBJECT NAME CHARACTERS
1132 # This option allows you to specify illegal characters that cannot
1133 # be used in host names, service descriptions, or names of other
1134 # object types.
1135
1136 illegal_object_name_chars=`~!$%^&*|'"<>?,()=
1137
1138
1139
1140 # ILLEGAL MACRO OUTPUT CHARACTERS
1141 # This option allows you to specify illegal characters that are
1142 # stripped from macros before being used in notifications, event
1143 # handlers, etc. This DOES NOT affect macros used in service or
1144 # host check commands.
1145 # The following macros are stripped of the characters you specify:
1146 # $HOSTOUTPUT$
1147 # $LONGHOSTOUTPUT$
1148 # $HOSTPERFDATA$
1149 # $HOSTACKAUTHOR$
1150 # $HOSTACKCOMMENT$
1151 # $SERVICEOUTPUT$
1152 # $LONGSERVICEOUTPUT$
1153 # $SERVICEPERFDATA$
1154 # $SERVICEACKAUTHOR$
1155 # $SERVICEACKCOMMENT$
1156
1157 illegal_macro_output_chars=`~$&|'"<>
1158
1159
1160
1161 # REGULAR EXPRESSION MATCHING
1162 # This option controls whether or not regular expression matching
1163 # takes place in the object config files. Regular expression
1164 # matching is used to match host, hostgroup, service, and service
1165 # group names/descriptions in some fields of various object types.
1166 # Values: 1 = enable regexp matching, 0 = disable regexp matching
1167
1168 use_regexp_matching=0
1169
1170
1171
1172 # "TRUE" REGULAR EXPRESSION MATCHING
1173 # This option controls whether or not "true" regular expression
1174 # matching takes place in the object config files. This option
1175 # only has an effect if regular expression matching is enabled
1176 # (see above). If this option is DISABLED, regular expression
1177 # matching only occurs if a string contains wildcard characters
1178 # (* and ?). If the option is ENABLED, regexp matching occurs
1179 # all the time (which can be annoying).
1180 # Values: 1 = enable true matching, 0 = disable true matching
1181
1182 use_true_regexp_matching=0
1183
1184
1185
1186 # ADMINISTRATOR EMAIL/PAGER ADDRESSES
1187 # The email and pager address of a global administrator (likely you).
1188 # Nagios never uses these values itself, but you can access them by
1189 # using the $ADMINEMAIL$ and $ADMINPAGER$ macros in your notification
1190 # commands.
1191
1192 admin_email=@nagios_user@@localhost
1193 admin_pager=page@nagios_user@@localhost
1194
1195
1196
1197 # DAEMON CORE DUMP OPTION
1198 # This option determines whether or not Nagios is allowed to create
1199 # a core dump when it runs as a daemon. Note that it is generally
1200 # considered bad form to allow this, but it may be useful for
1201 # debugging purposes. Enabling this option doesn't guarantee that
1202 # a core file will be produced, but that's just life...
1203 # Values: 1 - Allow core dumps
1204 # 0 - Do not allow core dumps (default)
1205
1206 daemon_dumps_core=0
1207
1208
1209
1210 # LARGE INSTALLATION TWEAKS OPTION
1211 # This option determines whether or not Nagios will take some shortcuts
1212 # which can save on memory and CPU usage in large Nagios installations.
1213 # Read the documentation for more information on the benefits/tradeoffs
1214 # of enabling this option.
1215 # Values: 1 - Enabled tweaks
1216 # 0 - Disable tweaks (default)
1217
1218 use_large_installation_tweaks=0
1219
1220
1221
1222 # ENABLE ENVIRONMENT MACROS
1223 # This option determines whether or not Nagios will make all standard
1224 # macros available as environment variables when host/service checks
1225 # and system commands (event handlers, notifications, etc.) are
1226 # executed.
1227 # Enabling this is a very bad idea for anything but very small setups,
1228 # as it means plugins, notification scripts and eventhandlers may run
1229 # out of environment space. It will also cause a significant increase
1230 # in CPU- and memory usage and drastically reduce the number of checks
1231 # you can run.
1232 # Values: 1 - Enable environment variable macros
1233 # 0 - Disable environment variable macros (default)
1234
1235 enable_environment_macros=0
1236
1237
1238
1239 # CHILD PROCESS MEMORY OPTION
1240 # This option determines whether or not Nagios will free memory in
1241 # child processes (processed used to execute system commands and host/
1242 # service checks). If you specify a value here, it will override
1243 # program defaults.
1244 # Value: 1 - Free memory in child processes
1245 # 0 - Do not free memory in child processes
1246
1247 #free_child_process_memory=1
1248
1249
1250
1251 # CHILD PROCESS FORKING BEHAVIOR
1252 # This option determines how Nagios will fork child processes
1253 # (used to execute system commands and host/service checks). Normally
1254 # child processes are fork()ed twice, which provides a very high level
1255 # of isolation from problems. Fork()ing once is probably enough and will
1256 # save a great deal on CPU usage (in large installs), so you might
1257 # want to consider using this. If you specify a value here, it will
1258 # program defaults.
1259 # Value: 1 - Child processes fork() twice
1260 # 0 - Child processes fork() just once
1261
1262 #child_processes_fork_twice=1
1263
1264
1265
1266 # DEBUG LEVEL
1267 # This option determines how much (if any) debugging information will
1268 # be written to the debug file. OR values together to log multiple
1269 # types of information.
1270 # Values:
1271 # -1 = Everything
1272 # 0 = Nothing
1273 # 1 = Functions
1274 # 2 = Configuration
1275 # 4 = Process information
1276 # 8 = Scheduled events
1277 # 16 = Host/service checks
1278 # 32 = Notifications
1279 # 64 = Event broker
1280 # 128 = External commands
1281 # 256 = Commands
1282 # 512 = Scheduled downtime
1283 # 1024 = Comments
1284 # 2048 = Macros
1285 # 4096 = Interprocess communication
1286 # 8192 = Scheduling
1287 # 16384 = Workers
1288
1289 debug_level=0
1290
1291
1292
1293 # DEBUG VERBOSITY
1294 # This option determines how verbose the debug log out will be.
1295 # Values: 0 = Brief output
1296 # 1 = More detailed
1297 # 2 = Very detailed
1298
1299 debug_verbosity=1
1300
1301
1302
1303 # DEBUG FILE
1304 # This option determines where Nagios should write debugging information.
1305
1306 debug_file=/var/log/nagios4/nagios.debug
1307
1308
1309
1310 # MAX DEBUG FILE SIZE
1311 # This option determines the maximum size (in bytes) of the debug file. If
1312 # the file grows larger than this size, it will be renamed with a .old
1313 # extension. If a file already exists with a .old extension it will
1314 # automatically be deleted. This helps ensure your disk space usage doesn't
1315 # get out of control when debugging Nagios.
1316
1317 max_debug_file_size=1000000
1318
1319
1320
1321 # Should we allow hostgroups to have no hosts, we default this to off since
1322 # that was the old behavior
1323
1324 allow_empty_hostgroup_assignment=0
1325
1326
1327
1328 # Normally worker count is dynamically allocated based on 1.5 * number of cpu's
1329 # with a minimum of 4 workers. This value will override the defaults
1330
1331 #check_workers=3
1332
1333
1334
1335 # DISABLE SERVICE CHECKS WHEN HOST DOWN
1336 # This option will disable all service checks if the host is not in an UP state
1337 #
1338 # While desirable in some environments, enabling this value can distort report
1339 # values as the expected quantity of checks will not have been performed
1340
1341 #host_down_disable_service_checks=0
1342
1343
1344
1345 # SET SERVICE/HOST STATUS WHEN SERVICE CHECK SKIPPED
1346 # These options will allow you to set the status of a service when its
1347 # service check is skipped due to one of three reasons:
1348 # 1) failed dependency check; 2) parent's status; 3) host not up
1349 # Number 3 can only happen if 'host_down_disable_service_checks' above
1350 # is set to 1.
1351 # Valid values for the service* options are:
1352 # -1 Do not change the service status (default - same as before 4.4)
1353 # 0 Set the service status to STATE_OK
1354 # 1 Set the service status to STATE_WARNING
1355 # 2 Set the service status to STATE_CRITICAL
1356 # 3 Set the service status to STATE_UNKNOWN
1357 # The host_skip_check_dependency_status option will allow you to set the
1358 # status of a host when itscheck is skipped due to a failed dependency check.
1359 # Valid values for the host_skip_check_dependency_status are:
1360 # -1 Do not change the service status (default - same as before 4.4)
1361 # 0 Set the host status to STATE_UP
1362 # 1 Set the host status to STATE_DOWN
1363 # 2 Set the host status to STATE_UNREACHABLE
1364 # We may add one or more statuses in the future.
1365
1366 #service_skip_check_dependency_status=-1
1367 #service_skip_check_parent_status=-1
1368 #service_skip_check_host_down_status=-1
1369 #host_skip_check_dependency_status=-1
1370
1371
1372
1373 # LOAD CONTROL OPTIONS
1374 # To get current defaults based on your system, issue this command to
1375 # the query handler:
1376 # echo -e '@core loadctl\0' | nc -U /usr/local/nagios/var/rw/nagios.qh
1377 #
1378 # Please note that used incorrectly these options can induce enormous latency.
1379 #
1380 # loadctl_options:
1381 # jobs_max The maximum amount of jobs to run at one time
1382 # jobs_min The minimum amount of jobs to run at one time
1383 # jobs_limit The maximum amount of jobs the current load lets us run
1384 # backoff_limit The minimum backoff_change
1385 # backoff_change # of jobs to remove from jobs_limit when backing off
1386 # rampup_limit Minimum rampup_change
1387 # rampup_change # of jobs to add to jobs_limit when ramping up
1388
1389 #loadctl_options=jobs_max=100;backoff_limit=10;rampup_change=5