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();

  • Constructor Details

    • Graphite

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