Репозитории ALT
S: | 3.0.6-alt16 |
5.1: | 3.0.6-alt1 |
4.1: | 3.0.3-alt1.M41.1 |
4.0: | 2.7-alt1 |
3.0: | 2.0-alt0.b3.1 |
Группа :: Мониторинг
Пакет: nagios
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: nagios-3.0.2-alt-scripts.patch
Скачать
Скачать
--- nagios-3.0.2/contrib/eventhandlers/disable_active_service_checks.p3 2008-05-20 05:01:59 +1100
+++ nagios-3.0.2/contrib/eventhandlers/disable_active_service_checks 2008-05-27 10:17:36 +1100
@@ -14,13 +14,12 @@
# the check_external_commands option in the main
# configuration file.
-printfcmd="/bin/printf"
+printfcmd="/usr/bin/printf"
-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`
# pipe the command to the command file
`$printfcmd "[%i] STOP_EXECUTING_SERVICE_CHECKS\n" $datetime >> $CommandFile`
-
--- nagios-3.0.2/contrib/eventhandlers/disable_notifications.p3 2008-01-24 22:34:57 +1000
+++ nagios-3.0.2/contrib/eventhandlers/disable_notifications 2008-05-27 10:15:49 +1100
@@ -12,9 +12,9 @@
# the check_external_commands option in the main
# configuration file.
-printfcmd="/bin/printf"
+printfcmd="/usr/bin/printf"
-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`
--- nagios-3.0.2/contrib/eventhandlers/distributed-monitoring/obsessive_svc_handler.p3 2002-02-26 14:03:37 +1000
+++ nagios-3.0.2/contrib/eventhandlers/distributed-monitoring/obsessive_svc_handler 2008-05-27 10:15:49 +1100
@@ -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
--- nagios-3.0.2/contrib/eventhandlers/distributed-monitoring/submit_check_result_via_nsca.p3 2008-04-15 02:55:06 +1100
+++ nagios-3.0.2/contrib/eventhandlers/distributed-monitoring/submit_check_result_via_nsca 2008-05-27 10:19:11 +1100
@@ -26,14 +26,13 @@
# 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"
-NagiosHost="nagioshost"
+NscaBin="/usr/bin/send_nsca"
+NscaCfg="/etc/send_nsca.cfg"
+NagiosHost="localhost"
# Fire the data off to the NSCA daemon using the send_nsca script
$printfcmd "%s\t%s\t%s\t%s\n" "$1" "$2" "$3" "$4" | $NscaBin -H $NagiosHost -c $NscaCfg
# EOF
-
--- nagios-3.0.2/contrib/eventhandlers/enable_active_service_checks.p3 2008-05-20 05:01:59 +1100
+++ nagios-3.0.2/contrib/eventhandlers/enable_active_service_checks 2008-05-27 10:18:19 +1100
@@ -14,13 +14,12 @@
# the check_external_commands option in the main
# configuration file.
-printfcmd="/bin/printf"
+printfcmd="/usr/bin/printf"
-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`
# pipe the command to the command file
`$printfcmd "[%i] START_EXECUTING_SERVICE_CHECKS\n" $datetime >> $CommandFile`
-
--- nagios-3.0.2/contrib/eventhandlers/enable_notifications.p3 2008-01-24 22:34:57 +1000
+++ nagios-3.0.2/contrib/eventhandlers/enable_notifications 2008-05-27 10:15:49 +1100
@@ -12,15 +12,15 @@
# the check_external_commands option in the main
# configuration file.
-printfcmd="/bin/printf"
+printfcmd="/usr/bin/printf"
-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`
# pipe the command to the command file
-`printfcmd "[%i] ENABLE_NOTIFICATIONS;%i\n" $datetime $datetime >> $CommandFile`
+`$printfcmd "[%i] ENABLE_NOTIFICATIONS;%i\n" $datetime $datetime >> $CommandFile`
--- nagios-3.0.2/contrib/eventhandlers/redundancy-scenario1/handle-master-host-event.p3 2004-02-20 14:37:01 +1000
+++ nagios-3.0.2/contrib/eventhandlers/redundancy-scenario1/handle-master-host-event 2008-05-27 10:15:49 +1100
@@ -13,7 +13,7 @@ echocmd="/bin/echo"
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...
--- nagios-3.0.2/contrib/eventhandlers/redundancy-scenario1/handle-master-proc-event.p3 2006-05-31 03:38:01 +1100
+++ nagios-3.0.2/contrib/eventhandlers/redundancy-scenario1/handle-master-proc-event 2008-05-27 10:15:49 +1100
@@ -13,7 +13,7 @@ echocmd="/bin/echo"
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...
@@ -46,7 +46,7 @@ HARD)
# We should go back to being the slave host,
# so disable active checks
- `eventhandlerdir/disable_active_service_checks`
+ `$eventhandlerdir/disable_active_service_checks`
;;
esac
--- nagios-3.0.2/contrib/eventhandlers/submit_check_result.p3 2002-02-26 14:03:37 +1000
+++ nagios-3.0.2/contrib/eventhandlers/submit_check_result 2008-05-27 10:15:49 +1100
@@ -20,17 +20,17 @@
# 3=UNKNOWN).
# $4 = plugin_output (A text string that should be used
# as the plugin output for the service check)
-#
-
-echocmd="/bin/echo"
-
-CommandFile="/usr/local/nagios/var/rw/nagios.cmd"
-
+#
+
+printfcmd="/usr/bin/printf"
+
+CommandFile="/var/lib/nagios/rw/nagios.cmd"
+
# get the current date/time in seconds since UNIX epoch
datetime=`date +%s`
-
+
# create the command line to add to the command file
cmdline="[$datetime] PROCESS_SERVICE_CHECK_RESULT;$1;$2;$3;$4"
-
+
# append the command to the end of the command file
-`$echocmd $cmdline >> $CommandFile`
+`$printfcmd $cmdline >> $CommandFile`
--- nagios-3.0.2/contrib/traceroute.cgi.p3 2004-10-30 05:03:41 +1100
+++ nagios-3.0.2/contrib/traceroute.cgi 2008-05-27 10:15:49 +1100
@@ -28,7 +28,7 @@ use POSIX qw(strftime);
# 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($entry);
my($bla);
my($host);
my(@hostlist);
-open(HOSTS, "$nagios/etc/hosts.cfg");
+open(HOSTS, "$nagios/hosts.cfg");
@cfg = grep {!/#/ && /host_name/} <HOSTS>;
close(HOSTS);