diff -ruN nagios-2.6.orig/sample-config/cgi.cfg.in nagios-2.6/sample-config/cgi.cfg.in --- nagios-2.6.orig/sample-config/cgi.cfg.in 2006-11-22 12:22:41 +1000 +++ nagios-2.6/sample-config/cgi.cfg.in 2006-11-30 01:09:45 +1000 @@ -12,7 +12,7 @@ # The CGIs will read the main and host config files for any other # data they might need. -main_config_file=@sysconfdir@/nagios.cfg +main_config_file=@sysconfdir@/nagios/nagios.cfg @@ -21,7 +21,7 @@ # value is used to locate the logo images needed by the statusmap # and statuswrl CGIs. -physical_html_path=@datadir@ +physical_html_path=@datadir@/nagios/html @@ -43,7 +43,7 @@ # Values: 0 = disables context-sensitive help # 1 = enables context-sensitive help -show_context_help=0 +show_context_help=1 @@ -62,7 +62,7 @@ # have to be tweaked a bit, as different versions of the plugin # use different command line arguments/syntaxes. -#nagios_check_command=@libexecdir@/check_nagios @localstatedir@/status.dat 5 '@bindir@/nagios' +nagios_check_command=@libexecdir@/nagios/check_nagios /var/log/nagios/nagios.log 5 '@sbindir@/nagios' @@ -114,6 +114,7 @@ # authorize any user who has authenticated to the web server. #authorized_for_system_information=nagiosadmin,theboss,jdoe +authorized_for_system_information=nagios @@ -126,6 +127,7 @@ # to the web server. #authorized_for_configuration_information=nagiosadmin,jdoe +authorized_for_configuration_information=nagios @@ -139,6 +141,7 @@ # authenticated to the web server. #authorized_for_system_commands=nagiosadmin +authorized_for_system_commands=nagios @@ -150,10 +153,11 @@ # you choose to not use authorization). You may use an asterisk (*) # to authorize any user who has authenticated to the web server. - #authorized_for_all_services=nagiosadmin,guest -#authorized_for_all_hosts=nagiosadmin,guest +authorized_for_all_services=nagios +#authorized_for_all_hosts=nagiosadmin,guest +authorized_for_all_hosts=nagios # GLOBAL HOST/SERVICE COMMAND ACCESS @@ -166,9 +170,10 @@ # user who has authenticated to the web server. #authorized_for_all_service_commands=nagiosadmin -#authorized_for_all_host_commands=nagiosadmin - +authorized_for_all_service_commands=nagios +#authorized_for_all_host_commands=nagiosadmin +authorized_for_all_host_commands=nagios # STATUSMAP BACKGROUND IMAGE @@ -185,7 +190,6 @@ #statusmap_background_image=smbackground.gd2 - # DEFAULT STATUSMAP LAYOUT METHOD # This option allows you to specify the default layout method # the statusmap CGI should use for drawing hosts. If you do @@ -201,7 +205,6 @@ default_statusmap_layout=5 - # DEFAULT STATUSWRL LAYOUT METHOD # This option allows you to specify the default layout method # the statuswrl (VRML) CGI should use for drawing hosts. If you @@ -215,11 +218,10 @@ default_statuswrl_layout=4 - # 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). +# resides in the HTML path (i.e. /usr/share/nagios/html). #statuswrl_include=myworld.wrl @@ -240,7 +242,6 @@ ping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$ - # REFRESH RATE # This option allows you to specify the refresh rate in seconds # of various CGIs (status, statusmap, extinfo, and outages). @@ -248,7 +249,6 @@ refresh_rate=90 - # SOUND OPTIONS # These options allow you to specify an optional audio file # that should be played in your browser window when there are diff -ruN nagios-2.6.orig/sample-config/httpd.conf.in nagios-2.6/sample-config/httpd.conf.in --- nagios-2.6.orig/sample-config/httpd.conf.in 2005-11-27 08:47:52 +1000 +++ nagios-2.6/sample-config/httpd.conf.in 2006-11-30 01:09:45 +1000 @@ -6,9 +6,9 @@ # configuration file. Customize the paths, etc. as # needed to fit your system. -ScriptAlias @cgiurl@ "@sbindir@" +ScriptAlias @cgiurl@ "@libexecdir/nagios/cgi@" - + # SSLRequireSSL Options ExecCGI AllowOverride None @@ -19,13 +19,13 @@ # Allow from 127.0.0.1 AuthName "Nagios Access" AuthType Basic - AuthUserFile @sysconfdir@/htpasswd.users + AuthUserFile @sysconfdir@/nagios/htpasswd.users Require valid-user -Alias @htmurl@ "@datadir@" +Alias @htmurl@ "@datadir@/nagios/html" - + # SSLRequireSSL Options None AllowOverride None @@ -36,7 +36,7 @@ # Allow from 127.0.0.1 AuthName "Nagios Access" AuthType Basic - AuthUserFile @sysconfdir@/htpasswd.users + AuthUserFile @sysconfdir@/nagios/htpasswd.users Require valid-user diff -ruN nagios-2.6.orig/sample-config/nagios.cfg.in nagios-2.6/sample-config/nagios.cfg.in --- nagios-2.6.orig/sample-config/nagios.cfg.in 2006-11-30 01:09:17 +1000 +++ nagios-2.6/sample-config/nagios.cfg.in 2006-11-30 01:17:45 +1000 @@ -16,8 +16,7 @@ # for historical purposes. This should be the first option specified # in the config file!!! -log_file=@localstatedir@/nagios.log - +log_file=/var/log/nagios/nagios.log # OBJECT CONFIGURATION FILE(S) @@ -31,38 +30,38 @@ # separate from host and contact definitions... # Command definitions -cfg_file=@sysconfdir@/commands.cfg +cfg_file=@sysconfdir@/nagios/commands.cfg # Host and service definitions for monitoring this machine -cfg_file=@sysconfdir@/localhost.cfg +cfg_file=@sysconfdir@/nagios/localhost.cfg # You can split other types of object definitions across several # config files if you wish (as done here), or keep them all in a # single config file. -#cfg_file=@sysconfdir@/contactgroups.cfg -#cfg_file=@sysconfdir@/contacts.cfg -#cfg_file=@sysconfdir@/dependencies.cfg -#cfg_file=@sysconfdir@/escalations.cfg -#cfg_file=@sysconfdir@/hostgroups.cfg -#cfg_file=@sysconfdir@/hosts.cfg -#cfg_file=@sysconfdir@/services.cfg -#cfg_file=@sysconfdir@/timeperiods.cfg +#cfg_file=@sysconfdir@/nagios/contactgroups.cfg +#cfg_file=@sysconfdir@/nagios/contacts.cfg +#cfg_file=@sysconfdir@/nagios/dependencies.cfg +#cfg_file=@sysconfdir@/nagios/escalations.cfg +#cfg_file=@sysconfdir@/nagios/hostgroups.cfg +#cfg_file=@sysconfdir@/nagios/hosts.cfg +#cfg_file=@sysconfdir@/nagios/services.cfg +#cfg_file=@sysconfdir@/nagios/timeperiods.cfg # Extended host/service info definitions are now stored along with # other object definitions: -#cfg_file=@sysconfdir@/hostextinfo.cfg -#cfg_file=@sysconfdir@/serviceextinfo.cfg +#cfg_file=@sysconfdir@/nagios/hostextinfo.cfg +#cfg_file=@sysconfdir@/nagios/serviceextinfo.cfg # You can also tell Nagios to process all config files (with a .cfg # extension) in a particular directory by using the cfg_dir # directive as shown below: -#cfg_dir=@sysconfdir@/servers -#cfg_dir=@sysconfdir@/printers -#cfg_dir=@sysconfdir@/switches -#cfg_dir=@sysconfdir@/routers +#cfg_dir=@sysconfdir@/nagios/servers +#cfg_dir=@sysconfdir@/nagios/printers +#cfg_dir=@sysconfdir@/nagios/switches +#cfg_dir=@sysconfdir@/nagios/routers @@ -73,8 +72,7 @@ # directly) in order to prevent inconsistencies that can occur # when the config files are modified after Nagios starts. -object_cache_file=@localstatedir@/objects.cache - +object_cache_file=@localstatedir@/nagios/objects.cache # RESOURCE FILE @@ -86,8 +84,7 @@ # defined as macros in this file and restrictive permissions (600) # can be placed on this file. -resource_file=@sysconfdir@/resource.cfg - +resource_file=@sysconfdir@/nagios/resource.cfg # STATUS FILE @@ -96,8 +93,7 @@ # The contents of the status file are deleted every time Nagios # restarts. -status_file=@localstatedir@/status.dat - +status_file=@localstatedir@/nagios/status.dat # NAGIOS USER @@ -107,7 +103,6 @@ nagios_user=@nagios_user@ - # NAGIOS GROUP # This determines the effective group that Nagios should run as. # You can either supply a group name or a GID. @@ -115,7 +110,6 @@ nagios_group=@nagios_grp@ - # EXTERNAL COMMAND OPTION # This option allows you to specify whether or not Nagios should check # for external commands (in the command file defined below). By default @@ -124,8 +118,7 @@ # you will have to enable this. Setting this value to 0 disables command # checking (the default), other values enable it. -check_external_commands=0 - +check_external_commands=1 # EXTERNAL COMMAND CHECK INTERVAL @@ -145,7 +138,6 @@ command_check_interval=-1 - # 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 @@ -154,24 +146,21 @@ # directory level instead of on the file, as the file is deleted every # time its contents are processed. -command_file=@localstatedir@/rw/nagios.cmd - +command_file=@localstatedir@/nagios/rw/nagios.cmd # COMMENT FILE # This is the file that Nagios will use for storing host and service # comments. -comment_file=@localstatedir@/comments.dat - +comment_file=@localstatedir@/nagios/comments.dat # DOWNTIME FILE # This is the file that Nagios will use for storing host and service # downtime data. -downtime_file=@localstatedir@/downtime.dat - +downtime_file=@localstatedir@/nagios/downtime.dat # LOCK FILE @@ -181,14 +170,13 @@ lock_file=@lockfile@ - # TEMP FILE # This is a temporary file that is used as scratch space when Nagios # updates the status log, cleans the comment file, etc. This file # is created, used, and deleted throughout the time that Nagios is # running. -temp_file=@localstatedir@/nagios.tmp +temp_file=@localstatedir@/nagios/nagios.tmp @@ -201,7 +189,6 @@ event_broker_options=-1 - # EVENT BROKER MODULE(S) # This directive is used to specify an event broker module that should # by loaded by Nagios at startup. Use multiple directives if you want @@ -217,7 +204,6 @@ - # LOG ROTATION METHOD # This is the log rotation method that Nagios should use to rotate # the main log file. Values are as follows.. @@ -235,7 +221,7 @@ # This is the directory where archived (rotated) log files should be # placed (assuming you've chosen to do log rotation). -log_archive_path=@localstatedir@/archives +log_archive_path=/var/log/nagios/archives @@ -243,7 +229,7 @@ # If you want messages logged to the syslog facility, as well as the # NetAlarm log file set this option to 1. If not, set it to 0. -use_syslog=1 +use_syslog=0 @@ -414,7 +400,6 @@ - # AUTO-RESCHEDULING OPTION # This option determines whether or not Nagios will attempt to # automatically reschedule active host and service checks to @@ -501,7 +486,7 @@ # This file is used only if the preserve_state_information # variable is set to 1. -state_retention_file=@localstatedir@/retention.dat +state_retention_file=@localstatedir@/nagios/retention.dat @@ -535,7 +520,7 @@ # If you want to use retained scheduling info, set this # value to 1. If not, set this value to 0. -use_retained_scheduling_info=0 +use_retained_scheduling_info=1 @@ -655,8 +640,8 @@ # Performance data is only written to these files if the # enable_performance_data option (above) is set to 1. -#host_perfdata_file=/tmp/host-perfdata -#service_perfdata_file=/tmp/service-perfdata +host_perfdata_file=/var/lib/nagios/tmp/host-perfdata +service_perfdata_file=/var/lib/nagios/tmp/service-perfdata @@ -772,7 +757,7 @@ # manner. # Values: 1 = enabled freshness checking, 0 = disable freshness checking -check_host_freshness=0 +check_host_freshness=1 @@ -822,7 +807,7 @@ # Values: 1 = enable flap detection # 0 = disable flap detection (default) -enable_flap_detection=0 +enable_flap_detection=1 @@ -847,7 +832,7 @@ # strict-iso8601 (YYYY-MM-DDTHH:MM:SS) # -date_format=us +date_format=iso8601 @@ -856,7 +841,7 @@ # embedded Perl interpreter) is located. If you didn't compile # Nagios with embedded Perl support, this option has no effect. -p1_file=@libdir@/nagios/p1.pl +p1_file=@libexecdir@/nagios/p1.pl @@ -895,7 +880,7 @@ # group names/descriptions in some fields of various object types. # Values: 1 = enable regexp matching, 0 = disable regexp matching -use_regexp_matching=0 +use_regexp_matching=1 @@ -909,7 +894,7 @@ # all the time (which can be annoying). # Values: 1 = enable true matching, 0 = disable true matching -use_true_regexp_matching=0 +use_true_regexp_matching=1 diff -ruN nagios-2.6.orig/sample-config/resource.cfg.in nagios-2.6/sample-config/resource.cfg.in --- nagios-2.6.orig/sample-config/resource.cfg.in 2003-09-12 10:57:51 +1100 +++ nagios-2.6/sample-config/resource.cfg.in 2006-11-30 01:09:45 +1000 @@ -23,10 +23,10 @@ ########################################################################### # Sets $USER1$ to be the path to the plugins -$USER1$=@libexecdir@ +$USER1$=@libexecdir@/nagios/plugins # Sets $USER2$ to be the path to event handlers -#$USER2$=@libexecdir@/eventhandlers +$USER2$=@libexecdir@/nagios/eventhandlers # Store some usernames and passwords (hidden from the CGIs) #$USER3$=someuser