Skip to content

Instantly share code, notes, and snippets.

@Harkishen-Singh
Created January 4, 2021 08:48
Show Gist options
  • Save Harkishen-Singh/2b9ac4a3f85ef3df834f3bd9f89297ed to your computer and use it in GitHub Desktop.
Save Harkishen-Singh/2b9ac4a3f85ef3df834f3bd9f89297ed to your computer and use it in GitHub Desktop.
Prometheus with SQL (Postgres) using Promscale and running Promscale on docker

install timescaledb (includes promscale extension)

docker run --name promscale-extension-image -e POSTGRES_PASSWORD=secret -d -p 5431:5432 timescaledev/promscale-extension:latest-pg12 postgres -csynchronous_commit=off

get the IP address of the container running timescaledb

docker inspect {container-ID}

copy the above output

install promscale

docker run --name promscale -d -p 9202:9201 timescale/promscale:0.1.4 -db-password=secret -db-port=5432 -db-name=postgres -db-host={the above copied output of IP address} -db-ssl-mode=allow

this should make your life easier and in prometheus config, add the following options:

remote_write:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment