Closed ratovarius closed 2 years ago
This is happening when I change the default database name in init()
.
How can I set a custom database name ?
Hi @ratovarius, there is a command line option --databaseName
to set a custom db name.
Thanks. So, I edit the Dokerfile,
...
ENTRYPOINT ["/usr/local/bin/prometheus-timestream-adapter --databaseName my_database --tableName my_table --logLevel debug"]
after that I create and push the image. The kubernetes pod is loading the image, but getting,
timestream-adapter:
...
Port: <none>
Host Port: <none>
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: ContainerCannotRun
Message: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/usr/local/bin/prometheus-timestream-adapter --databaseName my_database --tableName my_table-table --logLevel debug": stat /usr/local/bin/prometheus-timestream-adapter --databaseName my_database --tableName my_table-table --logLevel debug: no such file or directory: unknown
there is something wrong on my setup?
my bad, the correct command is,
...
ENTRYPOINT ["/usr/local/bin/prometheus-timestream-adapter", "--databaseName", "my_database", "--tableName", "my_table", "--logLevel", "debug"]
You don't have to change the Dockerfile. Just pass command line parameters directly to the container.
docker run dpattmann/prometheus-timestream-adapter --help
--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")
Using Ubuntu 20.04.3 LTS go version go1.17.6 linux/amd64
I just cloned the repo, run
go build
and afther that,go test
. I get the folllowing error,