Monarch Control


--- GW IMAGE NOT DISPLAYED --- Using the Control Option

Copyright 2006 GroundWork Open Source, Inc. (“GroundWork”).
All rights reserved. Use is subject to GroundWork commercial license.

Contents

Using the Control Option


--- GW IMAGE NOT DISPLAYED --- How Do I View My Current Nagios® and Configuration Folders?


Setup

  1. Select Control from the Configuration menu options.
  2. Select Setup.
  3. The Setup screen showing the current Nagios® and Configuration folders will be displayed, (see Table 5.12.1a. below).
  4. You can also enable Externals from this screen by chekcing the box next to Enable Externals. Host and Service Externals will then show up under the Host and Service Configuration options.
  5. After any edits select Save. You will be prompted in the next screen that the changes to setup have been accepted. Select Close. Cancel will exit you out of the Setup screen without saving changes.

    Figure 5.12.1a. Setup

    --- GW IMAGE NOT DISPLAYED ---

    Table 5.12.1a. Setup

    Nagios® Version The Nagios® version you are using.
    Nagios® etc Path to the folder containing nagios.cfg.
    Nagios® Bin Path to the folder containing the Nagios® binary.
    Configuration Home The Configuration installation path. Your web server must have read write access.
    Backup dir This folder is used to backup your Nagios® files and the Monarch database. Your web server must have read write access.
    Enable Externals This is an advanced feature that requires some knowledge of PERL. Externals are configuration data not directly related to Nagios®, but can be useful when integrating other tools. Externals can be assigned to hosts and services. Your knowledge of PERL will be required to modify MonarchExternals.pm. Check this box and Save Setup to display the Run Externals option in the left navigation. Select Run Externals to execute your code in MonarchExternals.pm.

Using the Control Option


--- GW IMAGE NOT DISPLAYED --- How Do I View/Edit Settings in Nagios® CGI?


Step 1 – Nagios® CGI Configuration

  1. Select Control from the Configuration menu options.
  2. Select Nagios® CGI Configuration.
  3. In the Setup screen, enter the properties (see Table 5.12.2a below).
  4. Select Save and Next to proceed to the next screen.

    Figure 5.12.2a. Nagios® CGI Configuration Page 1

    --- GW IMAGE NOT DISPLAYED ---

    Table 5.12.2a. Nagios® CGI Configuration Page 1

    Physical HTML Path This is the path where the HTML files for Nagios® reside. This value is used to locate the logo images needed by the statusmap and statuswrl CGIs.
    URL HTML Path This is the path portion of the URL that corresponds to the physical location of the Nagios® HTML files (as defined above). This value is used by the CGIs to locate the online documentation and graphics. If you access the Nagios® pages with a URL like http://www.myhost.com/nagios, this value should be ‘/nagios’ (without the quotes).
    Context Sensitive Help This option determines whether or not a context-sensitive help icon will be displayed for most of the CGIs. Values: unchecked = disables context-sensitive help checked = enables context-sensitive help.
    Nagios® Check Command This is the full path and filename of the program used to check the status of the Nagios® process. It is used only by the CGIs and is completely optional. However, if you don’t use it, you’ll see warning messages in the CGIs about the Nagios® process not running and you won’t be able to execute any commands from the web interface. The program should follow the same rules as plugins; the return codes are the same as for the plugins, it should have timeout protection, it should output something to STDIO, etc. (Note: If you are using the check_nagios plugin here, the first argument should be the physical path to the status log, the second argument is the number of minutes that the status log contents should be ‘fresher’ than, and the third argument is the string that should be matched from the output of the ‘ps’ command in order to locate the running Nagios® process. That process string is going to vary depending on how you start Nagios®. Run the ‘ps’ command manually to see what the command line entry for the Nagios® process looks like.)
    Use Authentication This option controls whether or not the CGIs will use any authentication when displaying Host and Service information, as well as committing commands to Nagios® for processing. Read the HTML documentation to learn how the authorization works! (NOTE: It is a really *bad* idea to disable authorization, unless you plan on removing the command CGI (cmd.cgi)!) Failure to do so will leave you wide open to kiddies messing with Nagios® and possibly hitting you with a denial of Service attack by filling up your drive by continuously writing to your command file! Setting this value to unchecked will cause the CGIs to *not* use authentication (bad idea), while checked will make them use the authentication functions (the default).
    Default User Setting this variable will define a default user name that can access pages without authentication. This allows people within a secure domain (i.e., behind a firewall) to see the current status without authenticating. You may want to use this to avoid basic authentication if you are not using a secure server since basic authentication transmits passwords in the clear. Important: Do not define a default username unless you are running a secure web server and are sure that everyone who has access to the CGIs has been authenticated in some manner! If you define this variable, anyone who has not authenticated to the web server will inherit all rights you assign to this user!
    System/Process Information Access This option is a comma separated list of all usernames that have access to viewing the Nagios® process information as provided by the Extended Information CGI (extinfo.cgi). By default, *no one* has access to this unless you choose to not use authorization. You may use an asterisk (*) to authorize any user who has authenticated to the web server.
    System/Process Command Access This option is a comma separated list of all usernames that can issue shutdown and restart commands to Nagios® via the command CGI (cmd.cgi). Users in this list can also change the program mode to active or standby. By default, *no one* has access to this unless you choose to not use authorization. You may use an asterisk (*) to authorize any user who has authenticated to the web server.
    Configuration Information Access This option is a comma separated list of all usernames that can view ALL configuration information (Hosts, commands, etc). By default, users can only view configuration information for the Hosts and Services they are contacts for. You may use an asterisk (*) to authorize any user who has authenticated to the web server.
    Global Host Information Access This is a comma separated list of names of authenticated users who can view status and configuration information for all Hosts. Users in this list are also automatically authorized to view information for all Services. Users in this list are not automatically authorized to issue commands for all Hosts or Services. If you want users able to issue commands for all Hosts and Services as well, you must add them to the authorized_for_all_host_commands variable.

