collector-emitter

command
v0.0.0-...-f82f096 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

README

Collector Client

A reference implementation of a system process which emits Avro Metrics data to a Collector.

  • Connects to 127.0.0.1:8124 and sends various arbitrary data to it.
  • Automatically recovers if the connection is lost.

Prerequisites

apt-get install golang-go

Build

go generate # creates 'metrics_schema' package
go build

If you see errors about cannot find package "github.com/.../metrics_schema", you forgot to perform go generate.

Run locally or on a DC/OS node

./collector-emitter -h # view help
./collector-emitter -record-output-log # print records in json form

Get sent data

nc -l 8124 can be run on the same system to view raw emitted data or save it to disk.

The data will follow the standard Avro OCF format and can be directly parsed using avro-tools.jar:

nc -l 8124 > data.avro
# <send some stats, then close collector-emitter process to close nc>
java -jar avro-tools-1.8.0.jar getschema data.avro
java -jar avro-tools-1.8.0.jar tojson --pretty data.avro

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL