Class Graphite
java.lang.Object
io.prometheus.client.bridge.Graphite
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidpush(CollectorRegistry registry) Push samples from the given registry to Graphite.start(CollectorRegistry registry) Push samples from the given registry to Graphite every minute.start(CollectorRegistry registry, int intervalSeconds) Push samples from the given registry to Graphite at the given interval.
-
Constructor Details
-
Graphite
Construct a Graphite Bridge with the given host:port.
-
-
Method Details
-
push
Push samples from the given registry to Graphite.- Throws:
IOException
-
start
Push samples from the given registry to Graphite every minute. -
start
Push samples from the given registry to Graphite at the given interval.
-