Skip to content
This repository has been archived by the owner on Nov 20, 2022. It is now read-only.

Latest commit

 

History

History
49 lines (36 loc) · 1.99 KB

File metadata and controls

49 lines (36 loc) · 1.99 KB

go-metrics-influxdb-grpc-example

Example of GRPC echo service with go-metrics exported to InfluxDB instance running in Docker by go-metrics-influxdb reporter.

Prerequisites:

Usage

Generate golang code from echo.proto definition:

./generate-proto.sh

Start docker-compose with InfluxDB and Chronograf:

docker-compose up -d

The configuration for InfluxDB reporter is in influxdb-config.yaml file. Don't need to create localBucketId database, it will be done automatically.

Server and client available by the next commands:

go run server/main.go
go run client/main.go

Run them in different terminals.

Echo Calls Rate Graph

After docker-compose up -d is executed, then Chronograf instance is available on http://localhost:8888.

If you would like to see the rate for echo calls, then follow next link http://localhost:8888/sources/0/chronograf/data-explorer. Or use the query:

SELECT stddev("echo.count") AS "stddev_echo.count" FROM "localBucketId"."autogen"."measurement" WHERE time > :dashboardTime: AND time < :upperDashboardTime: GROUP BY time(1m) FILL(null)

License

go-metrics-influxdb-grpc-example is licensed under the MIT license. See the LICENSE file for details.