diff options
Diffstat (limited to 'server/sonar-ce/src/main/java')
3 files changed, 16 insertions, 45 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 - }; - } -} |