Step 2 – Nagios® CGI Configuration

  1. In the Nagios® CGI Configuration Page 2 screen, enter the properties (see Table 5.12.2b below).
  2. Select Save and Done to finalize changes.
  3. A screen will be displayed confirming your save. Select Continue.

    Figure 5.12.2b. Nagios® CGI Configuration Page 2

    --- GW IMAGE NOT DISPLAYED ---

    Table 5.12.2b. Nagios® CGI Configuration Page 2

    Global Host Command Access This is a comma separated list of names of authenticated users who can issue commands for all Hosts via the command CGI. Users in this list are also automatically authorized to issue commands for all Services. Users in this list are not automatically authorized to view status or configuration information for all Hosts or Services. If you want users able to view status and configuration information for all Hosts and Services as well, you must add them to the authorized_for_all_hosts variable.
    Global Service Information Access This is a comma separated list of names of authenticated users who can view status and configuration information for all Services. Users in this list are not automatically authorized to view information for all Hosts. Users in this list are not automatically authorized to issue commands for all Services. If you want users able to issue commands for all Services as well, you must add them to the authorized_for_all_service_commands variable.
    Global Service Command Access This is a comma separated list of names of authenticated users who can issue commands for all Services via the command CGI. Users in this list are not automatically authorized to issue commands for all Hosts. Users in this list are not automatically authorized to view status or configuration information for all Hosts. If you want users able to view status and configuration information for all Services as well, you must add them to the authorized_for_all_services variable.
    Statusmap Background Image This option allows you to specify an image to be used as a background in the statusmap CGI. It is assumed that the image resides in the HTML images path (i.e. /usr/local/nagios/share/images). This path is automatically determined by appending ‘/images’ to the path specified by the ‘physical_html_path’ directive. Note: The image file must be in GD2 format!
    Default Statusmap Layout This option allows you to specify the default layout method the statusmap CGI should use for drawing Hosts. If you do not use this option, the default is to use user-defined coordinates. Valid options are as follows: User-defined coordinates, Depth layers, Collapsed tree, Balanced tree, Circular, Circular (Marked Up)
    Default Statuswrl Layout This option allows you to specify the default layout method the statuswrl (VRML) CGI should use for drawing Hosts. If you do not use this option, the default is to use user-defined coordinates. Valid options are as follows: User-defined coordinates, Collapsed tree, Balanced tree, Circular
    Statuswrl Include This option allows you to include your own objects in the generated VRML world. It is assumed that the file resides in the HTML path (i.e. /usr/local/nagios/share).
    Ping Syntax This option determines what syntax should be used when attempting to ping a Host from the WAP interface (using the statuswml CGI). You must include the full path to the ping binary, along with all required options. The $HOSTADDRESS$ macro is substituted with the address of the Host before the command is executed.
    Refresh Rate This option allows you to specify the refresh rate in seconds of various CGIs (status, statusmap, extinfo, and outages).
    Audio Alerts These options allow you to specify an optional audio file that should be played in your browser window when there are problems on the network. The audio files are used only in the status CGI. Only the sound for the most critical problem will be played. Order of importance (higher to lower) is as follows: unreachable Hosts, down Hosts, critical Services, warning Services, and unknown Services. If there are no visible problems, the sound file optionally specified by ‘normal_sound’ variable will be played. Note: All audio files must be placed in the /media subdirectory under the HTML path (i.e. /usr/local/nagios/share/media/).

Using the Control Option


--- GW IMAGE NOT DISPLAYED --- How Do I View/Edit Settings in the Nagios® Main Configuration?


