-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add validation around null tag strings and drop the measurements with a
warning when such tags are present. Update the reporter docs. Update dependency versions.
- Loading branch information
Showing
9 changed files
with
124 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# InfluxReporter | ||
|
||
This reporter will push batches of metrics to an InfluxDB V1x HTTP API server as JSON object. Note that a database name must be included. | ||
|
||
Configuration parameters include: | ||
|
||
* **baseUri** - *(required)* A hostname including protocol, host and optional port. E.g. `http://localhost:4242`. Note that the host must start with a protocol of either `http://` or `https://`. | ||
* **endpoint** - *(Default: `/write?db=`)* A string with the endpoint to post results to. Note that the endpoint must start with a forward slash and can be `/?db=`. If this parameter is set then the `database` parameter will be ignored and must be supplied as a query parameter in the endpoint string. | ||
* **database** - *(required)* A string denoting the InfluxDB database to send measurements to. | ||
* **bufferSize** - *(Default: `64 * 1024`)* The maximum size of the buffer before it's flushed. | ||
* **windowSize** - (Default: `1`) How often to report to the API in seconds. | ||
|
||
To instantiate and run the reporter execute: | ||
|
||
```Java | ||
InfluxDBReporter.Builder reporter_builder = | ||
InfluxDBReporter.builder() | ||
.withBaseUri(URI.create("http://localhost:4242"))) | ||
.withDatabase("Ultrabrew") | ||
.withWindowSize(60); | ||
|
||
InfluxDBReporter reporter = reporter_builder.build(); | ||
MetricRegistry metricRegistry = new MetricRegistry(); | ||
metric_registry.addReporter(reporter); | ||
|
||
// on program shutdown | ||
reporter.close(); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
dependencies { | ||
compile project(':core') | ||
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.6' | ||
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.13' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
dependencies { | ||
compile project(':core') | ||
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.6' | ||
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.13' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters