Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vrischmann/go-metrics-influxdb
This is a reporter for the go-metrics library which will post the metrics to InfluxDB
https://github.com/vrischmann/go-metrics-influxdb
Last synced: 12 days ago
JSON representation
This is a reporter for the go-metrics library which will post the metrics to InfluxDB
- Host: GitHub
- URL: https://github.com/vrischmann/go-metrics-influxdb
- Owner: vrischmann
- License: mit
- Created: 2015-08-20T22:45:18.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-02-21T17:07:24.000Z (over 4 years ago)
- Last Synced: 2024-10-15T02:33:51.902Z (25 days ago)
- Language: Go
- Size: 17.6 KB
- Stars: 69
- Watchers: 8
- Forks: 54
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-influxdb - go-metrics-influxdb - A reporter for the [go-metrics library](https://github.com/rcrowley/go-metrics) which will post the metrics to InfluxDB (Collecting data into InfluxDB / Libraries)
README
go-metrics-influxdb
===================This is a reporter for the [go-metrics](https://github.com/rcrowley/go-metrics) library which will post the metrics to [InfluxDB](https://influxdb.com/).
This version adds a measurement for the metrics, moves the histogram bucket names into tags, similar to the behavior of hitograms in telegraf, and aligns all metrics in a batch on the same timestamp.
Additionally, metrics can be aligned to the beginning of a bucket as defined by the interval.
Setting align to true will cause the timestamp to be truncated down to the nearest even integral of the reporting interval.
For example, if the interval is 30 seconds, tiemstamps will be aligned on :00 and :30 for every reporting interval.
This also maps to a similar option in Telegraf.
Note
----This is only compatible with InfluxDB 0.9+.
Usage
-----```go
import "github.com/jregovic/go-metrics-influxdb"go influxdb.InfluxDBWithTags(
metrics.DefaultRegistry, // metrics registry
time.Second * 10, // interval
metricsHost, // the InfluxDB url
database, // your InfluxDB database
measurement, // your measurement
metricsuser, // your InfluxDB user
metricspass, // your InfluxDB password
tags, // your tag set as map[string]string
aligntimestamps // align the timestamps
)
```License
-------go-metrics-influxdb is licensed under the MIT license. See the LICENSE file for details.