bosun.org@v0.0.0-20210513094433-e25bc3e69a1f/cmd/tsdbrelay/doc.go (about) 1 /* 2 3 tsdbrelay relays OpenTSDB traffic to TSD and Bosun servers. 4 5 Requests to /api/put relays the request to OpenTSDB. Any response (success or 6 failure) is returned to the source. In case of success, the relay attempts to 7 write to Bosun but with a path of /api/index. If Bosun is down or otherwise 8 fails, the data is dropped, but no negative status is returned to the source. 9 10 Requests to /api/metadata/put will relay only to Bosun, not OpenTSDB. Other 11 URLs will relay only to OpenTSDB, not Bosun. 12 13 Additional relays may be specified to send all requests to those relays (unless they are filtered). This enables basic replication to other tsdb clusters, forwarding just datapoints/metadata using the #data-only or #metadata-only filters, or sending index and metadata to another bosun instance using #bosun-index. 14 15 tsdbrelay also can receive "external counters" for infrequent or sporadic metrics. It can increment counters in a redis instance to track counts of things that would otherwise be difficult to keep track of. 16 To enable this, supply a redis server with the `-redis` flag, and send counter data to `/api/count` in the same format as expected by `/api/put`. There is an scollector feature to periodically pull these counters into bosun/opentsdb (see RedisCounters section of https://godoc.org/bosun.org/cmd/scollector). 17 18 tsdbrelay can "denormalize"" metrics in order to decrease metric cardinality for better query performance on metrics with a lot of tags. For example `-denormalize=os.cpu__host` will create an additional data point for `os.cpu{host=web01}` into `__web01.os.cpu{host=web01}` as well. 19 20 Usage: 21 tsdbrelay [-l listen-address] [-b bosun-server] -t tsdb-server 22 23 The flags are: 24 -b="bosun" 25 Target Bosun server. Can specify as host, host:port, or https://host:port. 26 -t="" 27 Target OpenTSDB server. Can specify as host, host:port or https://host:port. 28 -l=":4242" 29 Listen address. 30 -v=false 31 Enable verbose logging 32 -r="" 33 Additional relays to send data to, comma seperated. Intended for secondary data center replication. Only response from primary tsdb server wil be relayed to clients. 34 Examples: hostA:port,https://hostB:port,hostC#data-only,https://hostD:8080#bosun-index,https://hostE:8080#metadata-only 35 -redis="" 36 Redis host to store external counter data in 37 -db=0 38 Redis database number to use 39 -denormalize="" 40 List of metrics to denormalize. Comma seperated list of `metric__tagname__tagname` rules. Will be translated to `__tagvalue.tagvalue.metric` 41 42 */ 43 package main