Step 1 – Using Nagios® Main Configuration

  1. Select Control from the Configuration menu options.
  2. Expand the Nagios® Main Configuration drop-down menu.
  3. Select Load Nagios® Cfg option.
  4. In the Nagios® Main Configuration Page 1 screen, enter the properties (see Table 5.12.3a. below).
  5. Select Save and Next to proceed to the next screen.

    Figure 5.12.3a. Nagios® Main Configuration Page 1

    --- GW IMAGE NOT DISPLAYED ---

    Table 5.12.3a. Nagios® Main Configuration Page 1

    Log File This is the main log file where Service and Host events are logged for historical purposes. This should be the first option specified in the config file!
    Object Cache File This directive is used to specify a file in which a cached copy of object definitions should be stored. The cache file is (re)created every time Nagios® is (re)started and is used by the CGIs. It is intended to speed up config file caching in the CGIs and allow you to edit the source object config files while Nagios® is running without affecting the output displayed in the CGIs.
    Resource File This is an optional resource file that contains $USERx$ macro definitions. Multiple resource files can be specified by using multiple resource_file definitions. The CGIs will not attempt to read the contents of resource files, so information that is considered to be sensitive (usernames, passwords, etc) can be defined as macros in this file and restrictive permissions (600) can be placed on this file.
    Status File This is where the current status of all monitored Services and Hosts is stored. Its contents are read and processed by the CGIs. The contents of the status file are deleted every time Nagios® restarts.
    Aggregated Status Updates Option This option determines whether or not Nagios® will aggregate updates of Host, Service, and program status data. If you do not enable this option, status data is updated every time a Host or Service check occurs. This can result in high CPU loads and file I/O if you are monitoring a lot of Services. If you want Nagios® to only update status data (in the status file) every few seconds (as determined by the status_update_interval option), enable this option. If you want immediate updates, disable it. I would highly recommend using aggregated updates (even at short intervals) unless you have good reason not to.
    Aggregated Status Data Update Interval This setting determines how often (in seconds) that Nagios® will update status data in the status file. The minimum update interval is five seconds. If you have disabled aggregated status updates (with the aggregate_status_updates option), this option has no effect.
    Nagios® User This determines the effective user that Nagios® should run as. You can either supply a username or a UID.
    Nagios® Group This determines the effective group that Nagios® should run as. You can either supply a group name or a GID.
    Enable Notifications This option determines whether or not Nagios® will send out Notifications when it initially (re)starts. If this option is disabled, Nagios® will not send out Notifications for any Host or Service. Note: If you have state retention enabled, Nagios® will ignore this setting when it (re)starts and use the last known setting for this option (as stored in the state retention file), unless you disable the use_retained_program_state option. If you want to change this option when state retention is active (and the use_retained_program_state is enabled), you’ll have to use the appropriate external command or change it via the web interface.
    Execute Service Checks This option determines whether or not Nagios® will execute Service checks when it initially (re)starts. If this option is disabled, Nagios® will not actively execute any Service checks and will remain in a sort of “sleep” mode (it can still accept passive checks unless you’ve disabled them). This option is most often used when configuring backup monitoring servers, as described in the documentation on redundancy, or when setting up a distributed monitoring environment. Note: If you have state retention enabled, Nagios® will ignore this setting when it (re)starts and use the last known setting for this option (as stored in the state retention file), unless you disable the use_retained_program_state option. If you want to change this option when state retention is active (and the use_retained_program_state is enabled), you’ll have to use the appropriate external command or change it via the web interface.
    Accept Passive Service Checks This option determines whether or not Nagios® will accept passive Service checks when it initially (re)starts. If this option is disabled, Nagios® will not accept any passive Service checks. Note: If you have state retention enabled, Nagios® will ignore this setting when it (re)starts and use the last known setting for this option (as stored in the state retention file), unless you disable the use_retained_program_state option. If you want to change this option when state retention is active (and the use_retained_program_state is enabled), you’ll have to use the appropriate external command or change it via the web interface.
    Execute Host Checks This option determines whether or not Nagios® will execute on-demand and regularly scheduled Host checks when it initially (re)starts. If this option is disabled, Nagios® will not actively execute any Host checks, although it can still accept passive Host checks unless you’ve disabled them. This option is most often used when configuring backup monitoring servers, as described in the documentation on redundancy, or when setting up a distributed monitoring environment. Note: If you have state retention enabled, Nagios® will ignore this setting when it (re)starts and use the last known setting for this option (as stored in the state retention file), unless you disable the use_retained_program_state option. If you want to change this option when state retention is active (and the use_retained_program_state is enabled), you’ll have to use the appropriate external command or change it via the web interface. Checked = Execute Host checks.
    Accept Passive Host Checks This option determines whether or not Nagios® will accept passive Host checks when it initially (re)starts. If this option is disabled, Nagios® will not accept any passive Host checks. Note: If you have state retention enabled, Nagios® will ignore this setting when it (re)starts and use the last known setting for this option (as stored in the state retention file), unless you disable the use_retained_program_state option. If you want to change this option when state retention is active (and the use_retained_program_state is enabled), you’ll have to use the appropriate external command or change it via the web interface. Checked = Accept passive host checks
    Enable Event Handlers This option determines whether or not Nagios® will run event handlers when it initially (re)starts. If this option is disabled, Nagios® will not run any Host or Service event handlers. Note: If you have state retention enabled, Nagios® will ignore this setting when it (re)starts and use the last known setting for this option (as stored in the state retention file), unless you disable the use_retained_program_state option. If you want to change this option when state retention is active (and the use_retained_program_state is enabled), you’ll have to use the appropriate external command or change it via the web interface.
    Log Rotation Method This is the log rotation method that Nagios® should use to rotate the main log file. Values are as follows. n = None – don’t rotate the log. h = Hourly rotation (top of the hour). d = Daily rotation (midnight every day). w = Weekly rotation (midnight on Saturday evening). m = Monthly rotation (midnight last day of month)
    Log Archive Path This is the directory where archived (rotated) log files should be placed (assuming you’ve chosen to do log rotation).
    Check External Commands This option allows you to specify whether or not Nagios® should check for external commands (in the command file defined below). By default Nagios® will *not* check for external commands, just to be on the cautious side. If you want to be able to use the CGI command interface you will have to enable this. Setting this value to unchecked disables command checking (the default), other values enable it.
    Command Check Interval This is the interval at which Nagios® should check for external commands. This is a value of the interval_length that you specify later. If you leave that at its default value of 60 (seconds), a value of 1 here will cause Nagios® to check for external commands every minute. If you specify a number followed by an ‘s’ (i.e. 15s), this will be interpreted to mean actual seconds rather than a multiple of the interval_length variable. Note: In addition to reading the external command file at regularly scheduled intervals, Nagios® will also check for external commands after event handlers are executed. NOTE: Setting this value to -1 causes Nagios® to check the external command file as often as possible.
    External Command File This is the file that Nagios® checks for external command requests. It is also where the command CGI will write commands that are submitted by users, so it must be writeable by the user that the web server is running as (under Linux, usually ‘nobody’). Permissions should be set at the directory level instead of on the file, as the file is deleted every time its contents are processed.
    Downtime File This is the file that Nagios® will use for storing Host and Service downtime data.
    Comment File This is the file that Nagios® will use for storing Host and Service comments.
    Lock File This is the lockfile that Nagios® will use to store its PID number in when it is running in daemon mode.
    State Retention Option This setting determines whether or not Nagios® will save state information for Services and Hosts before it shuts down. Upon startup Nagios® will reload all saved Service and Host state information before starting to monitor. This is useful for maintaining long-term data on state statistics, etc, but will slow Nagios® down a bit when it (re)starts. Since it’s only a one-time penalty, I think its well worth the additional startup delay. Checked = enabled.
    State Retention File This is the file that Nagios® should use to store Host and Service state information before it shuts down. The state information in this file is also read immediately prior to starting to monitor the network when Nagios® is restarted. This file is used only if the preserve_state_information variable is checked.
    Retention Update Interval This setting determines how often (in minutes) that Nagios® will automatically save retention data during normal operation. If you set this value to 0, Nagios® will not save retention data at regular intervals, but it will still save retention data before shutting down or restarting. If you have disabled state retention, this option has no effect.
    Use Retained Program State This setting determines whether or not Nagios® will set program status variables based on the values saved in the retention file. If you want to use retained program status information, set this value to 1. If not, set this value to 0.
    Use Retained Scheduling Info Option This setting determines whether or not Nagios® will retain scheduling info (next check times) for hosts and services when it restarts. If you are adding a large number (or percentage) of hosts and services, I would recommend disabling this option when you first restart Nagios®, as it can adversely skew the spread of initial checks. Otherwise you will probably want to leave it enabled. 0 = Don’t use retained scheduling info and 1 = Use retained scheduling info (default).

