aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-ce
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2017-09-19 22:12:00 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2017-09-26 23:49:38 +0200
commit50a29c569f8448a939877de1918ab3ff937366b8 (patch)
tree793a173461e17df5f3da0e01b1d54546972175c6 /server/sonar-ce
parente66b868ad008967f65428a4e5400225600e9413e (diff)
downloadsonarqube-50a29c569f8448a939877de1918ab3ff937366b8.tar.gz
sonarqube-50a29c569f8448a939877de1918ab3ff937366b8.zip
SONAR-9802 complete system info page
Diffstat (limited to 'server/sonar-ce')
-rw-r--r--server/sonar-ce/src/main/java/org/sonar/ce/CeQueueModule.java6
-rw-r--r--server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java14
-rw-r--r--server/sonar-ce/src/main/java/org/sonar/ce/monitoring/CeSystemInfoModule.java41
-rw-r--r--server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java2
4 files changed, 17 insertions, 46 deletions
diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/CeQueueModule.java b/server/sonar-ce/src/main/java/org/sonar/ce/CeQueueModule.java
index d8f37cd5e11..2811aa16c44 100644
--- a/server/sonar-ce/src/main/java/org/sonar/ce/CeQueueModule.java
+++ b/server/sonar-ce/src/main/java/org/sonar/ce/CeQueueModule.java
@@ -24,6 +24,8 @@ import org.sonar.ce.monitoring.CeTasksMBeanImpl;
import org.sonar.ce.queue.CeQueueInitializer;
import org.sonar.ce.queue.InternalCeQueueImpl;
import org.sonar.core.platform.Module;
+import org.sonar.process.systeminfo.JvmPropertiesSection;
+import org.sonar.process.systeminfo.JvmStateSection;
public class CeQueueModule extends Module {
@Override
@@ -35,7 +37,9 @@ public class CeQueueModule extends Module {
// queue monitoring
CEQueueStatusImpl.class,
CeTasksMBeanImpl.class,
-
+ new JvmStateSection("Compute Engine JVM State"),
+ new JvmPropertiesSection("Compute Engine JVM Properties"),
+
// init queue state and queue processing
CeQueueInitializer.class);
}
diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java b/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java
index 79f042caf3d..b62dca5b430 100644
--- a/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java
+++ b/server/sonar-ce/src/main/java/org/sonar/ce/container/ComputeEngineContainerImpl.java
@@ -49,7 +49,6 @@ import org.sonar.ce.StandaloneCeDistributedInformation;
import org.sonar.ce.cleaning.CeCleaningModule;
import org.sonar.ce.db.ReadOnlyPropertiesDao;
import org.sonar.ce.log.CeProcessLogging;
-import org.sonar.ce.monitoring.CeSystemInfoModule;
import org.sonar.ce.platform.ComputeEngineExtensionInstaller;
import org.sonar.ce.queue.CeQueueCleaner;
import org.sonar.ce.queue.PurgeCeActivities;
@@ -127,6 +126,9 @@ import org.sonar.server.platform.UrlSettings;
import org.sonar.server.platform.WebServerImpl;
import org.sonar.server.platform.db.migration.MigrationConfigurationModule;
import org.sonar.server.platform.db.migration.version.DatabaseVersion;
+import org.sonar.server.platform.monitoring.DatabaseSection;
+import org.sonar.server.platform.monitoring.cluster.ProcessInfoProvider;
+import org.sonar.server.platform.monitoring.cluster.LoggingSection;
import org.sonar.server.plugins.InstalledPluginReferentialFactory;
import org.sonar.server.plugins.ServerExtensionInstaller;
import org.sonar.server.plugins.privileged.PrivilegedPluginsBootstraper;
@@ -423,8 +425,14 @@ public class ComputeEngineContainerImpl implements ComputeEngineContainer {
if (props.valueAsBoolean(ProcessProperties.CLUSTER_ENABLED)) {
container.add(
StartableHazelcastMember.class,
- CeDistributedInformationImpl.class);
- container.add(CeSystemInfoModule.forClusterMode());
+
+ // system health
+ CeDistributedInformationImpl.class,
+
+ // system info
+ DatabaseSection.class,
+ ProcessInfoProvider.class,
+ LoggingSection.class);
} else {
container.add(StandaloneCeDistributedInformation.class);
}
diff --git a/server/sonar-ce/src/main/java/org/sonar/ce/monitoring/CeSystemInfoModule.java b/server/sonar-ce/src/main/java/org/sonar/ce/monitoring/CeSystemInfoModule.java
deleted file mode 100644
index be53383ebee..00000000000
--- a/server/sonar-ce/src/main/java/org/sonar/ce/monitoring/CeSystemInfoModule.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2017 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.sonar.ce.monitoring;
-
-import org.sonar.process.systeminfo.JvmPropertiesSection;
-import org.sonar.process.systeminfo.JvmStateSection;
-import org.sonar.server.platform.monitoring.DatabaseSection;
-import org.sonar.server.platform.monitoring.cluster.ProcessInfoProvider;
-
-public class CeSystemInfoModule {
-
- private CeSystemInfoModule() {
- // do not instantiate
- }
-
- public static Object[] forClusterMode() {
- return new Object[] {
- new JvmPropertiesSection("Compute Engine JVM Properties"),
- new JvmStateSection("Compute Engine JVM State"),
- DatabaseSection.class,
- ProcessInfoProvider.class
- };
- }
-}
diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
index 640b8e76c43..4cf1cac4434 100644
--- a/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
+++ b/server/sonar-ce/src/test/java/org/sonar/ce/container/ComputeEngineContainerImplTest.java
@@ -131,7 +131,7 @@ public class ComputeEngineContainerImplTest {
CONTAINER_ITSELF
+ 73 // level 4
+ 4 // content of CeConfigurationModule
- + 4 // content of CeQueueModule
+ + 6 // content of CeQueueModule
+ 4 // content of CeHttpModule
+ 3 // content of CeTaskCommonsModule
+ 4 // content of ProjectAnalysisTaskModule