Categorygithub.com/signalfx/gateway
modulepackage
1.2.23
Repository: https://github.com/signalfx/gateway.git
Documentation: pkg.go.dev

# README

Gateway Circle CI

The SignalFx Gateway lets you aggregate metrics and send them to SignalFx. It is a multilingual datapoint demultiplexer that can accept time series data from the carbon (Graphite), collectd or SignalFx protocols and emit those datapoints to a series of servers using the carbon, collectd or SignalFx protocols. We recommend placing the gateway either on the same server as another existing metrics aggregator or on a central server that is already receiving datapoints, such as Graphite's carbon database.

The SignalFx Gateway also acts as a simple proxy and forwarder for SignalFx's Events Ingest and Trace Ingest APIs.

Usage and Configuration

Please refer to the usage and configuration documentation located here for more information on operating the SignalFx Gateway.

Development

If you want to submit patches for the gateway, make sure your code passes travis_check.sh with exit code 0. For help setting up your development environment, it should be enough to mirror the install steps of .travis.yml. You may need to make sure your GOPATH env variable is set correctly.

Code layout

You only need to read this if you want to develop the gateway or understand the gateway's code.

The gateway is divided into two main components: forwarder and listener. The forwarder and listener are glued together by the demultiplexer.

When a listener receives a datapoint, it converts the datapoint into a basic datapoint type. This core datapoint type is then sent to the multiplexer that will send a pointer to that datapoint to each forwarder.

Sometimes there is a loss of fidelity during transmission if a listener and forwarder don't support the same options. While it's impossible to make something understand an option it does not, we don't want to forget support for this option when we translate a datapoint through the multiplexer. We work around this by sometimes encoding the raw representation of the datapoint into the Datapoint object we forward. For example, points from carbon are not only translated into our core datapoint format, but also support ToCarbonLine which allows us to directly convert the abstract datapoint into what it looked like for carbon, which allows us to forward the point to another carbon database exactly as we received it.

All message passing between forwarders, multiplexer, and listeners happen on golang's built in channel abstraction.

Config file format

See the example config file for an example of how configuration looks. Configuration is a JSON file with two important fields: ListenFrom and ForwardTo.

License

The SignalFx Gateway is released under the Apache 2.0 license. See LICENSE for more details.

Dependencies

Note: this list of dependencies applies to both the SignalFx Gateway and its Smart Gateway variant.

NameLicense
github.com/apache/thrift/lib/go/thriftApache Software License v2.0
github.com/beorn7/perks/quantileMIT
github.com/coreos/bboltMIT
github.com/coreos/etcdApache Software License v2.0
github.com/coreos/go-semver/semverApache Software License v2.0
github.com/coreos/go-systemd/journalApache Software License v2.0
github.com/coreos/pkg/capnslogApache Software License v2.0
github.com/davecgh/go-spew/spewISC
github.com/dgrijalva/jwt-goMIT
github.com/ghodss/yamlMIT
github.com/go-logfmt/logfmtMIT
github.com/go-stack/stackMIT
github.com/gobwas/globMIT
github.com/gogo/protobufBSD 3-Clause
github.com/golang/groupcache/lruApache Software License v2.0
github.com/golang/protobufBSD 3-Clause
github.com/golang/snappyBSD 3-Clause
github.com/google/btreeApache Software License v2.0
github.com/google/go-cmpBSD 3-Clause
github.com/gopherjs/gopherjs/jsBSD 2-Clause
github.com/gorilla/contextBSD 3-Clause
github.com/gorilla/muxBSD 3-Clause
github.com/gorilla/websocketBSD 2-Clause
github.com/grpc-ecosystem/go-grpc-middlewareApache Software License v2.0
github.com/grpc-ecosystem/go-grpc-prometheusApache Software License v2.0
github.com/grpc-ecosystem/grpc-gatewayBSD 3-Clause
github.com/inconshreveable/mousetrapApache Software License v2.0
github.com/jaegertracing/jaeger/thrift-gen/jaegerApache Software License v2.0
github.com/jonboulle/clockworkApache Software License v2.0
github.com/jtolds/glsMIT
github.com/konsorten/go-windows-terminal-sequencesMIT
github.com/kr/logfmtMIT
github.com/mailru/easyjsonMIT
github.com/matttproud/golang_protobuf_extensions/pbutilApache Software License v2.0
github.com/mdubbyap/timespanMIT
github.com/opentracing/opentracing-goApache Software License v2.0
github.com/pkg/errorsBSD 2-Clause
github.com/pmezard/go-difflib/difflibBSD 3-Clause
github.com/prometheus/client_golang/prometheusApache Software License v2.0
github.com/prometheus/client_model/goApache Software License v2.0
github.com/prometheus/commonApache Software License v2.0
github.com/prometheus/procfsApache Software License v2.0
github.com/prometheus/prometheus/prompbApache Software License v2.0
github.com/signalfx/com_signalfx_metrics_protobufApache Software License v2.0
github.com/signalfx/embetcd/embetcdApache Software License v2.0
github.com/signalfx/go-distributeApache Software License v2.0
github.com/signalfx/go-metricsBSD 3-Clause
github.com/signalfx/gohistogramMIT
github.com/signalfx/gohelpersApache Software License v2.0
github.com/signalfx/golibApache Software License v2.0
github.com/signalfx/ondiskencodingApache Software License v2.0
github.com/mdubbyap/tdigestApache Software License v2.0
github.com/signalfx/xdgbasedirApache Software License v2.0
github.com/sirupsen/logrusMIT
github.com/smartystreets/assertionsMIT
github.com/smartystreets/goconveyMIT
github.com/soheilhy/cmuxApache Software License v2.0
github.com/spaolacci/murmur3BSD 3-Clause
github.com/spf13/cobraApache Software License v2.0
github.com/spf13/pflagBSD 3-Clause
github.com/stretchr/testify/assertMIT
github.com/tmc/grpc-websocket-proxy/wsproxyMIT
github.com/uber/tchannel-goMIT
github.com/ugorji/goMIT
github.com/xiang90/probingMIT
go.uber.org/atomicMIT
go.uber.org/multierrMIT
go.uber.org/zapMIT
golang.org/x/cryptoBSD 3-Clause
golang.org/x/lintBSD 3-Clause
golang.org/x/netBSD 3-Clause
golang.org/x/sysBSD 3-Clause
golang.org/x/textBSD 3-Clause
golang.org/x/timeBSD 3-Clause
golang.org/x/toolsBSD 3-Clause
google.golang.org/googleapisApache Software License v2.0
google.golang.org/genprotoApache Software License v2.0
google.golang.org/grpcApache Software License v2.0
gopkg.in/logfmt.v0MIT
gopkg.in/natefinch/lumberjack.v2MIT
gopkg.in/stack.v1MIT
gopkg.in/yaml.v2Apache Software License v2.0
gotest.toolsApache Software License v2.0
stathat.com/c/consistentMIT

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

FirstNonNil returns what it says it does.
GetContext returns the context passed in or creates a background context if the context passed in is nil.

# Variables

BuildDate is set by a build flag to the date of the build.
Version is set by a build flag to the built version.