Step 2 – Using Nagios® Main Configuration

  1. In the Nagios® Main Configuration Page 2 screen, enter the properties (see Table 5.12.3b. below).
  2. Select Save and Next to proceed to the next screen.

    Figure 5.12.3b. Nagios® Main Configuration Page 2

    --- GW IMAGE NOT DISPLAYED ---

    Table 5.12.3b. Nagios® Main Configuration Page 2

    Syslog Logging Option If you want messages logged to the syslog facility, as well as the NetAlarm log file set this option to checked. If not, set it to unchecked.
    Log Notifications If you don’t want Notifications to be logged, set this value to unchecked. If Notifications should be logged, set the value to checked.
    Host Check Retry Logging Option If you don’t want Host check retries to be logged, set this value to unchecked. If retries should be logged, set the value to checked.
    Service Check Retry Logging Option If you don’t want Service check retries to be logged, set this value to unchecked. If retries should be logged, set the value to checked.
    Event Handler Logging Option If you don’t want Host and Service event handlers to be logged, set this value to unchecked. If event handlers should be logged, set the value to checked.
    Initial States Logging Option If you want Nagios® to log all initial Host and Service states to the main log file (the first time the Service or Host is checked) you can enable this option by setting this value to checked. If you are not using an external application that does long term state statistics reporting, you do not need to enable this option. In this case, set the value to unchecked.
    External Command Logging Option If you don’t want Nagios® to log external commands, set this value to unchecked. If external commands should be logged, set this value to checked. Note: This option does not include logging of passive Service checks – see the option below for controlling whether or not passive checks are logged.
    Passive Check Logging Option If you don’t want Nagios® to log passive Service checks, set this value to unchecked. If passive Service checks should be logged, set this value to checked.
    Global Host Event Handler This option allows you to specify a Host event handler command that is to be run for every Host state change. The global event handler is executed immediately prior to the event handler that you have optionally specified in each Host definition. The command argument is the short name of a command definition that you define in your Host configuration file. Read the Nagios® HTML docs for more information.
    Global Service Event Handler This option allows you to specify a Service event handler command that is to be run for every Host state change. The global event handler is executed immediately prior to the event handler that you have optionally specified in each Service definition. The command argument is the short name of a command definition that you define in your Host configuration file. Read the Nagios® HTML docs for more information.
    Sleep Time This is the number of seconds to sleep between checking for system events and Service checks that need to be run. I would recommend *not* changing this from its default value of 1 second.
    Inter Check Delay Method This is the method that Nagios® should use when initially ‘spreading out’ Service checks when it starts monitoring. The default is to use smart delay calculation, which will try to space all Service checks out evenly to minimize CPU load. Using the dumb setting will cause all checks to be scheduled at the same time (with no delay between them)! This is not a good thing for production, but is useful when testing the parallelization functionality. None: selected = None – don’t use any delay between checks. Dumb: selected = Use a ‘dumb’ delay of 1 second between checks. Smart: selected = Use ‘smart’ inter-check delay calculation. Delay: selected = Enter an user-specified delay of x.xx seconds.
    Max Service Check Spread This option determines the maximum number of minutes from when Nagios® starts that all Services (that are scheduled to be regularly checked) are checked. This option will automatically adjust the Service inter-check delay (if necessary) to ensure that the initial checks of all Services occur within the timeframe you specify. In general, this option will not have an effect on Service check scheduling if scheduling information is being retained using the use_retained_scheduling_info option.
    Service Interleave Factor This variable determines how Service checks are interleaved. Interleaving the Service checks allows for a more even distribution of Service checks and reduced load on remote Hosts. Setting this value to 1 is equivalent to how versions of Nagios® previous to 0.0.5 did Service checks. Set this value to s (smart) for automatic calculation of the interleave factor unless you have a specific reason to change it. Smart: selected = Use ‘smart’ interleave factor calculation. Value: selected = Enter an interleave factor of x, where x is a number greater than or equal to 1.
    Service Reaper Frequency This is the frequency (in seconds!) that Nagios® will process the results of Services that have been checked.
    Host Inter Check Delay Method This option allows you to control how Host checks that are scheduled to be checked on a regular basis are initially ‘spread out’ in the event queue. Using a ‘smart’ delay calculation (the default) will cause Nagios® to calculate an average check interval and spread initial checks of all Hosts out over that interval, thereby helping to eliminate CPU load spikes. Using no delay is generally not recommended. Using no delay will cause all Host checks to be scheduled for execution at the same time. Values are as follows: None = Don’t use any delay – schedule all Host checks to run immediately (i.e. at the same time!). Dumb = Use a ‘dumb’ delay of 1 second between Host checks. Smart = Use a ‘smart’ delay calculation to spread Host checks out evenly (default). Use a user-specified delay of x.xx seconds.
    Max Host Check Spread This option determines the maximum number of minutes from when Nagios® starts that all Hosts (that are scheduled to be regularly checked) are checked. This option will automatically adjust the Host inter-check delay (if necessary) to ensure that the initial checks of all Hosts occur within the timeframe you specify. In general, this option will not have an effect on Host check scheduling if scheduling information is being retained using the use_retained_scheduling_info option.
    Max Concurrent Service Checks This option allows you to specify the maximum number of Service checks that can be run in parallel at any given time. Specifying a value of 1 for this variable essentially prevents any Service checks from being parallelized. A value of 0 will not restrict the number of concurrent checks that are being executed.
    Timing Interval Length This is the seconds per unit interval as used in the host/contact/service configuration files. Setting this to 60 means that each interval is one minute long (60 seconds). Other settings have not been tested much, so your mileage is likely to vary…
    Auto-rescheduling Option This option determines whether or not Nagios® will attempt to automatically reschedule active Host and Service checks to ‘smooth’ them out over time. This can help to balance the load on the monitoring server, as it will attempt to keep the time between consecutive checks consistent, at the expense of executing checks on a more rigid schedule. Checked = enabled. WARNING: THIS IS AN EXPERIMENTAL FEATURE AND MAY BE REMOVED IN FUTURE VERSIONS. ENABLING THIS OPTION CAN DEGRADE PERFORMANCE – RATHER THAN INCREASE IT – IF USED IMPROPERLY!
    Auto-rescheduling Interval This option determines how often (in seconds) Nagios® will attempt to automatically reschedule checks. This option only has an effect if the auto_reschedule_checks option is enabled. WARNING: THIS IS AN EXPERIMENTAL FEATURE AND MAY BE REMOVED IN FUTURE VERSIONS. ENABLING THE AUTO-RESCHEDULING OPTION CAN DEGRADE PERFORMANCE – RATHER THAN INCREASE IT – IF USED IMPROPERLY!
    Auto-rescheduling Window This option determines the ‘window’ of time (in seconds) that Nagios® will look at when automatically rescheduling checks. Only Host and Service checks that occur in the next X seconds (determined by this variable) will be rescheduled. This option only has an effect if the auto_reschedule_checks option is enabled. WARNING: THIS IS AN EXPERIMENTAL FEATURE AND MAY BE REMOVED IN FUTURE VERSIONS. ENABLING THE AUTO-RESCHEDULING OPTION CAN DEGRADE PERFORMANCE – RATHER THAN INCREASE IT – IF USED IMPROPERLY!

