ALT Linux repos
Group :: Monitoring
RPM: nagios
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: nagios-2.0b1-alt-scripts.patch
Download
Download
diff -ruN nagios-2.0b1.orig/contrib/eventhandlers/disable_active_service_checks nagios-2.0b1/contrib/eventhandlers/disable_active_service_checks
--- nagios-2.0b1.orig/contrib/eventhandlers/disable_active_service_checks 2002-02-26 14:03:37 +1000
+++ nagios-2.0b1/contrib/eventhandlers/disable_active_service_checks 2005-01-08 00:52:00 +1000
@@ -16,7 +16,7 @@
echocmd="/bin/echo"
-CommandFile="/usr/local/nagios/var/rw/nagios.cmd"
+CommandFile="/var/lib/nagios/rw/nagios.cmd"
# get the current date/time in seconds since UNIX epoch
datetime=`date +%s`
diff -ruN nagios-2.0b1.orig/contrib/eventhandlers/disable_notifications nagios-2.0b1/contrib/eventhandlers/disable_notifications
--- nagios-2.0b1.orig/contrib/eventhandlers/disable_notifications 2002-02-26 14:03:37 +1000
+++ nagios-2.0b1/contrib/eventhandlers/disable_notifications 2005-01-08 00:52:00 +1000
@@ -14,7 +14,7 @@
echocmd="/bin/echo"
-CommandFile="/usr/local/nagios/var/rw/nagios.cmd"
+CommandFile="/var/lib/nagios/rw/nagios.cmd"
# get the current date/time in seconds since UNIX epoch
datetime=`date +%s`
diff -ruN nagios-2.0b1.orig/contrib/eventhandlers/distributed-monitoring/obsessive_svc_handler nagios-2.0b1/contrib/eventhandlers/distributed-monitoring/obsessive_svc_handler
--- nagios-2.0b1.orig/contrib/eventhandlers/distributed-monitoring/obsessive_svc_handler 2002-02-26 14:03:37 +1000
+++ nagios-2.0b1/contrib/eventhandlers/distributed-monitoring/obsessive_svc_handler 2005-01-08 00:52:00 +1000
@@ -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/lib/nagios/eventhandlers/submit_check_result_via_nsca"
# Convert the state string to the corresponding return code
return_code=-1
diff -ruN nagios-2.0b1.orig/contrib/eventhandlers/distributed-monitoring/submit_check_result_via_nsca nagios-2.0b1/contrib/eventhandlers/distributed-monitoring/submit_check_result_via_nsca
--- nagios-2.0b1.orig/contrib/eventhandlers/distributed-monitoring/submit_check_result_via_nsca 2004-02-20 14:37:01 +1000
+++ nagios-2.0b1/contrib/eventhandlers/distributed-monitoring/submit_check_result_via_nsca 2005-01-08 00:52:16 +1000
@@ -26,10 +26,10 @@
# IP address of the central server that has the nsca
# daemon running.
-printfcmd="/bin/printf"
+printfcmd="/usr/bin/printf"
-NscaBin="/usr/local/nagios/libexec/send_nsca"
-NscaCfg="/usr/local/nagios/etc/send_nsca.cfg"
+NscaBin="/usr/bin/send_nsca"
+NscaCfg="/etc/send_nsca.cfg"
NagiosHost="nagioshost"
# Fire the data off to the NSCA daemon using the send_nsca script
diff -ruN nagios-2.0b1.orig/contrib/eventhandlers/enable_active_service_checks nagios-2.0b1/contrib/eventhandlers/enable_active_service_checks
--- nagios-2.0b1.orig/contrib/eventhandlers/enable_active_service_checks 2002-02-26 14:03:37 +1000
+++ nagios-2.0b1/contrib/eventhandlers/enable_active_service_checks 2005-01-08 00:52:00 +1000
@@ -16,7 +16,7 @@
echocmd="/bin/echo"
-CommandFile="/usr/local/nagios/var/rw/nagios.cmd"
+CommandFile="/var/lib/nagios/rw/nagios.cmd"
# get the current date/time in seconds since UNIX epoch
datetime=`date +%s`
diff -ruN nagios-2.0b1.orig/contrib/eventhandlers/enable_notifications nagios-2.0b1/contrib/eventhandlers/enable_notifications
--- nagios-2.0b1.orig/contrib/eventhandlers/enable_notifications 2002-02-26 14:03:37 +1000
+++ nagios-2.0b1/contrib/eventhandlers/enable_notifications 2005-01-08 00:52:00 +1000
@@ -14,7 +14,7 @@
echocmd="/bin/echo"
-CommandFile="/usr/local/nagios/var/rw/nagios.cmd"
+CommandFile="/var/lib/nagios/rw/nagios.cmd"
# get the current date/time in seconds since UNIX epoch
datetime=`date +%s`
diff -ruN nagios-2.0b1.orig/contrib/eventhandlers/redundancy-scenario1/handle-master-host-event nagios-2.0b1/contrib/eventhandlers/redundancy-scenario1/handle-master-host-event
--- nagios-2.0b1.orig/contrib/eventhandlers/redundancy-scenario1/handle-master-host-event 2004-02-20 14:37:01 +1000
+++ nagios-2.0b1/contrib/eventhandlers/redundancy-scenario1/handle-master-host-event 2005-01-08 00:52:00 +1000
@@ -13,7 +13,7 @@
mailcmd="/bin/mail"
# Location of the event handlers
-eventhandlerdir="/usr/local/nagios/libexec/eventhandlers"
+eventhandlerdir="/usr/lib/nagios/eventhandlers"
# Only take action on hard host states...
diff -ruN nagios-2.0b1.orig/contrib/eventhandlers/redundancy-scenario1/handle-master-proc-event nagios-2.0b1/contrib/eventhandlers/redundancy-scenario1/handle-master-proc-event
--- nagios-2.0b1.orig/contrib/eventhandlers/redundancy-scenario1/handle-master-proc-event 2002-02-26 14:03:37 +1000
+++ nagios-2.0b1/contrib/eventhandlers/redundancy-scenario1/handle-master-proc-event 2005-01-08 00:52:00 +1000
@@ -13,7 +13,7 @@
mailcmd="/bin/mail"
# Location of the event handlers
-eventhandlerdir="/usr/local/nagios/libexec/eventhandlers"
+eventhandlerdir="/usr/lib/nagios/eventhandlers"
# Only take action on hard service states...
@@ -31,8 +31,7 @@
`$eventhandlerdir/enable_active_service_checks`
;;
- WARNING)
- UNKNOWN)
+ WARNING|UNKNOWN)
# The master Nagios process may or may not
# be running.. We won't do anything here, but
@@ -47,7 +46,7 @@
# We should go back to being the slave host,
# so disable active checks
- `eventhandlerdir/disable_active_service_checks`
+ `$eventhandlerdir/disable_active_service_checks`
;;
esac
diff -ruN nagios-2.0b1.orig/contrib/eventhandlers/submit_check_result nagios-2.0b1/contrib/eventhandlers/submit_check_result
--- nagios-2.0b1.orig/contrib/eventhandlers/submit_check_result 2002-02-26 14:03:37 +1000
+++ nagios-2.0b1/contrib/eventhandlers/submit_check_result 2005-01-08 00:52:00 +1000
@@ -24,7 +24,7 @@
echocmd="/bin/echo"
-CommandFile="/usr/local/nagios/var/rw/nagios.cmd"
+CommandFile="/var/lib/nagios/rw/nagios.cmd"
# get the current date/time in seconds since UNIX epoch
datetime=`date +%s`
diff -ruN nagios-2.0b1.orig/contrib/traceroute.cgi nagios-2.0b1/contrib/traceroute.cgi
--- nagios-2.0b1.orig/contrib/traceroute.cgi 2004-10-30 05:03:41 +1100
+++ nagios-2.0b1/contrib/traceroute.cgi 2005-01-08 00:52:00 +1000
@@ -28,7 +28,7 @@
# Global Settings
#----------------
$| = 1;
-my($nagios) = "/usr/local/nagios";
+my($nagios) = "/etc/nagios";
my($urlbase) = "/nagios";
my($refresh) = 30;
my($self) = basename($0);
@@ -86,7 +86,7 @@
my($bla);
my($host);
my(@hostlist);
-open(HOSTS, "$nagios/etc/hosts.cfg");
+open(HOSTS, "$nagios/hosts.cfg");
@cfg = grep {!/#/ && /host_name/} <HOSTS>;
close(HOSTS);