You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ab...@apache.org on 2019/04/18 19:14:40 UTC

[lucene-solr] branch branch_8x updated: SOLR-12461: Upgrade Dropwizard Metrics to 4.0.5 release.

This is an automated email from the ASF dual-hosted git repository.

ab pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8x by this push:
     new 7fd49c3  SOLR-12461: Upgrade Dropwizard Metrics to 4.0.5 release.
7fd49c3 is described below

commit 7fd49c3228b6545dcefa6f0700123395ca7c3321
Author: Andrzej Bialecki <ab...@apache.org>
AuthorDate: Thu Apr 18 19:08:20 2019 +0200

    SOLR-12461: Upgrade Dropwizard Metrics to 4.0.5 release.
---
 lucene/ivy-versions.properties                     |   5 +-
 solr/CHANGES.txt                                   |   5 +
 solr/bin/solr.in.sh                                |   2 +-
 .../org/apache/solr/metrics/MetricSuppliers.java   |  16 ++-
 .../metrics/reporters/SolrGangliaReporter.java     | 135 ---------------------
 .../solr/metrics/reporters/SolrJmxReporter.java    |   3 +-
 .../metrics/reporters/jmx/JmxMetricsReporter.java  |   6 +-
 .../reporters/jmx/JmxObjectNameFactory.java        |   2 +-
 .../src/test-files/solr/solr-gangliareporter.xml   |  32 -----
 .../solr/handler/admin/MetricsHandlerTest.java     |   2 +-
 .../metrics/reporters/SolrGangliaReporterTest.java |  84 -------------
 solr/licenses/metrics-core-3.2.6.jar.sha1          |   1 -
 solr/licenses/metrics-core-4.0.5.jar.sha1          |   1 +
 solr/licenses/metrics-ganglia-3.2.6.jar.sha1       |   1 -
 solr/licenses/metrics-graphite-3.2.6.jar.sha1      |   1 -
 solr/licenses/metrics-graphite-4.0.5.jar.sha1      |   1 +
 solr/licenses/metrics-jetty9-3.2.6.jar.sha1        |   1 -
 solr/licenses/metrics-jetty9-4.0.5.jar.sha1        |   1 +
 solr/licenses/metrics-jmx-4.0.5.jar.sha1           |   1 +
 ...LICENSE-ASL.txt => metrics-jmx-LICENSE-ASL.txt} |   0
 ...s-ganglia-NOTICE.txt => metrics-jmx-NOTICE.txt} |   0
 solr/licenses/metrics-jvm-3.2.6.jar.sha1           |   1 -
 solr/licenses/metrics-jvm-4.0.5.jar.sha1           |   1 +
 solr/server/ivy.xml                                |   3 +-
 24 files changed, 34 insertions(+), 271 deletions(-)

diff --git a/lucene/ivy-versions.properties b/lucene/ivy-versions.properties
index e6179bb..d1994c2 100644
--- a/lucene/ivy-versions.properties
+++ b/lucene/ivy-versions.properties
@@ -58,13 +58,12 @@ com.sun.jersey.version = 1.19
 /commons-io/commons-io = 2.5
 /commons-logging/commons-logging = 1.1.3
 /de.l3s.boilerpipe/boilerpipe = 1.1.0
-/info.ganglia.gmetric4j/gmetric4j = 1.0.7
 
-io.dropwizard.metrics.version = 3.2.6
+io.dropwizard.metrics.version = 4.0.5
 /io.dropwizard.metrics/metrics-core = ${io.dropwizard.metrics.version}
-/io.dropwizard.metrics/metrics-ganglia = ${io.dropwizard.metrics.version}
 /io.dropwizard.metrics/metrics-graphite = ${io.dropwizard.metrics.version}
 /io.dropwizard.metrics/metrics-jetty9 = ${io.dropwizard.metrics.version}
+/io.dropwizard.metrics/metrics-jmx = ${io.dropwizard.metrics.version}
 /io.dropwizard.metrics/metrics-jvm = ${io.dropwizard.metrics.version}
 
 io.netty.netty-all.version = 4.0.52.Final
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 7c63403..e4af367 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -57,6 +57,9 @@ Upgrade Notes
   now Solr followed an obscure convention of updating only the first collection from the list, which usually was not what
   the user intended. This change explicitly rejects such update requests.
 
+* SolrGangliaReporter has been removed from Solr because support for Ganglia has been removed from Dropwizard Metrics 4
+  due to a transitive dependency on LGPL.
+
 
 New Features
 ----------------------
