Prometheus-timestream-adapter is a service which receives Prometheus metrics through remote_write
, and sends them into AWS Timestream.
go build
go test
To configure Prometheus to send samples to this binary, add the following to your prometheus.yml
:
remote_write:
- url: "http://prometheus-timestream-adapter:9201/write"
remote_read:
- url: "http://prometheus-timestream-adapter:9201/read"
The Session will attempt to load configuration and credentials from the environment, configuration files, and other credential sources.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowReadWriteToTable",
"Effect": "Allow",
"Action": [
"timestream:WriteRecords",
"timestream:Select"
],
"Resource": "arn:aws:timestream:region:AccoundId:database/DatabaseName/table/TableName"
},
{
"Sid": "AllowDescribeEndpoints",
"Effect": "Allow",
"Action": "timestream:DescribeEndpoints",
"Resource": "*"
},
{
"Sid": "AllowValueRead",
"Effect": "Allow",
"Action": "timestream:SelectValues",
"Resource": "*"
}
]
}
The maximum number of characters for an AWS Timestream Dimension name is 256 bytes. Is a metric name is bigger than that it can't be written to AWS Timestream.