| 1 |
diff -up ./base/Makefile.in.fix_localstatedir ./base/Makefile.in |
| 2 |
--- ./base/Makefile.in.fix_localstatedir 2019-01-16 13:29:13.079040249 -0600 |
| 3 |
+++ ./base/Makefile.in 2019-01-16 13:32:54.103372583 -0600 |
| 4 |
@@ -33,7 +33,7 @@ LIBS=@LIBS@ |
| 5 |
|
| 6 |
prefix=@prefix@ |
| 7 |
exec_prefix=@exec_prefix@ |
| 8 |
-LOGDIR=@localstatedir@ |
| 9 |
+LOGDIR=@localstatedir@/log/nagios/ |
| 10 |
CFGDIR=@sysconfdir@ |
| 11 |
BINDIR=@bindir@ |
| 12 |
CGIDIR=@cgibindir@ |
| 13 |
diff -up ./cgi/Makefile.in.fix_localstatedir ./cgi/Makefile.in |
| 14 |
--- ./cgi/Makefile.in.fix_localstatedir 2019-01-16 13:33:14.596032529 -0600 |
| 15 |
+++ ./cgi/Makefile.in 2019-01-16 13:33:35.252689754 -0600 |
| 16 |
@@ -12,7 +12,7 @@ SRC_LIB=../lib |
| 17 |
|
| 18 |
prefix=@prefix@ |
| 19 |
exec_prefix=@exec_prefix@ |
| 20 |
-LOGDIR=@localstatedir@ |
| 21 |
+LOGDIR=@localstatedir@/log/nagios/ |
| 22 |
CFGDIR=@sysconfdir@ |
| 23 |
BINDIR=@bindir@ |
| 24 |
CGIDIR=@cgibindir@ |
| 25 |
diff -up ./common/Makefile.in.fix_localstatedir ./common/Makefile.in |
| 26 |
--- ./common/Makefile.in.fix_localstatedir 2019-01-16 13:33:51.236424521 -0600 |
| 27 |
+++ ./common/Makefile.in 2019-01-16 13:34:17.928981586 -0600 |
| 28 |
@@ -13,7 +13,7 @@ LDFLAGS=@LDFLAGS@ @LIBS@ |
| 29 |
|
| 30 |
prefix=@prefix@ |
| 31 |
exec_prefix=@exec_prefix@ |
| 32 |
-LOGDIR=@localstatedir@ |
| 33 |
+LOGDIR=@localstatedir@/log/nagios/ |
| 34 |
CFGDIR=@sysconfdir@ |
| 35 |
BINDIR=@bindir@ |
| 36 |
CGIDIR=@cgibindir@ |
| 37 |
diff -up ./html/config.inc.php.in.fix_localstatedir ./html/config.inc.php.in |
| 38 |
--- ./html/config.inc.php.in.fix_localstatedir 2019-01-16 13:35:06.875169375 -0600 |
| 39 |
+++ ./html/config.inc.php.in 2019-01-16 14:25:51.436714786 -0600 |
| 40 |
@@ -9,8 +9,8 @@ $cfg['cgi_base_url']='@cgiurl@'; |
| 41 |
|
| 42 |
// FILE LOCATION DEFAULTS |
| 43 |
$cfg['main_config_file']='@sysconfdir@/nagios.cfg'; // default location of the main Nagios config file |
| 44 |
-$cfg['status_file']='@localstatedir@/status.dat'; // default location of Nagios status file |
| 45 |
-$cfg['state_retention_file']='@localstatedir@/retention.dat'; // default location of Nagios retention file |
| 46 |
+$cfg['status_file']='@localstatedir@/spool/nagios/status.dat'; // default location of Nagios status file |
| 47 |
+$cfg['state_retention_file']='@localstatedir@/spool/nagios/retention.dat'; // default location of Nagios retention file |
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
diff -up ./html/Makefile.in.fix_localstatedir ./html/Makefile.in |
| 52 |
--- ./html/Makefile.in.fix_localstatedir 2019-01-16 13:37:18.936977949 -0600 |
| 53 |
+++ ./html/Makefile.in 2019-01-16 13:37:36.645684091 -0600 |
| 54 |
@@ -4,7 +4,7 @@ LDFLAGS=@LDFLAGS@ @LIBS@ |
| 55 |
|
| 56 |
prefix=@prefix@ |
| 57 |
exec_prefix=@exec_prefix@ |
| 58 |
-LOGDIR=@localstatedir@ |
| 59 |
+LOGDIR=@localstatedir@/log/nagios/ |
| 60 |
CFGDIR=@sysconfdir@ |
| 61 |
BINDIR=@bindir@ |
| 62 |
CGIDIR=@cgibindir@ |
| 63 |
diff -up ./include/locations.h.in.fix_localstatedir ./include/locations.h.in |
| 64 |
--- ./include/locations.h.in.fix_localstatedir 2019-01-16 13:38:02.700251743 -0600 |
| 65 |
+++ ./include/locations.h.in 2019-01-16 14:36:54.105757936 -0600 |
| 66 |
@@ -17,18 +17,18 @@ |
| 67 |
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 68 |
************************************************************************/ |
| 69 |
|
| 70 |
-#define DEFAULT_TEMP_FILE "@localstatedir@/tempfile" |
| 71 |
+#define DEFAULT_TEMP_FILE "@localstatedir@/spool/nagios/tempfile" |
| 72 |
#define DEFAULT_TEMP_PATH "/tmp" |
| 73 |
-#define DEFAULT_CHECK_RESULT_PATH "@localstatedir@/spool/checkresults" |
| 74 |
-#define DEFAULT_STATUS_FILE "@localstatedir@/status.dat" |
| 75 |
-#define DEFAULT_LOG_FILE "@localstatedir@/nagios.log" |
| 76 |
-#define DEFAULT_LOG_ARCHIVE_PATH "@localstatedir@/archives/" |
| 77 |
-#define DEFAULT_DEBUG_FILE "@localstatedir@/nagios.debug" |
| 78 |
-#define DEFAULT_COMMENT_FILE "@localstatedir@/comments.dat" |
| 79 |
-#define DEFAULT_DOWNTIME_FILE "@localstatedir@/downtime.dat" |
| 80 |
-#define DEFAULT_RETENTION_FILE "@localstatedir@/retention.dat" |
| 81 |
-#define DEFAULT_COMMAND_FILE "@localstatedir@/rw/nagios.cmd" |
| 82 |
-#define DEFAULT_QUERY_SOCKET "@localstatedir@/rw/nagios.qh" |
| 83 |
+#define DEFAULT_CHECK_RESULT_PATH "@localstatedir@/spool/nagios/checkresults" |
| 84 |
+#define DEFAULT_STATUS_FILE "@localstatedir@/spool/nagios/status.dat" |
| 85 |
+#define DEFAULT_LOG_FILE "@localstatedir@/log/nagios/nagios.log" |
| 86 |
+#define DEFAULT_LOG_ARCHIVE_PATH "@localstatedir@/log/nagios/archives/" |
| 87 |
+#define DEFAULT_DEBUG_FILE "@localstatedir@/log/nagios/nagios.debug" |
| 88 |
+#define DEFAULT_COMMENT_FILE "@localstatedir@/spool/nagios/comments.dat" |
| 89 |
+#define DEFAULT_DOWNTIME_FILE "@localstatedir@/spool/nagios/downtime.dat" |
| 90 |
+#define DEFAULT_RETENTION_FILE "@localstatedir@/spool/nagios/retention.dat" |
| 91 |
+#define DEFAULT_COMMAND_FILE "@localstatedir@/spool/nagios/cmd/nagios.cmd" |
| 92 |
+#define DEFAULT_QUERY_SOCKET "@localstatedir@/spool/nagios/cmd/nagios.qh" |
| 93 |
#define DEFAULT_CONFIG_FILE "@sysconfdir@/nagios.cfg" |
| 94 |
#define DEFAULT_PHYSICAL_HTML_PATH "@datadir@" |
| 95 |
#define DEFAULT_URL_HTML_PATH "@htmurl@" |
| 96 |
@@ -36,6 +36,6 @@ |
| 97 |
#define DEFAULT_URL_CGIBIN_PATH "@cgiurl@" |
| 98 |
#define DEFAULT_CGI_CONFIG_FILE "@sysconfdir@/cgi.cfg" |
| 99 |
#define DEFAULT_LOCK_FILE "@subsyslockfile@" |
| 100 |
-#define DEFAULT_OBJECT_CACHE_FILE "@localstatedir@/objects.cache" |
| 101 |
-#define DEFAULT_PRECACHED_OBJECT_FILE "@localstatedir@/objects.precache" |
| 102 |
-#define DEFAULT_EVENT_BROKER_FILE "@localstatedir@/broker.socket" |
| 103 |
+#define DEFAULT_OBJECT_CACHE_FILE "@localstatedir@/spool/nagios/objects.cache" |
| 104 |
+#define DEFAULT_PRECACHED_OBJECT_FILE "@localstatedir@/spool/nagios/objects.precache" |
| 105 |
+#define DEFAULT_EVENT_BROKER_FILE "@localstatedir@/spool/nagios/broker.socket" |
| 106 |
diff -up ./sample-config/nagios.cfg.in.fix_localstatedir ./sample-config/nagios.cfg.in |
| 107 |
--- ./sample-config/nagios.cfg.in.fix_localstatedir 2018-08-16 15:10:12.000000000 -0400 |
| 108 |
+++ ./sample-config/nagios.cfg.in 2018-11-30 13:52:14.989761698 -0500 |
| 109 |
@@ -15,7 +15,7 @@ |
| 110 |
# for historical purposes. This should be the first option specified |
| 111 |
# in the config file!!! |
| 112 |
|
| 113 |
-log_file=@localstatedir@/nagios.log |
| 114 |
+log_file=@localstatedir@/log/nagios/nagios.log |
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
@@ -63,7 +63,7 @@ cfg_file=@sysconfdir@/objects/localhost. |
| 119 |
# directly) in order to prevent inconsistencies that can occur |
| 120 |
# when the config files are modified after Nagios starts. |
| 121 |
|
| 122 |
-object_cache_file=@localstatedir@/objects.cache |
| 123 |
+object_cache_file=@localstatedir@/spool/nagios/objects.cache |
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
@@ -79,7 +79,7 @@ object_cache_file=@localstatedir@/object |
| 128 |
# Read the documentation section on optimizing Nagios to find our more |
| 129 |
# about how this feature works. |
| 130 |
|
| 131 |
-precached_object_file=@localstatedir@/objects.precache |
| 132 |
+precached_object_file=@localstatedir@/spool/nagios/objects.precache |
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
@@ -92,7 +92,7 @@ precached_object_file=@localstatedir@/ob |
| 137 |
# defined as macros in this file and restrictive permissions (600) |
| 138 |
# can be placed on this file. |
| 139 |
|
| 140 |
-resource_file=@sysconfdir@/resource.cfg |
| 141 |
+resource_file=@sysconfdir@/private/resource.cfg |
| 142 |
|
| 143 |
|
| 144 |
|
| 145 |
@@ -102,7 +102,7 @@ resource_file=@sysconfdir@/resource.cfg |
| 146 |
# The contents of the status file are deleted every time Nagios |
| 147 |
# restarts. |
| 148 |
|
| 149 |
-status_file=@localstatedir@/status.dat |
| 150 |
+status_file=@localstatedir@/spool/nagios/status.dat |
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
@@ -151,14 +151,14 @@ check_external_commands=1 |
| 155 |
# directory level instead of on the file, as the file is deleted every |
| 156 |
# time its contents are processed. |
| 157 |
|
| 158 |
-command_file=@localstatedir@/rw/nagios.cmd |
| 159 |
+command_file=@localstatedir@/spool/nagios/cmd/nagios.cmd |
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
# QUERY HANDLER INTERFACE |
| 164 |
# This is the socket that is created for the Query Handler interface |
| 165 |
|
| 166 |
-#query_socket=@localstatedir@/rw/nagios.qh |
| 167 |
+#query_socket=@localstatedir@/spool/nagios/cmd/nagios.qh |
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
@@ -176,7 +176,7 @@ lock_file=@subsyslockfile@ |
| 172 |
# is created, used, and deleted throughout the time that Nagios is |
| 173 |
# running. |
| 174 |
|
| 175 |
-temp_file=@localstatedir@/nagios.tmp |
| 176 |
+temp_file=@localstatedir@/spool/nagios/nagios.tmp |
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
@@ -243,7 +243,7 @@ log_rotation_method=d |
| 181 |
# This is the directory where archived (rotated) log files should be |
| 182 |
# placed (assuming you've chosen to do log rotation). |
| 183 |
|
| 184 |
-log_archive_path=@localstatedir@/archives |
| 185 |
+log_archive_path=@localstatedir@/log/nagios/archives |
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
@@ -618,7 +618,7 @@ retain_state_information=1 |
| 190 |
# This file is used only if the retain_state_information |
| 191 |
# variable is set to 1. |
| 192 |
|
| 193 |
-state_retention_file=@localstatedir@/retention.dat |
| 194 |
+state_retention_file=@localstatedir@/spool/nagios/retention.dat |
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
@@ -831,8 +831,8 @@ process_performance_data=0 |
| 199 |
# Performance data is only written to these files if the |
| 200 |
# enable_performance_data option (above) is set to 1. |
| 201 |
|
| 202 |
-#host_perfdata_file=@localstatedir@/host-perfdata |
| 203 |
-#service_perfdata_file=@localstatedir@/service-perfdata |
| 204 |
+#host_perfdata_file=@localstatedir@/log/nagios/host-perfdata |
| 205 |
+#service_perfdata_file=@localstatedir@/log/nagios/service-perfdata |
| 206 |
|
| 207 |
|
| 208 |
|
| 209 |
@@ -1292,7 +1292,7 @@ debug_verbosity=1 |
| 210 |
# DEBUG FILE |
| 211 |
# This option determines where Nagios should write debugging information. |
| 212 |
|
| 213 |
-debug_file=@localstatedir@/nagios.debug |
| 214 |
+debug_file=@localstatedir@/log/nagios/nagios.debug |
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
diff -up ./sample-config/template-object/commands.cfg.in.fix_localstatedir ./sample-config/template-object/commands.cfg.in |
| 219 |
--- ./sample-config/template-object/commands.cfg.in.fix_localstatedir 2019-01-16 13:50:29.366875513 -0600 |
| 220 |
+++ ./sample-config/template-object/commands.cfg.in 2019-01-16 13:51:22.140000845 -0600 |
| 221 |
@@ -241,7 +241,7 @@ define command { |
| 222 |
define command { |
| 223 |
|
| 224 |
command_name process-host-perfdata |
| 225 |
- command_line /usr/bin/printf "%b" "$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$\n" >> @localstatedir@/host-perfdata.out |
| 226 |
+ command_line /usr/bin/printf "%b" "$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$\n" >> @localstatedir@/log/nagios/host-perfdata.out |
| 227 |
} |
| 228 |
|
| 229 |
|
| 230 |
@@ -249,5 +249,5 @@ define command { |
| 231 |
define command { |
| 232 |
|
| 233 |
command_name process-service-perfdata |
| 234 |
- command_line /usr/bin/printf "%b" "$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$SERVICESTATETYPE$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\n" >> @localstatedir@/service-perfdata.out |
| 235 |
+ command_line /usr/bin/printf "%b" "$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$SERVICESTATETYPE$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\n" >> @localstatedir@/log/nagios/service-perfdata.out |
| 236 |
} |
| 237 |
diff -up ./startup/default-init.in.fix_localstatedir ./startup/default-init.in |
| 238 |
--- ./startup/default-init.in.fix_localstatedir 2019-01-16 14:16:54.874599523 -0600 |
| 239 |
+++ ./startup/default-init.in 2019-01-16 14:22:55.103634621 -0600 |
| 240 |
@@ -41,12 +41,12 @@ |
| 241 |
# Our install-time configuration. |
| 242 |
NagiosBin=@bindir@/@nagios_name@ |
| 243 |
NagiosCfgFile=@sysconfdir@/nagios.cfg |
| 244 |
-NagiosCfgtestFile=@localstatedir@/nagios.configtest |
| 245 |
-NagiosStatusFile=@localstatedir@/status.dat |
| 246 |
-NagiosRetentionFile=@localstatedir@/retention.dat |
| 247 |
-NagiosCommandFile=@localstatedir@/rw/nagios.cmd |
| 248 |
+NagiosCfgtestFile=@localstatedir@/spool/nagios/nagios.configtest |
| 249 |
+NagiosStatusFile=@localstatedir@/spool/nagios/status.dat |
| 250 |
+NagiosRetentionFile=@localstatedir@/spool/nagios/retention.dat |
| 251 |
+NagiosCommandFile=@localstatedir@/spool/nagios/cmd/nagios.cmd |
| 252 |
NagiosRunFile=@subsyslockfile@ |
| 253 |
-NagiosVarDir=@localstatedir@ |
| 254 |
+NagiosVarDir=@localstatedir@/spool/nagios/ |
| 255 |
NagiosCGIDir=@cgibindir@ |
| 256 |
NagiosUser=@nagios_user@ |
| 257 |
NagiosGroup=@nagios_grp@ |
| 258 |
diff -up ./startup/default-service.in.fix_localstatedir ./startup/default-service.in |
| 259 |
--- ./startup/default-service.in.fix_localstatedir 2019-01-16 14:23:17.575262522 -0600 |
| 260 |
+++ ./startup/default-service.in 2019-01-16 14:23:39.273903222 -0600 |
| 261 |
@@ -8,7 +8,7 @@ Type=forking |
| 262 |
ExecStartPre=@bindir@/nagios -v @sysconfdir@/nagios.cfg |
| 263 |
ExecStart=@bindir@/nagios -d @sysconfdir@/nagios.cfg |
| 264 |
ExecStop=@BIN_KILL@ -s TERM ${MAINPID} |
| 265 |
-ExecStopPost=@BIN_RM@ -f @localstatedir@/rw/nagios.cmd |
| 266 |
+ExecStopPost=@BIN_RM@ -f @localstatedir@/spool/nagios/cmd/nagios.cmd |
| 267 |
ExecReload=@bindir@/nagios -v @sysconfdir@/nagios.cfg |
| 268 |
ExecReload=@BIN_KILL@ -s HUP ${MAINPID} |
| 269 |
|
| 270 |
diff -up ./t-tap/Makefile.in.fix_localstatedir ./t-tap/Makefile.in |
| 271 |
--- ./t-tap/Makefile.in.fix_localstatedir 2019-01-16 14:24:14.944312569 -0600 |
| 272 |
+++ ./t-tap/Makefile.in 2019-01-16 14:24:42.359858604 -0600 |
| 273 |
@@ -42,7 +42,7 @@ LIBS=@LIBS@ ../lib/libnagios.a |
| 274 |
|
| 275 |
prefix=@prefix@ |
| 276 |
exec_prefix=@exec_prefix@ |
| 277 |
-LOGDIR=@localstatedir@ |
| 278 |
+LOGDIR=@localstatedir@/log/nagios/ |
| 279 |
CFGDIR=@sysconfdir@ |
| 280 |
BINDIR=@bindir@ |
| 281 |
CGIDIR=@cgibindir@ |