Step 3 – Using Nagios® Main Configuration

  1. In the Nagios® Main Configuration Page 3 screen, enter the properties (see Table 5.12.3c. below).
  2. Select Save and Next to proceed to the next screen.

    Figure 5.12.3c. Nagios® Main Configuration Page 3

    --- GW IMAGE NOT DISPLAYED ---

    Table 5.12.3c. Nagios® Main Configuration Page 3

    Aggressive Host Checking Option Nagios® tries to be smart about how and when it checks the status of Hosts. In general, disabling this option will allow Nagios® to make some smarter decisions and check Hosts a bit faster. Enabling this option will increase the amount of time required to check Hosts, but may improve reliability a bit. Unless you have problems with Nagios® not recognizing that a Host recovered, it is strongly recommended that you DO NOT enable this option. Values: checked = enable Aggressive Host checking, unchecked = do not aggressively check Hosts.
    Flap Detection Option This option determines whether or not Nagios® will try to detect Hosts and Services that are ‘flapping’. Flapping occurs when a Host or Service changes between states too frequently. When Nagios® detects that a Host or Service is flapping, it will temporarily suppress Notifications for that Host/Service until it stops flapping. Flap detection is very experimental, so read the HTML documentation before enabling this feature! Values: checked = enable flap detection unchecked = disable flap detection (default)
    Service Flap Detection Thresholds Read the Nagios® HTML documentation on flap detection for an explanation of what this option does. This option has no effect if flap detection is disabled.
    Host Flap Detection Thresholds Read the Nagios® HTML documentation on flap detection for an explanation of what this option does. This option has no effect if flap detection is disabled.
    Soft State Dependencies This option determines whether or not Nagios® will use soft Service state information when checking Service dependencies. Normally Nagios® will only use the latest hard Service state when checking dependencies. If you want it to use the latest state (regardless of whether its a soft or hard state type), enable this option.
    Timeout Values These options control how much time Nagios® will allow various types of commands to execute before killing them off. Options are available for controlling maximum time allotted for Service checks, Host checks, event handlers, Notifications, the ocsp command, and performance data commands. All values are in seconds.
    Obsess Over Services This determines whether or not Nagios® will obsess over Service checks and run the ocsp_command defined below. Unless you’re planning on implementing distributed monitoring, do not enable this option. Read the HTML docs for more information on implementing distributed monitoring. Values: checked = obsess over services, unchecked = do not obsess (default)
    OCSP Command This is the command that is run for every Service check that is processed by Nagios®. This command is executed only if the obsess_over_service option (above) is set to 1. The command argument is the short name of a command definition that you define in your Host configuration file. Read the HTML docs for more information on implementing distributed monitoring.
    Obsess Over Hosts Option This value determines whether or not Nagios® will ‘obsess’ over host check results and run the obsessive compulsive host processor command you define. I know – funny name, but it was all I could think of. This option is useful for performing distributed monitoring. If you’re not doing distributed monitoring, don’t enable this option. Checked = enabled.
    Obsessive Compulsive Host Processor Command This option allows you to specify a command to be run after every host check, which can be useful in distributed monitoring. This command is executed after any event handler or notification command. The command argument is the short name of a command definition that you define in your object configuration file. The maximum amount of time that this command can run is controlled by the ochp_timeout option. This command is only executed if the obsess_over_hosts option is enabled globally and if the obsess_over_host directive in the host definition is enabled.
    Process Performance Data This determines whether or not Nagios® will process performance data returned from Service and Host checks. If this option is enabled, Host performance data will be processed using the Host perfdata command (defined below) and Service performance data will be processed using the Service perfdata command (also defined below). Read the HTML docs for more information on performance data. Values: checked = process performance data, unchecked = do not process performance data.
    Host Perfdata Command This option allows you to specify a command to be run after every Host check to process Host performance data that may be returned from the check. The command argument is the short name of a command definition that you define in your object configuration file. This command is only executed if the process_performance_data option is enabled globally and if the process_perf_data directive in the Host definition is enabled.
    Service Perfdata Command This option allows you to specify a command to be run after every Service check to process Service performance data that may be returned from the check. The command argument is the short name of a command definition that you define in your object configuration file. This command is only executed if the process_performance_data option is enabled globally and if the process_perf_data directive in the Service definition is enabled.
    Host Performance Data File This option allows you to specify a file to which Host performance data will be written after every Host check. Data will be written to the performance file as specified by the host_perfdata_file_template option. Performance data is only written to this file if the process_performance_data option is enabled globally and if the process_perf_data directive in the Host definition is enabled.
    Service Performance Data File This option allows you to specify a file to which Service performance data will be written after every Service check. Data will be written to the performance file as specified by the service_perfdata_file_template option. Performance data is only written to this file if the process_performance_data option is enabled globally and if the process_perf_data directive in the Service definition is enabled.
    Host Performance Data File Template This option determines what (and how) data is written to the Host performance data file. The template may contain macros, special characters (\t for tab, \r for carriage return, \n for newline) and plain text. A newline is automatically added after each write to the performance data file.
    Service Performance Data File Template This option determines what (and how) data is written to the Service performance data file. The template may contain macros, special characters (\t for tab, \r for carriage return, \n for newline) and plain text. A newline is automatically added after each write to the performance data file.
    Host Performance Data File Mode This option determines whether the Host performance data file is opened in write or append mode. Unless the file is a named pipe, you will probably want to use the default mode of append. a = Open file in append mode. w = Open file in write mode.
    Service Performance Data File Mode This option determines whether the Service performance data file is opened in write or append mode. Unless the file is a named pipe, you will probably want to use the default mode of append. a = Open file in append mode. w = Open file in write mode.
    Host performance Data File Processing Interval This option allows you to specify the interval (in seconds) at which the Host performance data file is processed using the Host performance data file processing command. A value of 0 indicates that the performance data file should not be processed at regular intervals.
    Service Performance Data File Processing Interval This option allows you to specify the interval (in seconds) at which the Service performance data file is processed using the Service performance data file processing command. A value of 0 indicates that the performance data file should not be processed at regular intervals.
    Host Performance Data File Processing Command This option allows you to specify the command that should be executed to process the Host performance data file. The command argument is the short name of a command definition that you define in your object configuration file. The interval at which this command is executed is determined by the host_perfdata_file_processing_interval directive.
    Service Performance Data File Processing Command This option allows you to specify the command that should be executed to process the Service performance data file. The command argument is the short name of a command definition that you define in your object configuration file. The interval at which this command is executed is determined by the service_perfdata_file_processing_interval directive.