@@ -253,6 +256,8 @@ Other Changes
 
 * SOLR-13409: Disable HTML directory listings in admin interface to prevent possible security issues (Uwe Schindler)
 
+* SOLR-12461: Upgrade Dropwizard Metrics to 4.0.5 release. (ab)
+
 ==================  8.0.0 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
diff --git a/solr/bin/solr.in.sh b/solr/bin/solr.in.sh
index 453796f..b67f770 100644
--- a/solr/bin/solr.in.sh
+++ b/solr/bin/solr.in.sh
@@ -69,7 +69,7 @@
 # Set to true to activate the JMX RMI connector to allow remote JMX client applications
 # to monitor the JVM hosting Solr; set to "false" to disable that behavior
 # (false is recommended in production environments)
-#ENABLE_REMOTE_JMX_OPTS="false"
+ENABLE_REMOTE_JMX_OPTS="true"
 
 # The script will use SOLR_PORT+10000 for the RMI_PORT or you can set it here
 # RMI_PORT=18983
diff --git a/solr/core/src/java/org/apache/solr/metrics/MetricSuppliers.java b/solr/core/src/java/org/apache/solr/metrics/MetricSuppliers.java
index 9f0d121..e4f5b64 100644
--- a/solr/core/src/java/org/apache/solr/metrics/MetricSuppliers.java
+++ b/solr/core/src/java/org/apache/solr/metrics/MetricSuppliers.java
@@ -17,6 +17,8 @@
 package org.apache.solr.metrics;
 
 import java.lang.invoke.MethodHandles;
+import java.lang.management.ManagementFactory;
+import java.lang.management.ThreadMXBean;
 import java.util.concurrent.TimeUnit;
 
 import com.codahale.metrics.Clock;
@@ -58,7 +60,17 @@ public class MetricSuppliers {
     }
   }
 
-  private static final Clock CPU_CLOCK = new Clock.CpuTimeClock();
+  // back-compat implementation, no longer present in metrics-4
+  private static final class CpuTimeClock extends Clock {
+    private static final ThreadMXBean THREAD_MX_BEAN = ManagementFactory.getThreadMXBean();
+
+    @Override
+    public long getTick() {
+      return THREAD_MX_BEAN.getCurrentThreadCpuTime();
+    }
+  }
+
+  private static final Clock CPU_CLOCK = new CpuTimeClock();
   private static final Clock USER_CLOCK = new Clock.UserTimeClock();
 
   /** Clock type parameter. */
