title: Issue accessing Dropwizard JVM metrics via servlet
body: <p>I'm adding Dropwizard Metrics to a web application.
  I'm using the metrics servlet to retrieve the data.
  However, I cannot get the JVM details to be returned.</p>
  
  <p>I've set the following on the MetricRegistry</p>
  
  <pre><code>metrics.register("jvm.memory", new MemoryUsageGaugeSet());
  metrics.register("jvm.gc", new GarbageCollectorMetricSet());
  metrics.register("jvm.attribute", new JvmAttributeGaugeSet());
  metrics.register("jvm.threads", new ThreadStatesGaugeSet());
  metrics.register("jvm.buffers", new BufferPoolMetricSet(ManagementFactory
                      .getPlatformMBeanServer()));
  metrics.register("jvm.classloader", new ClassLoadingGaugeSet());
  metrics.register("jvm.filedescriptor", new FileDescriptorRatioGauge());
  </code></pre>
  
  <p>According to the following javadoc, it says the Metrics Servlet takes a parameter.
  <a href="https://metrics.dropwizard.io/4.1.2/manual/servlets.html" rel="nofollow noreferrer">https://metrics.dropwizard.io/4.1.2/manual/servlets.html</a></p>
  
  <pre><code>MetricsServlet
  .....
  MetricsServlet also takes an initialization parameter, show-jvm-metrics, which if "false" will disable the outputting of JVM-level information in the JSON object.
  </code></pre>
  
  <p>I've done this but I still am not getting the JVM stats returned. The docs seem to infer that it should be true by default.</p>
  
  <pre><code>&lt;servlet&gt;
          &lt;servlet-name&gt;metrics&lt;/servlet-name&gt;
          &lt;servlet-class&gt;com.codahale.metrics.servlets.MetricsServlet&lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;show-jvm-metrics&lt;/param-name&gt;
              &lt;param-value&gt;true&lt;/param-value&gt;
          &lt;/init-param&gt;
      &lt;/servlet&gt;
  </code></pre>
  
  <p>Am I missing another step?</p>
  
  <p>Thanks</p>