github.com/Psiphon-Labs/goarista@v0.0.0-20160825065156-d002785f4c67/cmd/octsdb/README.md (about) 1 # octsdb 2 3 This is a client for the OpenConfig gRPC interface that pushes telemetry to 4 OpenTSDB. Non-numerical data isn't supported by OpenTSDB and is silently 5 dropped. 6 7 This tool requires a config file to specify how to map the path of the 8 notificatons coming out of the OpenConfig gRPC interface onto OpenTSDB 9 metric names, and how to extract tags from the path. For example, the 10 following rule, excerpt from `sampleconfig.json`: 11 12 ```json 13 "metrics": { 14 "tempSensor": { 15 "path": "/Sysdb/(environment)/temperature/status/tempSensor/(?P<sensor>.+)/((?:maxT|t)emperature)/value" 16 }, 17 ... 18 ``` 19 20 Applied to an update for the path 21 `/Sysdb/environment/temperature/status/tempSensor/TempSensor1/temperature/value` 22 will lead to the metric name `environment.temperature` and tags `sensor=TempSensor1`. 23 24 Basically, un-named groups are used to make up the metric name, and named 25 groups are used to extract (optional) tags. 26 27 ## Usage 28 29 See the `-help` output, but here's an example to push all the metrics defined 30 in the sample config file: 31 ``` 32 octsdb -addrs <switch-hostname>:6042 -config sampleconfig.json -text | nc <tsd-hostname> 4242 33 ```