Class GraphiteMetricMessageBuilder

java.lang.Object
org.jmxtrans.agent.graphite.GraphiteMetricMessageBuilder

public class GraphiteMetricMessageBuilder
extends java.lang.Object
Generates metric messages to send to graphite instances.
  • Constructor Summary

    Constructors
    Constructor Description
    GraphiteMetricMessageBuilder​(java.lang.String configuredMetricPathPrefix)  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String buildMessage​(java.lang.String metricName, java.lang.Object value, long timestamp)
    Builds a metric string to send to a Graphite instance.
    java.lang.String getPrefix()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GraphiteMetricMessageBuilder

      public GraphiteMetricMessageBuilder​(@Nullable java.lang.String configuredMetricPathPrefix)
      Parameters:
      configuredMetricPathPrefix - Prefix to add to the metric keys. May be null, in which case servers.your_hostname will be used.
  • Method Details

    • buildMessage

      public java.lang.String buildMessage​(java.lang.String metricName, java.lang.Object value, long timestamp)
      Builds a metric string to send to a Graphite instance.
      Returns:
      The metric string without trailing newline
    • getPrefix

      public java.lang.String getPrefix()