Compare commits
1 commit
rawhide
...
epel8-play
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f463e509c |
32 changed files with 1 additions and 2305 deletions
17
.gitignore
vendored
17
.gitignore
vendored
|
|
@ -1,17 +0,0 @@
|
|||
nagios-3.2.1.tar.gz
|
||||
/nagios-3.2.2.tar.gz
|
||||
/nagios-3.2.3.tar.gz
|
||||
/nagios-3.3.1.tar.gz
|
||||
/nagios-3.4.1.tar.gz
|
||||
/nagios-3.4.2.tar.gz
|
||||
/nagios-3.4.3.tar.gz
|
||||
/nagios-3.4.4.tar.gz
|
||||
/nagios-3.5.0.tar.gz
|
||||
/nagios-3.5.1.tar.gz
|
||||
/nagios-4.0.8.tar.gz
|
||||
/nagioscore-release-4.2.4.tar.gz
|
||||
/nagioscore-nagios-4.3.1.tar.gz
|
||||
/nagioscore-nagios-4.3.2.tar.gz
|
||||
/nagioscore-nagios-4.3.4.tar.gz
|
||||
/nagioscore-nagios-4.4.2.tar.gz
|
||||
/nagioscore-nagios-4.4.3.tar.gz
|
||||
1
dead.package
Normal file
1
dead.package
Normal file
|
|
@ -0,0 +1 @@
|
|||
epel8-playground decommissioned : https://pagure.io/epel/issue/136
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
diff -up ./startup/default-init.in.fix_el6_init ./startup/default-init.in
|
||||
--- ./startup/default-init.in.fix_el6_init 2019-01-15 09:58:00.000000000 -0500
|
||||
+++ ./startup/default-init.in 2019-02-05 09:38:09.463144849 -0500
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
-# chkconfig: 345 99 01
|
||||
+# chkconfig: - 99 01
|
||||
# description: Nagios network monitor
|
||||
# processname: nagios
|
||||
# File : nagios
|
||||
@@ -24,6 +24,9 @@
|
||||
# - Clean out redhat macros and other dependencies
|
||||
# 2003-01-11 Ethan Galstad <egalstad@nagios.org>
|
||||
# - Updated su syntax (Gary Miller)
|
||||
+# 2018-11-28 Justin Paulsen <petaris@gmail.com>
|
||||
+# - Patched for EPEL release of Nagioscore 4.4.2
|
||||
+# - - nagios-0001-default-init.patch
|
||||
#
|
||||
# Description: Starts and stops the Nagios monitor
|
||||
# used to provide network services status.
|
||||
@@ -91,12 +94,12 @@ check_config ()
|
||||
echo "ERROR: Could not delete '$NagiosCfgtestFile'"
|
||||
exit 8
|
||||
fi
|
||||
- if ! su $NagiosUser -c "touch $NagiosCfgtestFile"; then
|
||||
+ if ! su $NagiosUser -c "touch $NagiosCfgtestFile" -s /bin/sh ; then
|
||||
echo "ERROR: Could not create or update '$NagiosCfgtestFile'"
|
||||
exit 8
|
||||
fi
|
||||
|
||||
- TMPFILE=$(mktemp /tmp/.configtest.XXXXXXXX)
|
||||
+ TMPFILE=$(mktemp $NagiosCfgtestFile.XXX)
|
||||
$NagiosBin -vp $NagiosCfgFile > "$TMPFILE"
|
||||
WARN=`grep ^"Total Warnings:" "$TMPFILE" |awk -F: '{print \$2}' |sed s/' '//g`
|
||||
ERR=`grep ^"Total Errors:" "$TMPFILE" |awk -F: '{print \$2}' |sed s/' '//g`
|
||||
@@ -138,11 +141,14 @@ status_nagios ()
|
||||
|
||||
printstatus_nagios ()
|
||||
{
|
||||
- if status_nagios; then
|
||||
+ status_nagios $1 $2
|
||||
+ RETVAL=$?
|
||||
+ if [ $RETVAL = 0 ]; then
|
||||
echo "nagios (pid $NagiosPID) is running..."
|
||||
else
|
||||
echo "nagios is not running"
|
||||
fi
|
||||
+ return $RETVAL
|
||||
}
|
||||
|
||||
killproc_nagios ()
|
||||
@@ -157,7 +163,17 @@ pid_nagios ()
|
||||
return 1
|
||||
fi
|
||||
|
||||
- NagiosPID=`head -n 1 $NagiosRunFile`
|
||||
+ export NagiosPID=`head -n 1 $NagiosRunFile`
|
||||
+ if [[ -z "$NagiosPID" ]]; then
|
||||
+ echo "No usable PID found in $NagiosRunFile"
|
||||
+ exit 1
|
||||
+ fi
|
||||
+
|
||||
+ regex='^[0-9]+$'
|
||||
+ if ! [[ $NagiosPID =~ $regex ]]; then
|
||||
+ echo "PID not number found in $NagiosRunFile"
|
||||
+ exit 1
|
||||
+ fi
|
||||
}
|
||||
|
||||
# Check that nagios exists.
|
||||
@@ -188,7 +204,7 @@ case "$1" in
|
||||
fi
|
||||
fi
|
||||
|
||||
- su $NagiosUser -c "touch $NagiosVarDir/nagios.log $NagiosRetentionFile"
|
||||
+ su $NagiosUser -c "touch $NagiosVarDir/nagios.log $NagiosRetentionFile" -s /bin/sh
|
||||
@BIN_RM@ -f $NagiosCommandFile
|
||||
touch $NagiosRunFile
|
||||
$NagiosBin -d $NagiosCfgFile
|
||||
@@ -281,6 +297,7 @@ case "$1" in
|
||||
*)
|
||||
echo "Usage: nagios {start|stop|restart|reload|force-reload|status|checkconfig|configtest}"
|
||||
exit 1
|
||||
+ exit 2
|
||||
;;
|
||||
|
||||
esac
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
diff -up ./Makefile.in.fix_httpd_conf_d ./Makefile.in
|
||||
--- ./Makefile.in.fix_httpd_conf_d 2018-11-28 12:36:22.206486501 -0600
|
||||
+++ ./Makefile.in 2018-11-28 12:37:26.098414877 -0600
|
||||
@@ -337,6 +337,7 @@ install-groups-users:
|
||||
@autoconf-macros/add_group_user $(DIST) $(NAGIOS_USER) $(NAGIOS_GRP) 1
|
||||
|
||||
install-webconf:
|
||||
+ $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTTPD_CONF)
|
||||
$(INSTALL) -m 644 sample-config/httpd.conf $(DESTDIR)$(HTTPD_CONF)/nagios.conf
|
||||
if [ $(LN_HTTPD_SITES_ENABLED) -eq 1 ]; then \
|
||||
$(LN_S) $(DESTDIR)$(HTTPD_CONF)/nagios.conf $(DESTDIR)/etc/apache2/sites-enabled/nagios.conf; \
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
diff -up ./Makefile.in.install_config ./Makefile.in
|
||||
--- ./Makefile.in.install_config 2017-04-19 19:11:47.783707415 -0400
|
||||
+++ ./Makefile.in 2017-04-19 19:11:47.785707384 -0400
|
||||
@@ -377,7 +377,7 @@ dox:
|
||||
doxygen doxy.conf
|
||||
|
||||
|
||||
-fullinstall: install install-init install-commandmode install-webconf install-devel
|
||||
+fullinstall: install install-init install-commandmode install-webconf install-devel install-config
|
||||
|
||||
# Uninstall is too destructive if base install directory is /usr, etc.
|
||||
#uninstall:
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
From 3bdd7e40e1c7e7484edcb53b01ef3cd446305466 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Lemenkov <lemenkov@gmail.com>
|
||||
Date: Mon, 15 Nov 2010 15:07:49 +0300
|
||||
Subject: [PATCH 08/12] Fix path to CGI executables
|
||||
|
||||
See rhbz #653291 for additional details:
|
||||
|
||||
https://bugzilla.redhat.com/653291
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
|
||||
|
||||
Modified for 4.0.8 - Scott Wilkerson <swilkerson@nagios.com>
|
||||
|
||||
---
|
||||
sample-config/httpd.conf.in | 4 ++--
|
||||
subst.in | 1 +
|
||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/sample-config/httpd.conf.in b/sample-config/httpd.conf.in
|
||||
index 71d4fbb..1b1e693 100644
|
||||
--- a/sample-config/httpd.conf.in
|
||||
+++ b/sample-config/httpd.conf.in
|
||||
@@ -5,9 +5,9 @@
|
||||
# configuration file. Customize the paths, etc. as
|
||||
# needed to fit your system.
|
||||
|
||||
-ScriptAlias @cgiurl@ "@sbindir@"
|
||||
+ScriptAlias @cgiurl@ "@cgidir@"
|
||||
|
||||
-<Directory "@sbindir@">
|
||||
+<Directory "@cgidir@">
|
||||
# SSLRequireSSL
|
||||
Options ExecCGI
|
||||
AllowOverride None
|
||||
diff --git a/subst.in b/subst.in
|
||||
index a8e2c06..bbffb3a 100755
|
||||
--- a/subst.in
|
||||
+++ b/subst.in
|
||||
@@ -35,6 +35,7 @@ while ($f = shift @ARGV) {
|
||||
s|\@datarootdir\@|@datarootdir@|g;
|
||||
s|\@sbindir\@|@sbindir@|g;
|
||||
s|\@bindir\@|@bindir@|g;
|
||||
+ s|\@cgidir\@|@libdir@/cgi-bin/|g;
|
||||
s|\@htmurl\@|@htmurl@|g;
|
||||
s|\@cgiurl\@|@cgiurl@|g;
|
||||
s|\@MAIL_PROG\@|@MAIL_PROG@|g;
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
diff -up ./sample-config/httpd.conf.in.fix_path_to_passwd ./sample-config/httpd.conf.in
|
||||
--- ./sample-config/httpd.conf.in.fix_path_to_passwd 2016-10-24 10:10:28.000000000 -0400
|
||||
+++ ./sample-config/httpd.conf.in 2016-11-08 14:37:02.117929826 -0500
|
||||
@@ -18,7 +18,7 @@ ScriptAlias @cgiurl@ "@sbindir@"
|
||||
|
||||
AuthName "Nagios Access"
|
||||
AuthType Basic
|
||||
- AuthUserFile @sysconfdir@/htpasswd.users
|
||||
+ AuthUserFile @sysconfdir@/passwd
|
||||
Require valid-user
|
||||
</RequireAll>
|
||||
</IfVersion>
|
||||
@@ -31,7 +31,7 @@ ScriptAlias @cgiurl@ "@sbindir@"
|
||||
|
||||
AuthName "Nagios Access"
|
||||
AuthType Basic
|
||||
- AuthUserFile @sysconfdir@/htpasswd.users
|
||||
+ AuthUserFile @sysconfdir@/passwd
|
||||
Require valid-user
|
||||
</IfVersion>
|
||||
</Directory>
|
||||
@@ -49,7 +49,7 @@ Alias @htmurl@ "@datadir@"
|
||||
|
||||
AuthName "Nagios Access"
|
||||
AuthType Basic
|
||||
- AuthUserFile @sysconfdir@/htpasswd.users
|
||||
+ AuthUserFile @sysconfdir@/passwd
|
||||
Require valid-user
|
||||
</RequireAll>
|
||||
</IfVersion>
|
||||
@@ -62,7 +62,7 @@ Alias @htmurl@ "@datadir@"
|
||||
|
||||
AuthName "Nagios Access"
|
||||
AuthType Basic
|
||||
- AuthUserFile @sysconfdir@/htpasswd.users
|
||||
+ AuthUserFile @sysconfdir@/passwd
|
||||
Require valid-user
|
||||
</IfVersion>
|
||||
</Directory>
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
diff -up ./sample-config/template-object/templates.cfg.in.more_images ./sample-config/template-object/templates.cfg.in
|
||||
--- ./sample-config/template-object/templates.cfg.in.more_images 2018-11-28 13:10:25.822264939 -0600
|
||||
+++ ./sample-config/template-object/templates.cfg.in 2018-11-28 13:16:15.711410141 -0600
|
||||
@@ -123,6 +123,7 @@ define host {
|
||||
notification_interval 30 ; Resend notifications every 30 minutes
|
||||
notification_options d,r ; Only send notifications for specific host states
|
||||
contact_groups admins ; Notifications get sent to the admins by default
|
||||
+ statusmap_image printer.png
|
||||
register 0 ; DON'T REGISTER THIS - ITS JUST A TEMPLATE
|
||||
}
|
||||
|
||||
@@ -142,9 +143,17 @@ define host {
|
||||
notification_interval 30 ; Resend notifications every 30 minutes
|
||||
notification_options d,r ; Only send notifications for specific host states
|
||||
contact_groups admins ; Notifications get sent to the admins by default
|
||||
+ statusmap_image switch.png
|
||||
register 0 ; DON'T REGISTER THIS - ITS JUST A TEMPLATE
|
||||
}
|
||||
|
||||
+# Define a template for routers that we can reuse
|
||||
+define host{
|
||||
+ name generic-router ; The name of this host template
|
||||
+ use generic-switch ; Inherit default values from the generic-host template
|
||||
+ statusmap_image router.png
|
||||
+ register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE
|
||||
+}
|
||||
|
||||
|
||||
###############################################################################
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
diff -up ./sample-config/nagios.cfg.in.conf_d ./sample-config/nagios.cfg.in
|
||||
--- ./sample-config/nagios.cfg.in.conf_d 2017-08-24 17:43:48.000000000 -0400
|
||||
+++ ./sample-config/nagios.cfg.in 2017-09-15 18:29:48.659666387 -0400
|
||||
@@ -53,6 +53,8 @@ cfg_file=@sysconfdir@/objects/localhost.
|
||||
#cfg_dir=@sysconfdir@/switches
|
||||
#cfg_dir=@sysconfdir@/routers
|
||||
|
||||
+cfg_dir=@sysconfdir@/conf.d
|
||||
+
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,281 +0,0 @@
|
|||
diff -up ./base/Makefile.in.fix_localstatedir ./base/Makefile.in
|
||||
--- ./base/Makefile.in.fix_localstatedir 2019-01-16 13:29:13.079040249 -0600
|
||||
+++ ./base/Makefile.in 2019-01-16 13:32:54.103372583 -0600
|
||||
@@ -33,7 +33,7 @@ LIBS=@LIBS@
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
-LOGDIR=@localstatedir@
|
||||
+LOGDIR=@localstatedir@/log/nagios/
|
||||
CFGDIR=@sysconfdir@
|
||||
BINDIR=@bindir@
|
||||
CGIDIR=@cgibindir@
|
||||
diff -up ./cgi/Makefile.in.fix_localstatedir ./cgi/Makefile.in
|
||||
--- ./cgi/Makefile.in.fix_localstatedir 2019-01-16 13:33:14.596032529 -0600
|
||||
+++ ./cgi/Makefile.in 2019-01-16 13:33:35.252689754 -0600
|
||||
@@ -12,7 +12,7 @@ SRC_LIB=../lib
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
-LOGDIR=@localstatedir@
|
||||
+LOGDIR=@localstatedir@/log/nagios/
|
||||
CFGDIR=@sysconfdir@
|
||||
BINDIR=@bindir@
|
||||
CGIDIR=@cgibindir@
|
||||
diff -up ./common/Makefile.in.fix_localstatedir ./common/Makefile.in
|
||||
--- ./common/Makefile.in.fix_localstatedir 2019-01-16 13:33:51.236424521 -0600
|
||||
+++ ./common/Makefile.in 2019-01-16 13:34:17.928981586 -0600
|
||||
@@ -13,7 +13,7 @@ LDFLAGS=@LDFLAGS@ @LIBS@
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
-LOGDIR=@localstatedir@
|
||||
+LOGDIR=@localstatedir@/log/nagios/
|
||||
CFGDIR=@sysconfdir@
|
||||
BINDIR=@bindir@
|
||||
CGIDIR=@cgibindir@
|
||||
diff -up ./html/config.inc.php.in.fix_localstatedir ./html/config.inc.php.in
|
||||
--- ./html/config.inc.php.in.fix_localstatedir 2019-01-16 13:35:06.875169375 -0600
|
||||
+++ ./html/config.inc.php.in 2019-01-16 14:25:51.436714786 -0600
|
||||
@@ -9,8 +9,8 @@ $cfg['cgi_base_url']='@cgiurl@';
|
||||
|
||||
// FILE LOCATION DEFAULTS
|
||||
$cfg['main_config_file']='@sysconfdir@/nagios.cfg'; // default location of the main Nagios config file
|
||||
-$cfg['status_file']='@localstatedir@/status.dat'; // default location of Nagios status file
|
||||
-$cfg['state_retention_file']='@localstatedir@/retention.dat'; // default location of Nagios retention file
|
||||
+$cfg['status_file']='@localstatedir@/spool/nagios/status.dat'; // default location of Nagios status file
|
||||
+$cfg['state_retention_file']='@localstatedir@/spool/nagios/retention.dat'; // default location of Nagios retention file
|
||||
|
||||
|
||||
|
||||
diff -up ./html/Makefile.in.fix_localstatedir ./html/Makefile.in
|
||||
--- ./html/Makefile.in.fix_localstatedir 2019-01-16 13:37:18.936977949 -0600
|
||||
+++ ./html/Makefile.in 2019-01-16 13:37:36.645684091 -0600
|
||||
@@ -4,7 +4,7 @@ LDFLAGS=@LDFLAGS@ @LIBS@
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
-LOGDIR=@localstatedir@
|
||||
+LOGDIR=@localstatedir@/log/nagios/
|
||||
CFGDIR=@sysconfdir@
|
||||
BINDIR=@bindir@
|
||||
CGIDIR=@cgibindir@
|
||||
diff -up ./include/locations.h.in.fix_localstatedir ./include/locations.h.in
|
||||
--- ./include/locations.h.in.fix_localstatedir 2019-01-16 13:38:02.700251743 -0600
|
||||
+++ ./include/locations.h.in 2019-01-16 14:36:54.105757936 -0600
|
||||
@@ -17,18 +17,18 @@
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
************************************************************************/
|
||||
|
||||
-#define DEFAULT_TEMP_FILE "@localstatedir@/tempfile"
|
||||
+#define DEFAULT_TEMP_FILE "@localstatedir@/spool/nagios/tempfile"
|
||||
#define DEFAULT_TEMP_PATH "/tmp"
|
||||
-#define DEFAULT_CHECK_RESULT_PATH "@localstatedir@/spool/checkresults"
|
||||
-#define DEFAULT_STATUS_FILE "@localstatedir@/status.dat"
|
||||
-#define DEFAULT_LOG_FILE "@localstatedir@/nagios.log"
|
||||
-#define DEFAULT_LOG_ARCHIVE_PATH "@localstatedir@/archives/"
|
||||
-#define DEFAULT_DEBUG_FILE "@localstatedir@/nagios.debug"
|
||||
-#define DEFAULT_COMMENT_FILE "@localstatedir@/comments.dat"
|
||||
-#define DEFAULT_DOWNTIME_FILE "@localstatedir@/downtime.dat"
|
||||
-#define DEFAULT_RETENTION_FILE "@localstatedir@/retention.dat"
|
||||
-#define DEFAULT_COMMAND_FILE "@localstatedir@/rw/nagios.cmd"
|
||||
-#define DEFAULT_QUERY_SOCKET "@localstatedir@/rw/nagios.qh"
|
||||
+#define DEFAULT_CHECK_RESULT_PATH "@localstatedir@/spool/nagios/checkresults"
|
||||
+#define DEFAULT_STATUS_FILE "@localstatedir@/spool/nagios/status.dat"
|
||||
+#define DEFAULT_LOG_FILE "@localstatedir@/log/nagios/nagios.log"
|
||||
+#define DEFAULT_LOG_ARCHIVE_PATH "@localstatedir@/log/nagios/archives/"
|
||||
+#define DEFAULT_DEBUG_FILE "@localstatedir@/log/nagios/nagios.debug"
|
||||
+#define DEFAULT_COMMENT_FILE "@localstatedir@/spool/nagios/comments.dat"
|
||||
+#define DEFAULT_DOWNTIME_FILE "@localstatedir@/spool/nagios/downtime.dat"
|
||||
+#define DEFAULT_RETENTION_FILE "@localstatedir@/spool/nagios/retention.dat"
|
||||
+#define DEFAULT_COMMAND_FILE "@localstatedir@/spool/nagios/cmd/nagios.cmd"
|
||||
+#define DEFAULT_QUERY_SOCKET "@localstatedir@/spool/nagios/cmd/nagios.qh"
|
||||
#define DEFAULT_CONFIG_FILE "@sysconfdir@/nagios.cfg"
|
||||
#define DEFAULT_PHYSICAL_HTML_PATH "@datadir@"
|
||||
#define DEFAULT_URL_HTML_PATH "@htmurl@"
|
||||
@@ -36,6 +36,6 @@
|
||||
#define DEFAULT_URL_CGIBIN_PATH "@cgiurl@"
|
||||
#define DEFAULT_CGI_CONFIG_FILE "@sysconfdir@/cgi.cfg"
|
||||
#define DEFAULT_LOCK_FILE "@subsyslockfile@"
|
||||
-#define DEFAULT_OBJECT_CACHE_FILE "@localstatedir@/objects.cache"
|
||||
-#define DEFAULT_PRECACHED_OBJECT_FILE "@localstatedir@/objects.precache"
|
||||
-#define DEFAULT_EVENT_BROKER_FILE "@localstatedir@/broker.socket"
|
||||
+#define DEFAULT_OBJECT_CACHE_FILE "@localstatedir@/spool/nagios/objects.cache"
|
||||
+#define DEFAULT_PRECACHED_OBJECT_FILE "@localstatedir@/spool/nagios/objects.precache"
|
||||
+#define DEFAULT_EVENT_BROKER_FILE "@localstatedir@/spool/nagios/broker.socket"
|
||||
diff -up ./sample-config/nagios.cfg.in.fix_localstatedir ./sample-config/nagios.cfg.in
|
||||
--- ./sample-config/nagios.cfg.in.fix_localstatedir 2018-08-16 15:10:12.000000000 -0400
|
||||
+++ ./sample-config/nagios.cfg.in 2018-11-30 13:52:14.989761698 -0500
|
||||
@@ -15,7 +15,7 @@
|
||||
# for historical purposes. This should be the first option specified
|
||||
# in the config file!!!
|
||||
|
||||
-log_file=@localstatedir@/nagios.log
|
||||
+log_file=@localstatedir@/log/nagios/nagios.log
|
||||
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ cfg_file=@sysconfdir@/objects/localhost.
|
||||
# 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@/spool/nagios/objects.cache
|
||||
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ object_cache_file=@localstatedir@/object
|
||||
# Read the documentation section on optimizing Nagios to find our more
|
||||
# about how this feature works.
|
||||
|
||||
-precached_object_file=@localstatedir@/objects.precache
|
||||
+precached_object_file=@localstatedir@/spool/nagios/objects.precache
|
||||
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ precached_object_file=@localstatedir@/ob
|
||||
# defined as macros in this file and restrictive permissions (600)
|
||||
# can be placed on this file.
|
||||
|
||||
-resource_file=@sysconfdir@/resource.cfg
|
||||
+resource_file=@sysconfdir@/private/resource.cfg
|
||||
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ resource_file=@sysconfdir@/resource.cfg
|
||||
# The contents of the status file are deleted every time Nagios
|
||||
# restarts.
|
||||
|
||||
-status_file=@localstatedir@/status.dat
|
||||
+status_file=@localstatedir@/spool/nagios/status.dat
|
||||
|
||||
|
||||
|
||||
@@ -151,14 +151,14 @@ check_external_commands=1
|
||||
# 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@/spool/nagios/cmd/nagios.cmd
|
||||
|
||||
|
||||
|
||||
# QUERY HANDLER INTERFACE
|
||||
# This is the socket that is created for the Query Handler interface
|
||||
|
||||
-#query_socket=@localstatedir@/rw/nagios.qh
|
||||
+#query_socket=@localstatedir@/spool/nagios/cmd/nagios.qh
|
||||
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@ lock_file=@subsyslockfile@
|
||||
# is created, used, and deleted throughout the time that Nagios is
|
||||
# running.
|
||||
|
||||
-temp_file=@localstatedir@/nagios.tmp
|
||||
+temp_file=@localstatedir@/spool/nagios/nagios.tmp
|
||||
|
||||
|
||||
|
||||
@@ -243,7 +243,7 @@ log_rotation_method=d
|
||||
# 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=@localstatedir@/log/nagios/archives
|
||||
|
||||
|
||||
|
||||
@@ -618,7 +618,7 @@ retain_state_information=1
|
||||
# This file is used only if the retain_state_information
|
||||
# variable is set to 1.
|
||||
|
||||
-state_retention_file=@localstatedir@/retention.dat
|
||||
+state_retention_file=@localstatedir@/spool/nagios/retention.dat
|
||||
|
||||
|
||||
|
||||
@@ -831,8 +831,8 @@ process_performance_data=0
|
||||
# Performance data is only written to these files if the
|
||||
# enable_performance_data option (above) is set to 1.
|
||||
|
||||
-#host_perfdata_file=@localstatedir@/host-perfdata
|
||||
-#service_perfdata_file=@localstatedir@/service-perfdata
|
||||
+#host_perfdata_file=@localstatedir@/log/nagios/host-perfdata
|
||||
+#service_perfdata_file=@localstatedir@/log/nagios/service-perfdata
|
||||
|
||||
|
||||
|
||||
@@ -1292,7 +1292,7 @@ debug_verbosity=1
|
||||
# DEBUG FILE
|
||||
# This option determines where Nagios should write debugging information.
|
||||
|
||||
-debug_file=@localstatedir@/nagios.debug
|
||||
+debug_file=@localstatedir@/log/nagios/nagios.debug
|
||||
|
||||
|
||||
|
||||
diff -up ./sample-config/template-object/commands.cfg.in.fix_localstatedir ./sample-config/template-object/commands.cfg.in
|
||||
--- ./sample-config/template-object/commands.cfg.in.fix_localstatedir 2019-01-16 13:50:29.366875513 -0600
|
||||
+++ ./sample-config/template-object/commands.cfg.in 2019-01-16 13:51:22.140000845 -0600
|
||||
@@ -241,7 +241,7 @@ define command {
|
||||
define command {
|
||||
|
||||
command_name process-host-perfdata
|
||||
- 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
|
||||
+ 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
|
||||
}
|
||||
|
||||
|
||||
@@ -249,5 +249,5 @@ define command {
|
||||
define command {
|
||||
|
||||
command_name process-service-perfdata
|
||||
- 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
|
||||
+ 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
|
||||
}
|
||||
diff -up ./startup/default-init.in.fix_localstatedir ./startup/default-init.in
|
||||
--- ./startup/default-init.in.fix_localstatedir 2019-01-16 14:16:54.874599523 -0600
|
||||
+++ ./startup/default-init.in 2019-01-16 14:22:55.103634621 -0600
|
||||
@@ -41,12 +41,12 @@
|
||||
# Our install-time configuration.
|
||||
NagiosBin=@bindir@/@nagios_name@
|
||||
NagiosCfgFile=@sysconfdir@/nagios.cfg
|
||||
-NagiosCfgtestFile=@localstatedir@/nagios.configtest
|
||||
-NagiosStatusFile=@localstatedir@/status.dat
|
||||
-NagiosRetentionFile=@localstatedir@/retention.dat
|
||||
-NagiosCommandFile=@localstatedir@/rw/nagios.cmd
|
||||
+NagiosCfgtestFile=@localstatedir@/spool/nagios/nagios.configtest
|
||||
+NagiosStatusFile=@localstatedir@/spool/nagios/status.dat
|
||||
+NagiosRetentionFile=@localstatedir@/spool/nagios/retention.dat
|
||||
+NagiosCommandFile=@localstatedir@/spool/nagios/cmd/nagios.cmd
|
||||
NagiosRunFile=@subsyslockfile@
|
||||
-NagiosVarDir=@localstatedir@
|
||||
+NagiosVarDir=@localstatedir@/spool/nagios/
|
||||
NagiosCGIDir=@cgibindir@
|
||||
NagiosUser=@nagios_user@
|
||||
NagiosGroup=@nagios_grp@
|
||||
diff -up ./startup/default-service.in.fix_localstatedir ./startup/default-service.in
|
||||
--- ./startup/default-service.in.fix_localstatedir 2019-01-16 14:23:17.575262522 -0600
|
||||
+++ ./startup/default-service.in 2019-01-16 14:23:39.273903222 -0600
|
||||
@@ -8,7 +8,7 @@ Type=forking
|
||||
ExecStartPre=@bindir@/nagios -v @sysconfdir@/nagios.cfg
|
||||
ExecStart=@bindir@/nagios -d @sysconfdir@/nagios.cfg
|
||||
ExecStop=@BIN_KILL@ -s TERM ${MAINPID}
|
||||
-ExecStopPost=@BIN_RM@ -f @localstatedir@/rw/nagios.cmd
|
||||
+ExecStopPost=@BIN_RM@ -f @localstatedir@/spool/nagios/cmd/nagios.cmd
|
||||
ExecReload=@BIN_KILL@ -s HUP ${MAINPID}
|
||||
|
||||
[Install]
|
||||
diff -up ./t-tap/Makefile.in.fix_localstatedir ./t-tap/Makefile.in
|
||||
--- ./t-tap/Makefile.in.fix_localstatedir 2019-01-16 14:24:14.944312569 -0600
|
||||
+++ ./t-tap/Makefile.in 2019-01-16 14:24:42.359858604 -0600
|
||||
@@ -42,7 +42,7 @@ LIBS=@LIBS@ ../lib/libnagios.a
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
-LOGDIR=@localstatedir@
|
||||
+LOGDIR=@localstatedir@/log/nagios/
|
||||
CFGDIR=@sysconfdir@
|
||||
BINDIR=@bindir@
|
||||
CGIDIR=@cgibindir@
|
||||
|
|
@ -1,166 +0,0 @@
|
|||
diff -up ./cgi/extinfo.c.rm_youtube ./cgi/extinfo.c
|
||||
--- ./cgi/extinfo.c.rm_youtube 2018-11-28 14:23:47.609805066 -0600
|
||||
+++ ./cgi/extinfo.c 2018-11-28 14:28:35.513997180 -0600
|
||||
@@ -557,27 +557,6 @@ void document_header(int use_stylesheet)
|
||||
printf("<LINK REL='stylesheet' TYPE='text/css' HREF='%s%s'>\n", url_stylesheets_path, NAGFUNCS_CSS);
|
||||
}
|
||||
|
||||
- if (display_type == DISPLAY_HOST_INFO)
|
||||
- vidurl = "https://www.youtube.com/embed/n3QEAf-MxY4";
|
||||
- else if(display_type == DISPLAY_SERVICE_INFO)
|
||||
- vidurl = "https://www.youtube.com/embed/f_knwQOS6FI";
|
||||
-
|
||||
- if (enable_page_tour == TRUE && vidurl) {
|
||||
- printf("<script type='text/javascript' src='%s%s'></script>\n", url_js_path, JQUERY_JS);
|
||||
- printf("<script type='text/javascript' src='%s%s'></script>\n", url_js_path, NAGFUNCS_JS);
|
||||
- printf("<script type='text/javascript'>\n");
|
||||
- printf("var vbox, vBoxId='extinfo%d', vboxText = "
|
||||
- "'<a href=https://www.nagios.com/tours target=_blank>"
|
||||
- "Click here to watch the entire Nagios Core 4 Tour!</a>';\n",
|
||||
- display_type);
|
||||
- printf("$(document).ready(function() {\n"
|
||||
- "var user = '%s';\nvBoxId += ';' + user;\n",
|
||||
- current_authdata.username);
|
||||
- printf("vbox = new vidbox({pos:'lr',vidurl:'%s',text:vboxText,"
|
||||
- "vidid:vBoxId});\n", vidurl);
|
||||
- printf("});\n</script>\n");
|
||||
- }
|
||||
-
|
||||
printf("</head>\n");
|
||||
|
||||
printf("<body CLASS='extinfo'>\n");
|
||||
diff -up ./cgi/status.c.rm_youtube ./cgi/status.c
|
||||
--- ./cgi/status.c.rm_youtube 2018-11-28 14:28:56.072653859 -0600
|
||||
+++ ./cgi/status.c 2018-11-28 14:32:05.038498204 -0600
|
||||
@@ -537,31 +537,8 @@ void document_header(int use_stylesheet)
|
||||
/* JS function to append content to elements on page */
|
||||
printf("<script type='text/javascript'>\n");
|
||||
if (enable_page_tour == TRUE) {
|
||||
- printf("var vbox, vBoxId='status%d%d', vboxText = "
|
||||
- "'<a href=https://www.nagios.com/tours target=_blank>"
|
||||
- "Click here to watch the entire Nagios Core 4 Tour!</a>';\n",
|
||||
- display_type, group_style_type);
|
||||
printf("$(document).ready(function() {\n"
|
||||
"$('#top_page_numbers').append($('#bottom_page_numbers').html() );\n");
|
||||
- if (display_type == DISPLAY_HOSTS)
|
||||
- vidurl = "https://www.youtube.com/embed/ahDIJcbSEFM";
|
||||
- else if(display_type == DISPLAY_SERVICEGROUPS) {
|
||||
- if (group_style_type == STYLE_HOST_DETAIL)
|
||||
- vidurl = "https://www.youtube.com/embed/nNiRr0hDZag";
|
||||
- else if (group_style_type == STYLE_OVERVIEW)
|
||||
- vidurl = "https://www.youtube.com/embed/MyvgTKLyQhA";
|
||||
- } else {
|
||||
- if (group_style_type == STYLE_OVERVIEW)
|
||||
- vidurl = "https://www.youtube.com/embed/jUDrjgEDb2A";
|
||||
- else if (group_style_type == STYLE_HOST_DETAIL)
|
||||
- vidurl = "https://www.youtube.com/embed/nNiRr0hDZag";
|
||||
- }
|
||||
- if (vidurl) {
|
||||
- printf("var user = '%s';\nvBoxId += ';' + user;",
|
||||
- current_authdata.username);
|
||||
- printf("vbox = new vidbox({pos:'lr',vidurl:'%s',text:vboxText,"
|
||||
- "vidid:vBoxId});\n", vidurl);
|
||||
- }
|
||||
printf("});\n");
|
||||
}
|
||||
printf("function set_limit(url) { \nthis.location = url+'&limit='+$('#limit').val();\n }\n");
|
||||
diff -up ./cgi/tac.c.rm_youtube ./cgi/tac.c
|
||||
--- ./cgi/tac.c.rm_youtube 2018-11-28 14:32:21.595221714 -0600
|
||||
+++ ./cgi/tac.c 2018-11-28 14:34:38.960927761 -0600
|
||||
@@ -308,17 +308,7 @@ void document_header(int use_stylesheet)
|
||||
|
||||
if (enable_page_tour == TRUE) {
|
||||
printf("<script type='text/javascript' src='%s%s'></script>\n", url_js_path, NAGFUNCS_JS);
|
||||
-
|
||||
- printf("<script type='text/javascript'>\nvar vbox, vBoxId='tac', "
|
||||
- "vboxText = '<a href=https://www.nagios.com/tours target=_blank>"
|
||||
- "Click here to watch the entire Nagios Core 4 Tour!</a>';\n");
|
||||
- printf("$(document).ready(function() {\n"
|
||||
- "var user = '%s';\nvBoxId += ';' + user;", current_authdata.username);
|
||||
- printf("vbox = new vidbox({pos:'lr',"
|
||||
- "vidurl:'https://www.youtube.com/embed/l20YRDhbOfA',text:vboxText,"
|
||||
- "vidid:vBoxId});");
|
||||
- printf("\n});\n</script>\n");
|
||||
- }
|
||||
+ }
|
||||
|
||||
|
||||
|
||||
diff -up ./html/main.php.rm_youtube ./html/main.php
|
||||
--- ./html/main.php.rm_youtube 2018-11-28 14:34:59.249588949 -0600
|
||||
+++ ./html/main.php 2018-11-28 14:39:03.703506666 -0600
|
||||
@@ -19,20 +19,7 @@ $this_year = '2018';
|
||||
|
||||
<script type='text/javascript'>
|
||||
var cookie;
|
||||
- <?php if ($cfg["enable_page_tour"]) { ?>
|
||||
- var vbox;
|
||||
- var vBoxId = "main";
|
||||
- var vboxText = "<a href=https://www.nagios.com/tours target=_blank> " +
|
||||
- "Click here to watch the entire Nagios Core 4 Tour!</a>";
|
||||
- <?php } ?>
|
||||
$(document).ready(function() {
|
||||
- var user = "<?php echo $_SERVER['REMOTE_USER']; ?>";
|
||||
-
|
||||
- <?php if ($cfg["enable_page_tour"]) { ?>
|
||||
- vBoxId += ";" + user;
|
||||
- vbox = new vidbox({pos:'lr',vidurl:'https://www.youtube.com/embed/2hVBAet-XpY',
|
||||
- text:vboxText,vidid:vBoxId});
|
||||
- <?php } ?>
|
||||
loadRemoteFeed( // Our top banner splash.
|
||||
'#splashbox0-contents', 'corebanner', 1,
|
||||
'', processBannerItem, ''
|
||||
@@ -59,7 +46,6 @@ $this_year = '2018';
|
||||
crossDomain: true,
|
||||
success: function(d, status, jqXHR) {
|
||||
// We should have Internet access, set the playlist HTML.
|
||||
- initializePlaylist();
|
||||
|
||||
var text = ''; // Start with empty text by default.
|
||||
|
||||
@@ -94,19 +80,6 @@ $this_year = '2018';
|
||||
: '';
|
||||
}
|
||||
|
||||
-
|
||||
- // Set our playlist HTML when we know we have Internet access.
|
||||
- var playlistInitialized = false;
|
||||
- function initializePlaylist() {
|
||||
- if (!playlistInitialized) {
|
||||
- playlistInitialized = true;
|
||||
- $('#splashbox3')
|
||||
- .addClass('splashbox3-full')
|
||||
- .removeClass('splashbox3-empty')
|
||||
- .html('<iframe width="100%" height="100%" src="//www.youtube.com/embed/videoseries?list=PLN-ryIrpC_mCUW1DFwZpxpAk00i60lSkE&iv_load_policy=3&rel=0" frameborder="0" allowfullscreen></iframe>');
|
||||
- }
|
||||
- }
|
||||
-
|
||||
// Get the daemon status JSON.
|
||||
function getCoreStatus() {
|
||||
setCoreStatusHTML('passiveonly', 'Checking process status...');
|
||||
diff -up ./html/map.php.rm_youtube ./html/map.php
|
||||
--- ./html/map.php.rm_youtube 2018-11-28 14:39:16.895286368 -0600
|
||||
+++ ./html/map.php 2018-11-28 14:40:05.311477837 -0600
|
||||
@@ -71,22 +71,6 @@
|
||||
<script type="text/javascript" src="js/jquery-1.12.4.min.js"></script>
|
||||
<script type="text/javascript" src="js/nag_funcs.js"></script>
|
||||
|
||||
- <?php if ($cfg["enable_page_tour"]) { ?>
|
||||
- <script type='text/javascript'>
|
||||
- var vbox;
|
||||
- var vBoxId = "map";
|
||||
- var vboxText = "<a href=https://www.nagios.com/tours target=_blank>" +
|
||||
- "Click here to watch the entire Nagios Core 4 Tour!</a>";
|
||||
- $(document).ready(function() {
|
||||
- var user = "<?php echo $_SERVER['REMOTE_USER']; ?>";
|
||||
-
|
||||
- vBoxId += ";" + user;
|
||||
- vbox = new vidbox({pos:'lr',vidurl:'https://www.youtube.com/embed/leaRdb3BElI',
|
||||
- text:vboxText,vidid:vBoxId});
|
||||
- });
|
||||
- </script>
|
||||
- <?php } ?>
|
||||
-
|
||||
</head>
|
||||
<body ng-controller="mapCtrl" <?php echo $img; ?>>
|
||||
<div id="image-cache" style="display: none;"></div>
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
diff -up ./contrib/Makefile.in.remove_rpmbuild ./contrib/Makefile.in
|
||||
--- ./contrib/Makefile.in.remove_rpmbuild 2019-01-16 15:00:18.627548108 -0600
|
||||
+++ ./contrib/Makefile.in 2019-01-16 15:00:38.756215308 -0600
|
||||
@@ -84,35 +84,3 @@ $(CGI_O): $(CGI_C)
|
||||
|
||||
%.cgi : %.c
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) $< $(CGI_O) -o $@
|
||||
-
|
||||
-##############################################################################
|
||||
-# rpm making automation for CentOS/RHEL.
|
||||
-
|
||||
-ARCH ?= $(shell uname -m)
|
||||
-ifeq ($(ARCH),x86_64)
|
||||
-RPM_ARCH := x86_64
|
||||
-else
|
||||
- ifeq ($(ARCH),i686)
|
||||
-RPM_ARCH := i386
|
||||
- else
|
||||
- ifeq ($(ARCH),aarch64)
|
||||
-RPM_ARCH := aarch64
|
||||
- else
|
||||
-$(error Unknown arch "$(ARCH)".)
|
||||
- endif
|
||||
- endif
|
||||
-endif
|
||||
-
|
||||
-rpm:
|
||||
- # create nagios tar ball.
|
||||
- @(cd ..;rm -f nagios-@VERSION@)
|
||||
- @(cd ..;ln -s . nagios-@VERSION@)
|
||||
- @(cd ..;tar zhcf nagios-@VERSION@.tar.gz --exclude nagios-@VERSION@/nagios-@VERSION@.tar.gz --exclude nagios-@VERSION@/nagios-@VERSION@ --exclude RCS --exclude CVS --exclude build-* --exclude *~ --exclude .git* nagios-@VERSION@/)
|
||||
- @(cd ..;rm -f nagios-@VERSION@)
|
||||
- # build the rpm using rpmbuild from ./rmbuild as topdir
|
||||
- @rm -rf rpmbuild && mkdir -p rpmbuild/SOURCES
|
||||
- @cp ../nagios-@VERSION@.tar.gz rpmbuild/SOURCES/nagios-@VERSION@.tar.gz
|
||||
- @rpmbuild -ba --define "_topdir ${PWD}/rpmbuild" ../nagios.spec
|
||||
- @mv rpmbuild/RPMS/$(RPM_ARCH)/*.rpm .
|
||||
- @ls -l *.rpm
|
||||
-
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
diff -up ./contrib/eventhandlers/disable_active_service_checks.fix_spool ./contrib/eventhandlers/disable_active_service_checks
|
||||
--- ./contrib/eventhandlers/disable_active_service_checks.fix_spool 2017-08-24 17:43:48.000000000 -0400
|
||||
+++ ./contrib/eventhandlers/disable_active_service_checks 2017-09-19 15:21:28.173643069 -0400
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
printfcmd="/usr/bin/printf"
|
||||
|
||||
-CommandFile="/usr/local/nagios/var/rw/nagios.cmd"
|
||||
+CommandFile="/var/spool/nagios/"
|
||||
|
||||
# get the current date/time in seconds since UNIX epoch
|
||||
datetime=`date +%s`
|
||||
diff -up ./contrib/eventhandlers/disable_notifications.fix_spool ./contrib/eventhandlers/disable_notifications
|
||||
--- ./contrib/eventhandlers/disable_notifications.fix_spool 2017-08-24 17:43:48.000000000 -0400
|
||||
+++ ./contrib/eventhandlers/disable_notifications 2017-09-19 15:21:28.198643530 -0400
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
printfcmd="/usr/bin/printf"
|
||||
|
||||
-CommandFile="/usr/local/nagios/var/rw/nagios.cmd"
|
||||
+CommandFile="/var/spool/nagios/"
|
||||
|
||||
# get the current date/time in seconds since UNIX epoch
|
||||
datetime=`date +%s`
|
||||
diff -up ./contrib/eventhandlers/enable_active_service_checks.fix_spool ./contrib/eventhandlers/enable_active_service_checks
|
||||
--- ./contrib/eventhandlers/enable_active_service_checks.fix_spool 2017-08-24 17:43:48.000000000 -0400
|
||||
+++ ./contrib/eventhandlers/enable_active_service_checks 2017-09-19 15:21:28.199643549 -0400
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
printfcmd="/usr/bin/printf"
|
||||
|
||||
-CommandFile="/usr/local/nagios/var/rw/nagios.cmd"
|
||||
+CommandFile="/var/spool/nagios/"
|
||||
|
||||
# get the current date/time in seconds since UNIX epoch
|
||||
datetime=`date +%s`
|
||||
diff -up ./contrib/eventhandlers/submit_check_result.fix_spool ./contrib/eventhandlers/submit_check_result
|
||||
--- ./contrib/eventhandlers/submit_check_result.fix_spool 2017-08-24 17:43:48.000000000 -0400
|
||||
+++ ./contrib/eventhandlers/submit_check_result 2017-09-19 15:21:28.200643567 -0400
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
echocmd="/bin/echo"
|
||||
|
||||
-CommandFile="/usr/local/nagios/var/rw/nagios.cmd"
|
||||
+CommandFile="/var/spool/nagios/"
|
||||
|
||||
# get the current date/time in seconds since UNIX epoch
|
||||
datetime=`date +%s`
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
diff -up ./contrib/eventhandlers/distributed-monitoring/obsessive_svc_handler.fix_plugin ./contrib/eventhandlers/distributed-monitoring/obsessive_svc_handler
|
||||
--- ./contrib/eventhandlers/distributed-monitoring/obsessive_svc_handler.fix_plugin 2017-08-24 17:43:48.000000000 -0400
|
||||
+++ ./contrib/eventhandlers/distributed-monitoring/obsessive_svc_handler 2017-09-19 15:21:28.201643586 -0400
|
||||
@@ -21,7 +21,7 @@
|
||||
#
|
||||
|
||||
# Location of the submit_check_result_via_nsca script
|
||||
-SubmitCmd="/usr/local/nagios/libexec/eventhandlers/submit_check_result_via_nsca"
|
||||
+SubmitCmd="/usr/lib64/nagios/plugins/eventhandlers/submit_check_result_via_nsca"
|
||||
|
||||
# Convert the state string to the corresponding return code
|
||||
return_code=-1
|
||||
diff -up ./contrib/eventhandlers/redundancy-scenario1/handle-master-host-event.fix_plugin ./contrib/eventhandlers/redundancy-scenario1/handle-master-host-event
|
||||
--- ./contrib/eventhandlers/redundancy-scenario1/handle-master-host-event.fix_plugin 2017-08-24 17:43:48.000000000 -0400
|
||||
+++ ./contrib/eventhandlers/redundancy-scenario1/handle-master-host-event 2017-09-19 15:21:28.202643604 -0400
|
||||
@@ -13,7 +13,7 @@ echocmd="/bin/echo"
|
||||
mailcmd="/bin/mail"
|
||||
|
||||
# Location of the event handlers
|
||||
-eventhandlerdir="/usr/local/nagios/libexec/eventhandlers"
|
||||
+eventhandlerdir="/usr/lib64/nagios/plugins/eventhandlers"
|
||||
|
||||
|
||||
# Only take action on hard host states...
|
||||
diff -up ./contrib/eventhandlers/redundancy-scenario1/handle-master-proc-event.fix_plugin ./contrib/eventhandlers/redundancy-scenario1/handle-master-proc-event
|
||||
--- ./contrib/eventhandlers/redundancy-scenario1/handle-master-proc-event.fix_plugin 2017-08-24 17:43:48.000000000 -0400
|
||||
+++ ./contrib/eventhandlers/redundancy-scenario1/handle-master-proc-event 2017-09-19 15:21:28.203643623 -0400
|
||||
@@ -13,7 +13,7 @@ echocmd="/bin/echo"
|
||||
mailcmd="/bin/mail"
|
||||
|
||||
# Location of the event handlers
|
||||
-eventhandlerdir="/usr/local/nagios/libexec/eventhandlers"
|
||||
+eventhandlerdir="/usr/lib64/nagios/plugins/eventhandlers"
|
||||
|
||||
|
||||
# Only take action on hard service states...
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
diff -up ./startup/default-service.in.fix_uidgid ./startup/default-service.in
|
||||
--- ./startup/default-service.in.fix_uidgid 2019-02-22 11:57:38.432525592 -0500
|
||||
+++ ./startup/default-service.in 2019-02-22 11:58:03.823003073 -0500
|
||||
@@ -5,6 +5,8 @@ After=network.target local-fs.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
+User=nagios
|
||||
+Group=nagios
|
||||
ExecStartPre=@bindir@/nagios -v @sysconfdir@/nagios.cfg
|
||||
ExecStart=@bindir@/nagios -d @sysconfdir@/nagios.cfg
|
||||
ExecStop=@BIN_KILL@ -s TERM ${MAINPID}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
module nagios-socket 1.1;
|
||||
|
||||
require {
|
||||
type nagios_t;
|
||||
type nagios_spool_t;
|
||||
class sock_file { write create unlink };
|
||||
class unix_stream_socket connectto;
|
||||
}
|
||||
|
||||
|
||||
#============= nagios_t ==============
|
||||
|
||||
#!!!! This avc is allowed in the current policy
|
||||
allow nagios_t nagios_spool_t:sock_file { write create unlink };
|
||||
#!!!! This avc can be allowed using the boolean 'daemons_enable_cluster_mode'
|
||||
allow nagios_t self:unix_stream_socket connectto;
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
================
|
||||
Nagios and SELinux
|
||||
================
|
||||
|
||||
While there is an Nagios policy in the default Selinux policies, it does
|
||||
not meet the needs of the current Nagios software. In working with the
|
||||
SELinux security group, there is now a need for non-core packages to
|
||||
carry their own policy in a spec file.
|
||||
|
||||
Following the steps in
|
||||
https://fedoraproject.org/wiki/SELinux/IndependentPolicy we are adding
|
||||
the needed subpackage and files.
|
||||
|
||||
This policy DOES NOT REPLACE THE CORE POLICY in the selinux-policies
|
||||
package. This is only a supplement that the nrpe package needs due to
|
||||
changes from the older base policy.
|
||||
|
||||
Please report bugs as needed and we will try to get them fixed as soon
|
||||
as possible.
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
ScriptAlias /nagios/cgi-bin/ /usr/lib/nagios/cgi-bin/
|
||||
<Directory /usr/lib/nagios/cgi-bin/>
|
||||
Options ExecCGI
|
||||
order deny,allow
|
||||
deny from all
|
||||
allow from 127.0.0.1
|
||||
AuthType Basic
|
||||
AuthUserFile /etc/nagios/passwd
|
||||
AuthName "nagios"
|
||||
require valid-user
|
||||
</Directory>
|
||||
|
||||
Alias /nagios/ /usr/share/nagios/html/
|
||||
<Directory /usr/share/nagios/html/>
|
||||
Options None
|
||||
order deny,allow
|
||||
deny from all
|
||||
allow from 127.0.0.1
|
||||
AuthType Basic
|
||||
AuthUserFile /etc/nagios/passwd
|
||||
AuthName "nagios"
|
||||
require valid-user
|
||||
</Directory>
|
||||
|
||||
# For SSL-servers
|
||||
#<Directory /usr/lib/nagios/cgi-bin/>
|
||||
# Options ExecCGI
|
||||
# SSLRequireSSL
|
||||
# order deny,allow
|
||||
# deny from all
|
||||
# allow from 127.0.0.1
|
||||
# AuthType Basic
|
||||
# AuthUserFile /etc/nagios/passwd
|
||||
# AuthName "nagios"
|
||||
# require valid-user
|
||||
#</Directory>
|
||||
#
|
||||
#Alias /nagios/ /usr/share/nagios/html/
|
||||
#<Directory /usr/share/nagios/html/>
|
||||
# Options None
|
||||
# SSLRequireSSL
|
||||
# order deny,allow
|
||||
# deny from all
|
||||
# allow from 127.0.0.1
|
||||
# AuthType Basic
|
||||
# AuthUserFile /etc/nagios/passwd
|
||||
# AuthName "nagios"
|
||||
# require valid-user
|
||||
#</Directory>
|
||||
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
nagiosadmin:RbdO4ou4PNyMg
|
||||
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
##############################################################################
|
||||
# internet.cfg - sample config file for Fedoras Nagios
|
||||
#
|
||||
# 2008-07-03 created Robert M. Albrecht
|
||||
#
|
||||
# NOTES: This config file is a sample for monitoring some internet hosts.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
define host{
|
||||
name template-internet-host
|
||||
use generic-host
|
||||
register 0
|
||||
max_check_attempts 5
|
||||
contacts nagiosadmin
|
||||
parents localhost
|
||||
|
||||
}
|
||||
|
||||
define host{
|
||||
use template-internet-host
|
||||
host_name Google
|
||||
address www.google.com
|
||||
notes Googles Website defined by sample config
|
||||
notes_url http://www.google.com
|
||||
action_url http://en.wikipedia.org/wiki/Google
|
||||
}
|
||||
|
||||
define hostgroup{
|
||||
hostgroup_name InternetHosts
|
||||
alias Internet Hosts
|
||||
members Google
|
||||
}
|
||||
|
||||
define service{
|
||||
use generic-service
|
||||
hostgroup_name InternetHosts
|
||||
service_description PING
|
||||
check_command check_ping!200.0,20%!600.0,60%
|
||||
}
|
||||
|
||||
define service{
|
||||
use generic-service
|
||||
hostgroup_name InternetHosts
|
||||
service_description HTTP
|
||||
check_command check_http
|
||||
}
|
||||
|
||||
define servicegroup{
|
||||
servicegroup_name WebSites
|
||||
alias Internet Hosts
|
||||
members Google,PING,Google,HTTP
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
# Important! Nagios rotates its own logs. Only enable this logrotate if you
|
||||
# know what you are doing!
|
||||
|
||||
# For more information please see "log_rotate_method" in:
|
||||
# /etc/nagios/nagios.cfg
|
||||
|
||||
# ----- logrotate config -------------
|
||||
#/var/log/nagios/*.log {
|
||||
# missingok
|
||||
# weekly
|
||||
# notifempty
|
||||
# nocompress
|
||||
# create 644 nagios nagios
|
||||
#}
|
||||
|
||||
1161
nagios.spec
1161
nagios.spec
File diff suppressed because it is too large
Load diff
|
|
@ -1 +0,0 @@
|
|||
D /var/run/nagios 0755 nagios nagios -
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
Nagios v4 Upgrade Considerations
|
||||
================================
|
||||
|
||||
This applies if you are upgrading from Nagios v2 or v3.
|
||||
|
||||
The Nagios v2 or v3 nagios.cfg is will not pass a Nagios v4 syntax check without modification. Also note that Nagios Core v4 has more strict host/service definition requirements.
|
||||
The following attributes from Nagios v2 or v3 are incompatible with Nagios v4 and will generate an error.
|
||||
|
||||
use_embedded_perl_implicitly
|
||||
sleep_time
|
||||
p1_file
|
||||
external_command_buffer_slots
|
||||
enable_embedded_perl
|
||||
command_check_interval
|
||||
|
||||
In order to force a Nagios v2 or v3 nagios.cfg file to run with Nagios v4 simply commment out these nagios.cfg lines.
|
||||
|
||||
The included script UpgradeToVersion4.sh will do this automatically for the file
|
||||
/etc/nagios/nagios.cfg (the standard location for the nagios.cfg file)
|
||||
|
||||
This is a work-around and you should consider implementing the new nagios.cfg file.
|
||||
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
#!/bin/sh
|
||||
# this script checks the nagios.cfg file and comments out several lines in accordance with the README.
|
||||
# You will want to migrate to the Nagios v4 nagios.cfg file as soon as possible to take advantage of new features.
|
||||
|
||||
|
||||
# this is the nagios.cfg file we will modify
|
||||
nagios_cfg=/etc/nagios/nagios.cfg
|
||||
|
||||
tmp1=`mktemp /tmp/nagios.cfg.XXXXXXXX`
|
||||
cat $nagios_cfg > $tmp1
|
||||
|
||||
# search for and replace the check_result_buffer_slots attribute into a temporary file
|
||||
sed -i --regexp-extended -e "s/^(\s*check_result_buffer_slots\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g" \
|
||||
-e 's/^(\s*use_embedded_perl_implicitly\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
|
||||
-e 's/^(\s*sleep_time\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
|
||||
-e 's/^(\s*p1_file\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
|
||||
-e 's/^(\s*external_command_buffer_slots\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
|
||||
-e 's/^(\s*enable_embedded_perl\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
|
||||
-e 's/^(\s*command_check_interval\s*=\s*)/# Line Commented out for Nagios v4 Compatibility\n#\1/g' \
|
||||
-e 's|^(\s*#?query_socket\s*=\s*/var/log/nagios/rw/nagios.qh)|query_socket=/var/spool/nagios/cmd/nagios.qh|' $tmp1
|
||||
|
||||
# add query_socket if none exist
|
||||
grep -q -F 'query_socket' $tmp1 || echo 'query_socket=/var/spool/nagios/cmd/nagios.qh' >> $tmp1
|
||||
|
||||
# check the diff
|
||||
diff_output=`diff -u $nagios_cfg $tmp1`
|
||||
diff_exit=$?
|
||||
|
||||
# Decide whether or not to replace the file
|
||||
if [ "$diff_exit" = "0" ]; then
|
||||
echo "No changes were made to the Nagios Config file: $nagios_cfg"
|
||||
elif [ "$diff_exit" = "1" ]; then
|
||||
echo "The following changes were made to the Nagios Config file: $nagios_cfg"
|
||||
echo "previous config has been saved to $nagios_cfg.oldrpm"
|
||||
echo "$diff_output"
|
||||
|
||||
# since changes were made, move the temp file into place
|
||||
cp $nagios_cfg $nagios_cfg.oldrpm
|
||||
cat $tmp1 > $nagios_cfg
|
||||
else
|
||||
echo "ERROR: Unexpected exit code from diff. No changes made to file: $nagios_cfg"
|
||||
fi
|
||||
|
||||
rm -f $tmp1
|
||||
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
module nagios_epel 1.1;
|
||||
|
||||
require {
|
||||
type devlog_t;
|
||||
type hostname_exec_t;
|
||||
type kernel_t;
|
||||
type ldconfig_exec_t;
|
||||
type initrc_tmp_t;
|
||||
type nagios_exec_t;
|
||||
type httpd_nagios_script_t;
|
||||
type nagios_services_plugin_t;
|
||||
type nagios_spool_t;
|
||||
type nagios_system_plugin_t;
|
||||
type nagios_t;
|
||||
class capability chown;
|
||||
class file { execute execute_no_trans getattr open read };
|
||||
class sock_file { write create unlink };
|
||||
class unix_dgram_socket { connect create sendto };
|
||||
class unix_stream_socket connectto;
|
||||
}
|
||||
|
||||
#============= nagios_services_plugin_t ==============
|
||||
allow nagios_services_plugin_t devlog_t:sock_file write;
|
||||
allow nagios_services_plugin_t kernel_t:unix_dgram_socket sendto;
|
||||
allow nagios_services_plugin_t self:unix_dgram_socket { connect create };
|
||||
|
||||
#============= nagios_t ==============
|
||||
allow nagios_t hostname_exec_t:file { read getattr open execute execute_no_trans };
|
||||
allow nagios_t ldconfig_exec_t:file { execute execute_no_trans open read };
|
||||
allow nagios_t nagios_exec_t:file execute_no_trans;
|
||||
allow nagios_t nagios_spool_t:sock_file { write create unlink };
|
||||
allow nagios_t self:capability chown;
|
||||
allow nagios_t self:unix_stream_socket connectto;
|
||||
|
||||
#============= httpd_nagios_script_t ==============
|
||||
allow httpd_nagios_script_t nagios_spool_t:file { getattr open read };
|
||||
|
||||
#============= nagios_system_plugin_t ==============
|
||||
allow nagios_system_plugin_t nagios_spool_t:file { getattr open read };
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
module nagios_epel 1.1;
|
||||
|
||||
require {
|
||||
type devlog_t;
|
||||
type hostname_exec_t;
|
||||
type kernel_t;
|
||||
type ldconfig_exec_t;
|
||||
type initrc_tmp_t;
|
||||
type nagios_exec_t;
|
||||
type nagios_script_t;
|
||||
type nagios_services_plugin_t;
|
||||
type nagios_spool_t;
|
||||
type nagios_system_plugin_t;
|
||||
type nagios_t;
|
||||
class capability chown;
|
||||
class file { execute execute_no_trans getattr open read };
|
||||
class sock_file { write create unlink };
|
||||
class unix_dgram_socket { connect create sendto };
|
||||
class unix_stream_socket connectto;
|
||||
}
|
||||
|
||||
#============= nagios_services_plugin_t ==============
|
||||
allow nagios_services_plugin_t devlog_t:sock_file write;
|
||||
allow nagios_services_plugin_t kernel_t:unix_dgram_socket sendto;
|
||||
allow nagios_services_plugin_t self:unix_dgram_socket { connect create };
|
||||
|
||||
#============= nagios_t ==============
|
||||
allow nagios_t hostname_exec_t:file { read getattr open execute execute_no_trans };
|
||||
allow nagios_t ldconfig_exec_t:file { execute execute_no_trans open read };
|
||||
allow nagios_t nagios_exec_t:file execute_no_trans;
|
||||
allow nagios_t nagios_spool_t:sock_file { write create unlink };
|
||||
allow nagios_t self:capability chown;
|
||||
allow nagios_t self:unix_stream_socket connectto;
|
||||
|
||||
#============= nagios_script_t ==============
|
||||
allow nagios_script_t nagios_spool_t:file { getattr open read };
|
||||
|
||||
#============= nagios_system_plugin_t ==============
|
||||
allow nagios_system_plugin_t nagios_spool_t:file { getattr open read };
|
||||
BIN
printer.png
BIN
printer.png
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 KiB |
BIN
router.png
BIN
router.png
Binary file not shown.
|
Before Width: | Height: | Size: 2 KiB |
1
sources
1
sources
|
|
@ -1 +0,0 @@
|
|||
SHA512 (nagioscore-nagios-4.4.3.tar.gz) = 40933521eb76952ec31fc082f040f0863e45c30e8b53a257f3c7bacc7940fd1717955f3bf91b70c847725f9658751af72189d52e7d82f605d90446c0decd0246
|
||||
BIN
switch.png
BIN
switch.png
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB |
Loading…
Add table
Add a link
Reference in a new issue