Step 4 – Using Nagios® Main Configuration

  1. In the Nagios® Main Configuration Page 4 screen, enter the properties (see Table 5.12.3d. below).
  2. Select Save and Done to keep the changes.
  3. A screen will be displayed confirming your save. Select Continue.

    Figure 5.12.3d. Nagios® Main Configuration Page 4

    --- GW IMAGE NOT DISPLAYED ---

    Table 5.12.3d. Nagios® Main Configuration Page 4

    Check for Orphaned Services This determines whether or not Nagios® will periodically check for orphaned Services. Since Service checks are not rescheduled until the results of their previous execution instance are processed, there exists a possibility that some checks may never get rescheduled. This seems to be a rare problem and should not happen under normal circumstances. If you have problems with Service checks never getting rescheduled, you might want to try enabling this option. Values: checked = enable checks, unchecked = disable checks.
    Check Service Freshness Option This option determines whether or not Nagios® will periodically check the ‘freshness’ of Service results. Enabling this option is useful for ensuring passive checks are received in a timely manner. Values: checked = enabled freshness checking, unchecked = disable freshness checking.
    Service Freshness Check Interval This setting determines how often (in seconds) Nagios® will check the ‘freshness’ of Service check results. If you have disabled Service freshness checking, this option has no effect.
    Check Host Freshness Option This option determines whether or not Nagios® will periodically check the ‘freshness’ of Host checks. Enabling this option is useful for helping to ensure that passive Host checks are received in a timely manner. Checked = enabled.
    Host Freshness Check Interval This setting determines how often (in seconds) Nagios® will periodically check the ‘freshness’ of Host check results. If you have disabled Host freshness checking (with the check_host_freshness option), this option has no effect.
    Date Format This option determines how short dates are displayed. US: MM-DD-YYYY HH:MM:SS, Euro DD-MM-YYYY HH:MM:SS, ISO8601 YYYY-MM-DD HH:MM:SS,Strict-ISO8601 YYYY-MM-DDTHH:MM:SS
    Illegal Object name Chars This option allows you to specify illegal characters that cannot be used in Host names, Service descriptions, or names of other object types.
    Illegal Macro Output Chars This option allows you to specify illegal characters that are stripped from macros before being used in Notifications, event handlers, etc. This DOES NOT affect macros used in Service or Host check commands. The following macros are stripped of the characters you specify: $OUTPUT$, $PERFDATA$.
    Admin Email The email address of the administrator of *this* machine (the one doing the monitoring). Nagios® never uses this value itself, but you can access this value by using the $ADMINEMAIL$ macro in your Notification commands.
    Admin Pager The pager number/address for the administrator of *this* machine. Nagios® never uses this value itself, but you can access this value by using the $ADMINPAGER$ macro in your Notification commands.

