graphite-client

Connects to a carbon/graphite instance to push metrics

License

License

Categories

Categories

Ant Build Tools Net CLI User Interface
GroupId

GroupId

net.savantly
ArtifactId

ArtifactId

graphite-client
Last Version

Last Version

2.0.0-RELEASE
Release Date

Release Date

Type

Type

jar
Description

Description

graphite-client
Connects to a carbon/graphite instance to push metrics
Project URL

Project URL

https://github.com/savantly-net/graphite-client
Project Organization

Project Organization

savantly.net
Source Code Management

Source Code Management

https://github.com/savantly-net/graphite-client

Download graphite-client

How to add to project

<!-- https://jarcasting.com/artifacts/net.savantly/graphite-client/ -->
<dependency>
    <groupId>net.savantly</groupId>
    <artifactId>graphite-client</artifactId>
    <version>2.0.0-RELEASE</version>
</dependency>
// https://jarcasting.com/artifacts/net.savantly/graphite-client/
implementation 'net.savantly:graphite-client:2.0.0-RELEASE'
// https://jarcasting.com/artifacts/net.savantly/graphite-client/
implementation ("net.savantly:graphite-client:2.0.0-RELEASE")
'net.savantly:graphite-client:jar:2.0.0-RELEASE'
<dependency org="net.savantly" name="graphite-client" rev="2.0.0-RELEASE">
  <artifact name="graphite-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.savantly', module='graphite-client', version='2.0.0-RELEASE')
)
libraryDependencies += "net.savantly" % "graphite-client" % "2.0.0-RELEASE"
[net.savantly/graphite-client "2.0.0-RELEASE"]

Dependencies

compile (2)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.7
com.fasterxml.jackson.core : jackson-databind jar 2.9.4

test (2)

Group / Artifact Type Version
junit : junit jar 4.11
ch.qos.logback : logback-classic jar 1.1.8

Project Modules

There are no modules declared in this project.

Build Status

Graphite Client

Use in Maven project -

	<dependency>
		<groupId>net.savantly</groupId>
		<artifactId>graphite-client</artifactId>
		<version>2.0.0-RELEASE</version>
	</dependency>

Reporting Example

GraphiteClient client = GraphiteClientFactory.defaultGraphiteClient("localhost", 2003);

long epoch = System.currentTimeMillis()/1000;
CarbonMetric metric = new SimpleCarbonMetric("test.one", "123", epoch);
client.saveCarbonMetrics(metric);

Query Example -

String graphiteHost = "localhost";
QueryableGraphiteClient client = GraphiteClientFactory.queryableGraphiteClient(graphiteHost);

String target = "constantLine(123.456)";

JsonFormatter formatter = new JsonFormatter();
GraphiteQueryBuilder<JsonNode> builder = new GraphiteQueryBuilder<>(formatter);
GraphiteQuery<JsonNode> query = builder.setTarget(target).build();

JsonNode results = client.query(query);
net.savantly

Savantly

Savantly custom software solutions for your business

Versions

Version
2.0.0-RELEASE
1.1.0-RELEASE
1.0.0-RELEASE