Class GraphiteMetricMessageBuilder

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

public class GraphiteMetricMessageBuilder
extends Object
Generates metric messages to send to graphite instances.
  • Constructor Details

    • GraphiteMetricMessageBuilder

      public GraphiteMetricMessageBuilder​(@Nullable 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 String buildMessage​(String metricName, Object value, long timestamp)
      Builds a metric string to send to a Graphite instance.
      Returns:
      The metric string without trailing newline
    • getPrefix

      public String getPrefix()