Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Fedora 4 is instrumented using Metrics. These metrics are exposed via JMX and an HTTP API. All REST API operations track timing and histogram information. Key internal API methods are also included. Modeshape and Infinispan include their own metrics reporting over JMX. The metrics endpoint is wired into the kitchen sink build's web.xml:

 

Code Block
  <!-- BEGIN Metrics -->
  <servlet>
    <servlet-name>MetricsAdminServlet</servlet-name>
    <servlet-class>com.codahale.metrics.servlets.AdminServlet</servlet-class>
  </servlet>


  <servlet-mapping>
    <servlet-name>MetricsAdminServlet</servlet-name>
    <url-pattern>/metrics/*</url-pattern>
  </servlet-mapping>
  <!-- END Metrics -->

 

Here is an example metrics block:

Code Block
 "org.fcrepo.api.FedoraNodes.createObject" : {
      "count" : 0,
      "max" : 0.0,
      "mean" : 0.0,
      "min" : 0.0,
      "p50" : 0.0,
      "p75" : 0.0,
      "p95" : 0.0,
      "p98" : 0.0,
      "p99" : 0.0,
      "p999" : 0.0,
      "stddev" : 0.0,
      "m15_rate" : 0.0,
      "m1_rate" : 0.0,
      "m5_rate" : 0.0,
      "mean_rate" : 0.0,
      "duration_units" : "seconds",
      "rate_units" : "calls/second"
    },

 

To enable Metrics reporting to JMX:

  • Add "-Dcom.sun.management.jmxremote" to MAVEN_OPTS, e.g.:
    export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=256m -Dcom.sun.management.jmxremote"
  • Set the System Property "fcrepo.metrics.jmx" to "true", e.g.:
    -Dfcrepo.metrics.jmx=true
  • Select the MBeans tab and navigate to "org.fcrepo"

 

The Metrics reporter can also be configured to report to Ganglia or Graphite to track and store data points over time. Fedora 4 ships with an example Graphite integration.