package
0.0.0-20160825065156-d002785f4c67
Repository: https://github.com/psiphon-labs/goarista.git
Documentation: pkg.go.dev

# README

octsdb

This is a client for the OpenConfig gRPC interface that pushes telemetry to OpenTSDB. Non-numerical data isn't supported by OpenTSDB and is silently dropped.

This tool requires a config file to specify how to map the path of the notificatons coming out of the OpenConfig gRPC interface onto OpenTSDB metric names, and how to extract tags from the path. For example, the following rule, excerpt from sampleconfig.json:

   "metrics": {
      "tempSensor": {
         "path": "/Sysdb/(environment)/temperature/status/tempSensor/(?P<sensor>.+)/((?:maxT|t)emperature)/value"
      },
	  ...

Applied to an update for the path /Sysdb/environment/temperature/status/tempSensor/TempSensor1/temperature/value will lead to the metric name environment.temperature and tags sensor=TempSensor1.

Basically, un-named groups are used to make up the metric name, and named groups are used to extract (optional) tags.

Usage

See the -help output, but here's an example to push all the metrics defined in the sample config file:

octsdb -addrs <switch-hostname>:6042 -config sampleconfig.json -text | nc <tsd-hostname> 4242

# Structs

Config is the representation of octsdb's JSON config file.
DataPoint for OpenTSDB to store.
A Metric to collect and how to massage it into an OpenTSDB put.

# Interfaces

OpenTSDBConn is a managed connection to an OpenTSDB instance (or cluster).