Using the Control Option


--- GW IMAGE NOT DISPLAYED --- How Do I View Nagios® Resource Macros?


Nagios® Resource Macros

  1. Select Control from the Configuration menu options.
  2. Select Nagios® Resource Macros.
  3. In the Nagios® Resource Macros screen select the macro to be configured.
  4. Select Update to save changes.

    Figure 5.12.4a. Nagios® Resource Macros

    --- GW IMAGE NOT DISPLAYED ---

    Table 5.12.4a. Nagios® Resource Macros

    Select Resource Macro Check the box of the Resource Macro to create/edit. The Macro will then be displayed at the top of the screen. Enter the Macro for the selected user. You may also add a comment which will be displayed as a mouse over in the listing of Resource Macros. Select Update to save any changes. Changes will then be displayed in the lower screen.

Using the Control Option


--- GW IMAGE NOT DISPLAYED --- How Do I Load a Nagios® Configuration?


If you are a Nagios® user, it’s likely that you already have a working configuration that you would like to start with. If you are using Nagios® 1.x, and would like to upgrade to 2.0, GroundWork Monitor Professional is an excellent way to convert existing files. Simply copy your existing files to the GroundWork server, change the path values in the nagios.cfg file to the /usr/local/groundwork/nagios/etc directory for the configuration files, and change the location of the log file to /usr/local/groundwork/nagios/var/log dir. You can then use the Configuration tab to load your files into the configuration package.

