Author: Lars Michelsen <[email protected]>
Date: Wed Jan 8 15:13:23 2014 +0100
Committer: Lars Michelsen <[email protected]>
Commit-Date: Wed Jan 8 15:13:23 2014 +0100
FIX: Fixed PHP errors when acknowleding host/service problems
---
.f12 | 4 ++--
ChangeLog | 6 ++++++
install.sh | 1 +
share/server/core/classes/CoreModAction.php | 20 +++++++++++---------
share/server/core/classes/NagVisViewAck.php | 12 +++++++-----
5 files changed, 27 insertions(+), 16 deletions(-)
diff --git a/.f12 b/.f12
index 3c9b353..43b86d5 100755
--- a/.f12
+++ b/.f12
@@ -11,9 +11,9 @@ $SUDO ./install.sh -a y -q -r -F -c y \
-W /nagvis -n /usr/local/nagios \
-i mklivestatus -p /usr/local/nagvis \
-u www-data -g www-data \
- -w /etc/apache2/conf.d \
+ -w /etc/apache2/conf-available \
-l unix:/omd/sites/muc/tmp/run/live
-$SUDO rm -f /etc/apache2/conf.d/nagvis.conf.*
+$SUDO rm -f /etc/apache2/conf-available/nagvis.conf.*
#
# Install to omd site local/
diff --git a/ChangeLog b/ChangeLog
index 91d9f93..c393c3a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,12 @@ Core:
* Processing Rotation/view/* permission when using Multisite authorisation
* FIX: Fixed PHP error when using status hosts in backends
* FIX: Encoding _origtarget URL parameter handed over to multisite now
+ * FIX: Fixed PHP errors when acknowleding host/service problems
+
+Installer:
+ * FIX: Installer uses /etc/apache2/conf-available instead of the old conf.d
+ directory for installing it's apache sample configuration. It is
+ currently not enabled by default. Use "a2enconf nagvis" to enable it.
1.8b1
Core:
diff --git a/install.sh b/install.sh
index 52ccf82..dc1aabb 100755
--- a/install.sh
+++ b/install.sh
@@ -567,6 +567,7 @@ check_apache_php() {
DIR=$1
[ ! -d $DIR ] && return
WEB_PATH=${DIR%%/}
+ [ -d $DIR/conf-available ]&&WEB_PATH=$WEB_PATH/conf-available
[ -d $DIR/conf.d ]&&WEB_PATH=$WEB_PATH/conf.d
# The apache user/group are defined by env vars in Ubuntu, set them here
diff --git a/share/server/core/classes/CoreModAction.php
b/share/server/core/classes/CoreModAction.php
index 90af74e..1b83dd9 100644
--- a/share/server/core/classes/CoreModAction.php
+++ b/share/server/core/classes/CoreModAction.php
@@ -146,15 +146,17 @@ class CoreModAction extends CoreModule {
// Now send the acknowledgement
global $_BACKEND, $AUTH;
- $backendId = $this->MAPCFG->getValue($attrs['object_id'],
'backend_id');
- $BACKEND = $_BACKEND->getBackend($backendId);
- $BACKEND->actionAcknowledge(
- $type, $spec, $attrs['comment'],
- $attrs['sticky'] == '1',
- $attrs['notify'] == '1',
- $attrs['persist'] == '1',
- $AUTH->getUser()
- );
+ $backendIds = $this->MAPCFG->getValue($attrs['object_id'],
'backend_id');
+ foreach ($backendIds AS $backendId) {
+ $BACKEND = $_BACKEND->getBackend($backendId);
+ $BACKEND->actionAcknowledge(
+ $type, $spec, $attrs['comment'],
+ $attrs['sticky'] == '1',
+ $attrs['notify'] == '1',
+ $attrs['persist'] == '1',
+ $AUTH->getUser()
+ );
+ }
return l('The command has been sent to the monitoring core. Refreshing
in 2 seconds');
}
diff --git a/share/server/core/classes/NagVisViewAck.php
b/share/server/core/classes/NagVisViewAck.php
index 3e39ffe..8ed766a 100644
--- a/share/server/core/classes/NagVisViewAck.php
+++ b/share/server/core/classes/NagVisViewAck.php
@@ -37,11 +37,13 @@ class NagVisViewAck {
$s = '';
global $_BACKEND;
- $backendId = $this->MAPCFG->getValue($attrs['object_id'],
'backend_id');
- if(!$_BACKEND->checkBackendFeature($backendId, 'actionAcknowledge',
false)) {
- return '<div class=err>'
- .l('The requested feature is not available for this backend. The
MKLivestatus backend supports this feature.')
- .'</div>';
+ $backendIds = $this->MAPCFG->getValue($attrs['object_id'],
'backend_id');
+ foreach ($backendIds AS $backendId) {
+ if(!$_BACKEND->checkBackendFeature($backendId,
'actionAcknowledge', false)) {
+ return '<div class=err>'
+ .l('The requested feature is not available for this backend.
The MKLivestatus backend supports this feature.')
+ .'</div>';
+ }
}
if($err)
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins