Class Graphite

java.lang.Object
io.prometheus.client.bridge.Graphite

public class Graphite extends Object
Export metrics in the Graphite plaintext format.

 
  Graphite g = new Graphite("localhost", 2003);
  // Push the default registry once.
  g.push(CollectorRegistry.defaultRegistry);

  // Push the default registry every 60 seconds.
  Thread thread = g.start(CollectorRegistry.defaultRegistry, 60);
  // Stop pushing.
  thread.interrupt();
  thread.join();
 
 

  • Field Details

    • logger

      private static final Logger logger
    • host

      private final String host
    • port

      private final int port
    • INVALID_GRAPHITE_CHARS

      private static final Pattern INVALID_GRAPHITE_CHARS
  • Constructor Details

    • Graphite

      public Graphite(String host, int port)
      Construct a Graphite Bridge with the given host:port.
  • Method Details