Look under the Control submenu, and chose the Load option. Then, simply change the version of Nagios® in the setup option, and the next time you commit changes, they will be in Nagios® 2.0 format. Any missing directives that Nagios® 2.0 requires will be detected on a Pre Flight Test, and you can easily add them via the web interface.

Load Nagios® Configuration

  1. Select Control from the Configuration menu options.
  2. Select Load.
  3. In the Load Nagios® Configuration screen it is suggested that the Backup option be used before updating the Nagios® Configuration.
  4. After selecting Backup the next screen confirms the Backup and lists where the Backup is located. Select Load to continue.
  5. In the Load Nagios® Object Files screen, the following four Load Options are displayed, select one of the options (and Load Escalations if desired:
    • Update (default): Add and update objects from the file definitions. Note: Escalations are excluded unless you select Load Escalations below. Please note that Profile file associations revert to default values. Host Profiles: hosts.cfg and Service Profiles: services.cfg.
    • Load Escalations: Replace Escalations from the file definitions. There is not option to update Escalations.
    • Purge All: Completely clear all Nagios® records, including profiles and their associations, from the database. This option will re-populate the database from the file definitions.
    • Purge Nice: clear Nagios® service related records, including Services, Service Dependencies, Service Templates, and Escalations, but preserve Hosts, Commands, Time Periods, Contacts, and Profiles (including Service Profiles). This option will update Hosts, Commands, Time Periods and Contacts from the file definitions. Service Profiles remain as empty vessels. Please note the Profile file associations revert to default values. Host Profiles: hosts.cfg and Service Profiles: services.cfg.
  6. Select Load to process the Nagios® Object Files. You get an AJAX enabled status message and event log showing the progress. At the top of the screen the message Please keep this page open until status reads finished.
  7. Select Continue to finish.

    Figure 5.12.5a. Load Nagios® Configuration – Backup/Load/Abort

    --- GW IMAGE NOT DISPLAYED ---

    Table 5.12.5a. Load Nagios® Configuration

    Load Select Load if you are sure you want to update or drop all Nagios® records in the database. Should you choose to continue it is strongly recommended that you first select the Backup option.
    Backup Select Backup to backup Nagios® records in the database.
    Abort Abort or cancel loading of Nagios® records.

    Figure 5.12.5b. Load Nagios® Configuration – Load Options

    --- GW IMAGE NOT DISPLAYED ---

Using the Control Option


--- GW IMAGE NOT DISPLAYED --- How Do I Run a Pre Flight Test?


Nagios® Pre Flight Test

  1. Select Control from the Configuration menu options.
  2. Select Pre Flight Test.
  3. The Pre Flight Test will be run and a list of Results will appear on the next screen.
  4. Select Continue to complete.

    Figure 5.12.7a. Nagios® Pre Flight Test

    --- GW IMAGE NOT DISPLAYED ---

Using the Control Option


--- GW IMAGE NOT DISPLAYED --- How Do I Commit a Nagios® Configuration?


Nagios® Commit

  1. Select Control from the Configuration menu options.
  2. Select Commit.
  3. In the Nagios® Commit screen you will be prompted to Backup the active Nagios® configuration
  4. Select Commit to overwrite the active Nagios® configuration and restart Nagios®.

    Figure 5.12.8a. Nagios® Commit

    --- GW IMAGE NOT DISPLAYED ---

    Table 5.12.8a. Nagios® Commit

    Commit Select Commit to Overwrite your active Nagios® configuration and restarts Nagios®.
    Backup Select Backup to backup Nagios® records in the database.
    Abort Abort or cancel loading of Nagios® records.