This allow Prometheus to use Treasure Data as long-term storage.
https://prometheus.io/docs/operating/integrations/#remote-endpoints-and-storage
dep is required for dependency management.
$ make deps
$ make
$ ./prometheus-td-adapter -td.apikey=yourapikey -td.db=yourdb -td.table=yourtable
You can pass the td related parameters via environment variables: TD_APIKEY
, TD_DB
and TD_TABLE
.
For other options, see ./prometheus-td-adapter -h
.
remote_write:
- url: "http://localhost:9201/write"
Metrics is stored in Treasure Data as below.
time
: timestampvalue
: metric valuename
: metric namelabel_*
: labels (automatically prefixed by "label_")
{
"time": 1508050569,
"value": 802713.0,
"name": "node_network_transmit_packets",
"label_job": "prometheus",
"label_instance": "localhost:9100",
"label_device": "lo0"
}
- READ