@@ -73,7 +85,7 @@ public class MetricSuppliers {
    * or initArgs:
    * <ul>
    *   <li>clock - (string) can be set to {@link #CLOCK_USER} for {@link com.codahale.metrics.Clock.UserTimeClock} or
-   *   {@link #CLOCK_CPU} for {@link com.codahale.metrics.Clock.CpuTimeClock}. If not set then the value of
+   *   {@link #CLOCK_CPU} for {@link CpuTimeClock}. If not set then the value of
    *   {@link Clock#defaultClock()} will be used.</li>
    * </ul>
    */
diff --git a/solr/core/src/java/org/apache/solr/metrics/reporters/SolrGangliaReporter.java b/solr/core/src/java/org/apache/solr/metrics/reporters/SolrGangliaReporter.java
deleted file mode 100644
index 8d77a02..0000000
--- a/solr/core/src/java/org/apache/solr/metrics/reporters/SolrGangliaReporter.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.metrics.reporters;
-
-import java.io.IOException;
-import java.util.concurrent.TimeUnit;
-
-import com.codahale.metrics.MetricFilter;
-import com.codahale.metrics.ganglia.GangliaReporter;
-import info.ganglia.gmetric4j.gmetric.GMetric;
-
-import org.apache.solr.metrics.FilteringSolrMetricReporter;
-import org.apache.solr.metrics.SolrMetricManager;
-
-/**
- *
- */
-public class SolrGangliaReporter extends FilteringSolrMetricReporter {
-
-  private String host = null;
-  private int port = -1;
-  private boolean multicast;
-  private String instancePrefix = null;
-  private boolean testing;
-  private GangliaReporter reporter;
-
-  private static final ReporterClientCache<GMetric> serviceRegistry = new ReporterClientCache<>();
-
-  // for unit tests
-  GMetric ganglia = null;
-
-  /**
-   * Create a Ganglia reporter for metrics managed in a named registry.
-   *
-   * @param metricManager metric manager instance that manages the selected registry
-   * @param registryName  registry to use, one of registries managed by
-   *                      {@link SolrMetricManager}
-   */
-  public SolrGangliaReporter(SolrMetricManager metricManager, String registryName) {
-    super(metricManager, registryName);
-  }
-
-  public void setHost(String host) {
-    this.host = host;
-  }
-
-  public void setPort(int port) {
-    this.port = port;
-  }
-
-  public void setPrefix(String prefix) {
-    this.instancePrefix = prefix;
-  }
-
-  public void setMulticast(boolean multicast) {
-    this.multicast = multicast;
-  }
-
-  // only for unit tests!
-  public void setTesting(boolean testing) {
-    this.testing = testing;
-  }
-
-  void setGMetric(GMetric ganglia) {
-    this.ganglia = ganglia;
-  }
-
-  @Override
-  protected void doInit() {
-    if (!testing) {
-      start();
-    }
-  }
-
-  @Override
-  protected void validate() throws IllegalStateException {
-    if (host == null) {
-      throw new IllegalStateException("Init argument 'host' must be set to a valid Ganglia server name.");
-    }
-    if (port == -1) {
-      throw new IllegalStateException("Init argument 'port' must be set to a valid Ganglia server port.");
-    }
-    if (period < 1) {
-      throw new IllegalStateException("Init argument 'period' is in time unit 'seconds' and must be at least 1.");
-    }
-  }
-
-  //this is a separate method for unit tests
-  void start() {
-    if (!testing) {
-      String id = host + ":" + port + ":" + multicast;
-      ganglia = serviceRegistry.getOrCreate(id, () -> new GMetric(host, port,
-          multicast ? GMetric.UDPAddressingMode.MULTICAST : GMetric.UDPAddressingMode.UNICAST,
-          1));
-      if (ganglia == null) {
-        return;
-      }
-    }
-    if (instancePrefix == null) {
-      instancePrefix = registryName;
-    } else {
-      instancePrefix = instancePrefix + "." + registryName;
-    }
-    GangliaReporter.Builder builder = GangliaReporter
-        .forRegistry(metricManager.registry(registryName))
-        .convertRatesTo(TimeUnit.SECONDS)
-        .convertDurationsTo(TimeUnit.MILLISECONDS)
-        .prefixedWith(instancePrefix);
-    final MetricFilter filter = newMetricFilter();
-    builder = builder.filter(filter);
-    reporter = builder.build(ganglia);
-    reporter.start(period, TimeUnit.SECONDS);
-  }
-
-  @Override
-  public void close() throws IOException {
-    if (reporter != null) {
-      reporter.close();
-    }
-  }
-}
diff --git a/solr/core/src/java/org/apache/solr/metrics/reporters/SolrJmxReporter.java b/solr/core/src/java/org/apache/solr/metrics/reporters/SolrJmxReporter.java
index fd927b1..468ba60 100644
--- a/solr/core/src/java/org/apache/solr/metrics/reporters/SolrJmxReporter.java
+++ b/solr/core/src/java/org/apache/solr/metrics/reporters/SolrJmxReporter.java
@@ -21,7 +21,6 @@ import javax.management.MBeanServer;
 import java.lang.invoke.MethodHandles;
 import java.util.Locale;
 
-import com.codahale.metrics.JmxReporter;
 import com.codahale.metrics.MetricFilter;
 import com.codahale.metrics.MetricRegistry;
 
@@ -37,7 +36,7 @@ import org.slf4j.LoggerFactory;
 /**
  * A {@link SolrMetricReporter} that finds (or creates) a MBeanServer from
  * the given configuration and registers metrics to it with JMX.
- * <p>NOTE: {@link JmxReporter} that this class uses exports only newly added metrics (it doesn't
+ * <p>NOTE: {@link com.codahale.metrics.jmx.JmxReporter} that this class uses exports only newly added metrics (it doesn't
  * process already existing metrics in a registry)</p>
  */
 public class SolrJmxReporter extends FilteringSolrMetricReporter {
diff --git a/solr/core/src/java/org/apache/solr/metrics/reporters/jmx/JmxMetricsReporter.java b/solr/core/src/java/org/apache/solr/metrics/reporters/jmx/JmxMetricsReporter.java
index f7a0127..f7fb066 100644
--- a/solr/core/src/java/org/apache/solr/metrics/reporters/jmx/JmxMetricsReporter.java
+++ b/solr/core/src/java/org/apache/solr/metrics/reporters/jmx/JmxMetricsReporter.java
@@ -37,7 +37,7 @@ import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.TimeUnit;
 
 import com.codahale.metrics.Counter;
-import com.codahale.metrics.DefaultObjectNameFactory;
+import com.codahale.metrics.jmx.DefaultObjectNameFactory;
 import com.codahale.metrics.Gauge;
 import com.codahale.metrics.Histogram;
 import com.codahale.metrics.Meter;
@@ -46,7 +46,7 @@ import com.codahale.metrics.Metric;
 import com.codahale.metrics.MetricFilter;
 import com.codahale.metrics.MetricRegistry;
 import com.codahale.metrics.MetricRegistryListener;
-import com.codahale.metrics.ObjectNameFactory;
+import com.codahale.metrics.jmx.ObjectNameFactory;
 import com.codahale.metrics.Reporter;
 import com.codahale.metrics.Timer;
 import org.apache.solr.metrics.MetricsMap;
@@ -55,7 +55,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * This is a modified copy of Dropwizard's {@link com.codahale.metrics.JmxReporter} and classes that it internally uses,
+ * This is a modified copy of Dropwizard's {@link com.codahale.metrics.jmx.JmxReporter} and classes that it internally uses,
  * with a few important differences:
  * <ul>
  * <li>this class knows that it can directly use {@link MetricsMap} as a dynamic MBean.</li>
diff --git a/solr/core/src/java/org/apache/solr/metrics/reporters/jmx/JmxObjectNameFactory.java b/solr/core/src/java/org/apache/solr/metrics/reporters/jmx/JmxObjectNameFactory.java
index 056a35a..36eb83a 100644
--- a/solr/core/src/java/org/apache/solr/metrics/reporters/jmx/JmxObjectNameFactory.java
+++ b/solr/core/src/java/org/apache/solr/metrics/reporters/jmx/JmxObjectNameFactory.java
@@ -21,7 +21,7 @@ import javax.management.ObjectName;
 
 import java.util.Arrays;
 
-import com.codahale.metrics.ObjectNameFactory;
+import com.codahale.metrics.jmx.ObjectNameFactory;
 import org.apache.solr.metrics.SolrMetricInfo;
 
 /**
diff --git a/solr/core/src/test-files/solr/solr-gangliareporter.xml b/solr/core/src/test-files/solr/solr-gangliareporter.xml
deleted file mode 100644
index 4327388..0000000
--- a/solr/core/src/test-files/solr/solr-gangliareporter.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<solr>
- <metrics>
-  <reporter name="test" group="node" class="org.apache.solr.metrics.reporters.SolrGangliaReporter">
-    <str name="host">localhost</str>
-    <int name="port">10000</int>
-    <!-- for unit tests this is set to 1 second - DO NOT USE THIS VALUE IN PRODUCTION! -->
-    <int name="period">1</int>
-    <str name="prefix">test</str>
-    <str name="filter">CONTAINER.cores</str>
-    <!-- this is only used when unit testing - DO NOT USE otherwise! -->
-    <bool name="testing">true</bool>
-  </reporter>
- </metrics>
-</solr>
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/MetricsHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/admin/MetricsHandlerTest.java
index 1730355..ee0f665 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/MetricsHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/MetricsHandlerTest.java
@@ -134,7 +134,7 @@ public class MetricsHandlerTest extends SolrTestCaseJ4 {
     assertNotNull(values.get("metrics"));
     values = (NamedList) values.get("metrics");
     assertEquals(1, values.size());
-    assertEquals(11, ((NamedList)values.get("solr.node")).size());
+    assertEquals(13, ((NamedList)values.get("solr.node")).size());
     assertNotNull(values.get("solr.node"));
     values = (NamedList) values.get("solr.node");
     assertNotNull(values.get("CONTAINER.cores.lazy")); // this is a gauge node
diff --git a/solr/core/src/test/org/apache/solr/metrics/reporters/SolrGangliaReporterTest.java b/solr/core/src/test/org/apache/solr/metrics/reporters/SolrGangliaReporterTest.java
deleted file mode 100644
index 23230cd..0000000
--- a/solr/core/src/test/org/apache/solr/metrics/reporters/SolrGangliaReporterTest.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.solr.metrics.reporters;
-
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import info.ganglia.gmetric4j.gmetric.GMetric;
-import info.ganglia.gmetric4j.gmetric.GMetricSlope;
-import info.ganglia.gmetric4j.gmetric.GMetricType;
-import org.apache.commons.io.FileUtils;
-import org.apache.solr.SolrTestCaseJ4;
-import org.apache.solr.core.CoreContainer;
-import org.apache.solr.core.NodeConfig;
-import org.apache.solr.core.SolrResourceLoader;
-import org.apache.solr.core.SolrXmlConfig;
-import org.apache.solr.metrics.SolrMetricManager;
-import org.apache.solr.metrics.SolrMetricReporter;
-import org.apache.solr.util.TestHarness;
-import org.junit.Test;
-
-import static org.mockito.Mockito.*;
-
-/**
- *
- */
-public class SolrGangliaReporterTest extends SolrTestCaseJ4 {
-  @Test
-  public void testReporter() throws Exception {
-    assumeWorkingMockito();
-    
-    Path home = Paths.get(TEST_HOME());
-    // define these properties, they are used in solrconfig.xml
-    System.setProperty("solr.test.sys.prop1", "propone");
-    System.setProperty("solr.test.sys.prop2", "proptwo");
-
-    GMetric ganglia = mock(GMetric.class);
-    final List<String> names = new ArrayList<>();
-    doAnswer(invocation -> {
-        final Object[] args = invocation.getArguments();
-        names.add((String)args[0]);
-        return null;
-    }).when(ganglia).announce(anyString(), anyString(), any(GMetricType.class), anyString(), any(GMetricSlope.class), anyInt(), anyInt(), anyString());
-    String solrXml = FileUtils.readFileToString(Paths.get(home.toString(), "solr-gangliareporter.xml").toFile(), "UTF-8");
-    NodeConfig cfg = SolrXmlConfig.fromString(new SolrResourceLoader(home), solrXml);
-    CoreContainer cc = createCoreContainer(cfg,
-        new TestHarness.TestCoresLocator(DEFAULT_TEST_CORENAME, initCoreDataDir.getAbsolutePath(), "solrconfig.xml", "schema.xml"));
-    h.coreName = DEFAULT_TEST_CORENAME;
-    SolrMetricManager metricManager = cc.getMetricManager();
-    Map<String, SolrMetricReporter> reporters = metricManager.getReporters("solr.node");
-    assertTrue(reporters.toString(), reporters.size() >= 1);
-    SolrMetricReporter reporter = reporters.get("test");
-    assertNotNull(reporter);
-    assertTrue(reporter instanceof SolrGangliaReporter);
-    SolrGangliaReporter gangliaReporter = (SolrGangliaReporter)reporter;
-    gangliaReporter.setGMetric(ganglia);
-    gangliaReporter.start();
-    Thread.sleep(5000);
-    assertTrue(names.size() >= 3);
-    String[] frozenNames = (String[])names.toArray(new String[names.size()]);
-    for (String name : frozenNames) {
-      assertTrue(name, name.startsWith("test.solr.node.CONTAINER.cores."));
-    }
-  }
-
-}
diff --git a/solr/licenses/metrics-core-3.2.6.jar.sha1 b/solr/licenses/metrics-core-3.2.6.jar.sha1
deleted file mode 100644
index 13fae6d..0000000
--- a/solr/licenses/metrics-core-3.2.6.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-62fe170cffeded1cef60e9e3402a93b45ce14327
diff --git a/solr/licenses/metrics-core-4.0.5.jar.sha1 b/solr/licenses/metrics-core-4.0.5.jar.sha1
new file mode 100644
index 0000000..f5e12e8
--- /dev/null
+++ b/solr/licenses/metrics-core-4.0.5.jar.sha1
@@ -0,0 +1 @@
+b81ef162970cdb9f4512ee2da09715a856ff4c4c
diff --git a/solr/licenses/metrics-ganglia-3.2.6.jar.sha1 b/solr/licenses/metrics-ganglia-3.2.6.jar.sha1
deleted file mode 100644
index 32c9d30..0000000
--- a/solr/licenses/metrics-ganglia-3.2.6.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-a44039835eafd2dad8842a9ed16a60c088c5b7ef
diff --git a/solr/licenses/metrics-graphite-3.2.6.jar.sha1 b/solr/licenses/metrics-graphite-3.2.6.jar.sha1
deleted file mode 100644
index 26a1bbc..0000000
--- a/solr/licenses/metrics-graphite-3.2.6.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-ecbc470e9097bb3d7ff0232cca47f3badde2e20b
diff --git a/solr/licenses/metrics-graphite-4.0.5.jar.sha1 b/solr/licenses/metrics-graphite-4.0.5.jar.sha1
new file mode 100644
index 0000000..2aa9abb
--- /dev/null
+++ b/solr/licenses/metrics-graphite-4.0.5.jar.sha1
@@ -0,0 +1 @@
+76e8758356373d5aed5abacbda429b38f6e8fa98
diff --git a/solr/licenses/metrics-jetty9-3.2.6.jar.sha1 b/solr/licenses/metrics-jetty9-3.2.6.jar.sha1
deleted file mode 100644
index 5d7bfa4..0000000
--- a/solr/licenses/metrics-jetty9-3.2.6.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-5dae1c13d8607663fbc7b22cf8c05aacd22f802e
diff --git a/solr/licenses/metrics-jetty9-4.0.5.jar.sha1 b/solr/licenses/metrics-jetty9-4.0.5.jar.sha1
new file mode 100644
index 0000000..228b179
--- /dev/null
+++ b/solr/licenses/metrics-jetty9-4.0.5.jar.sha1
@@ -0,0 +1 @@
+87f3b49a7377e56f62046875d394ed0028b37690
diff --git a/solr/licenses/metrics-jmx-4.0.5.jar.sha1 b/solr/licenses/metrics-jmx-4.0.5.jar.sha1
new file mode 100644
index 0000000..b70a07d
--- /dev/null
+++ b/solr/licenses/metrics-jmx-4.0.5.jar.sha1
@@ -0,0 +1 @@
+d7be4ddd7ba674ee8be1d23d883fb3ca68ee1d54
diff --git a/solr/licenses/metrics-ganglia-LICENSE-ASL.txt b/solr/licenses/metrics-jmx-LICENSE-ASL.txt
similarity index 100%
rename from solr/licenses/metrics-ganglia-LICENSE-ASL.txt
rename to solr/licenses/metrics-jmx-LICENSE-ASL.txt
diff --git a/solr/licenses/metrics-ganglia-NOTICE.txt b/solr/licenses/metrics-jmx-NOTICE.txt
similarity index 100%
rename from solr/licenses/metrics-ganglia-NOTICE.txt
rename to solr/licenses/metrics-jmx-NOTICE.txt
diff --git a/solr/licenses/metrics-jvm-3.2.6.jar.sha1 b/solr/licenses/metrics-jvm-3.2.6.jar.sha1
deleted file mode 100644
index 219d02b..0000000
--- a/solr/licenses/metrics-jvm-3.2.6.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-a7a475393fe47dfee2042415430da3f01d4fe94e
diff --git a/solr/licenses/metrics-jvm-4.0.5.jar.sha1 b/solr/licenses/metrics-jvm-4.0.5.jar.sha1
new file mode 100644
index 0000000..176a65f
--- /dev/null
+++ b/solr/licenses/metrics-jvm-4.0.5.jar.sha1
@@ -0,0 +1 @@
+09f6f1e6c1db440d9ad4c3114f17be40f66bb399
diff --git a/solr/server/ivy.xml b/solr/server/ivy.xml
index 6d1f11e..29a66e9 100644
--- a/solr/server/ivy.xml
+++ b/solr/server/ivy.xml
@@ -39,9 +39,8 @@
 
     <dependency org="io.dropwizard.metrics" name="metrics-core" rev="${/io.dropwizard.metrics/metrics-core}" conf="metrics" />
     <dependency org="io.dropwizard.metrics" name="metrics-jetty9" rev="${/io.dropwizard.metrics/metrics-jetty9}" conf="metrics" />
+    <dependency org="io.dropwizard.metrics" name="metrics-jmx" rev="${/io.dropwizard.metrics/metrics-jmx}" conf="metrics" />
     <dependency org="io.dropwizard.metrics" name="metrics-jvm" rev="${/io.dropwizard.metrics/metrics-jvm}" conf="metrics" />
-    <dependency org="io.dropwizard.metrics" name="metrics-ganglia" rev="${/io.dropwizard.metrics/metrics-ganglia}" conf="metrics" />
-    <dependency org="info.ganglia.gmetric4j" name="gmetric4j" rev="${/info.ganglia.gmetric4j/gmetric4j}" conf="metrics" />
     <dependency org="io.dropwizard.metrics" name="metrics-graphite" rev="${/io.dropwizard.metrics/metrics-graphite}" conf="metrics" />
 
     <dependency org="org.eclipse.jetty" name="jetty-continuation" rev="${/org.eclipse.jetty/jetty-continuation}" conf="jetty"/>