prometheus-timestream-adapter

command module
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

README

prometheus-timestream-adapter

Prometheus-timestream-adapter is a service which receives Prometheus metrics through remote_write, and sends them into AWS Timestream.

Building

go build

Testing

go test

Command line options

Usage of ./prometheus-timestream-adapter:
      --awsRegion string        (default "eu-central-1")
      --databaseName string     (default "prometheus-database")
      --help                   
      --listenAddr string       (default ":9201")
      --logLevel string         (default "error")
      --tableName string        (default "prometheus-table")
      --telemetryPath string    (default "/metric")
      --tls                    
      --tlsCert string          (default "tls.cert")
      --tlsKey string           (default "tls.key")

Configuring Prometheus

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"

:info: AWS Timestream has a very powerful query language and there is a Grafana Plugin supporting Timestream as a datasource. However, there is a basic reader implementation.

remote_read:
  - url: "http://prometheus-timestream-adapter:9201/read"

Access Prometheus Timestream Database

The Session will attempt to load configuration and credentials from the environment, configuration files, and other credential sources.

AWS Policy
{
    "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": "*"
        }
    ]
}

FAQ

What does the warning Measure name exceeds the maximum supported length mean?

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.

Timestream Quotas

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL