diff options
author | George Rawlinson | 2021-04-06 22:34:35 +0000 |
---|---|---|
committer | George Rawlinson | 2021-04-06 22:34:35 +0000 |
commit | 18fd2d03e0832394dadf375a8566961bb0e1e41b (patch) | |
tree | f02052326cc39ab56d7a8ddb6c1d740259a87e54 | |
parent | bc6bb0523e1d720e882714431cd9abbc1b0de24b (diff) | |
download | aur-18fd2d03e0832394dadf375a8566961bb0e1e41b.tar.gz |
upgpkg: promscale 0.3.0-1
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 33 | ||||
-rw-r--r-- | promscale.conf | 101 |
3 files changed, 99 insertions, 45 deletions
@@ -1,7 +1,7 @@ pkgbase = promscale pkgdesc = An open source analytical platform for Prometheus metrics - pkgver = 0.2.1 - pkgrel = 2 + pkgver = 0.3.0 + pkgrel = 1 url = https://github.com/timescale/promscale arch = x86_64 license = Apache @@ -11,14 +11,14 @@ pkgbase = promscale optdepends = prometheus optdepends = promscale_extension backup = etc/conf.d/promscale - source = promscale-0.2.1.tar.gz::https://github.com/timescale/promscale/archive/0.2.1.tar.gz + source = promscale-0.3.0.tar.gz::https://github.com/timescale/promscale/archive/0.3.0.tar.gz source = promscale.service source = promscale.sysusers.conf source = promscale.conf - b2sums = 8a2cdf2d252f22b7e89cca27c54687ecd43ab636b5719812005a1796957ea729eb210cb585014e449c434d17ccea85ed6b4894f34caec59262516b54a7977159 + b2sums = b0f25128107a21368d28da462897accf10ba048b5b4de4ff9db39dd1157710063f626a515faf0316b701c382eef7fc7fa8ca452bc20ddb2b0593baf0edb05331 b2sums = 23a357e2fd252d1f6c1cd8d3cd4174bdd27d0ae5035f5afd08ac377405868ad0cc5d782fb5a73fcfdbd7169361e2c4b639aa096ebfe2d9adf95ffc1e26caa3b1 b2sums = 2fae9c07cd255528a1c87062650956b857caa8a3c656b59e85d740f527433f510a8fe18025e03480d9145673e6dd03867d60ead5a48044353262105a173cbbfd - b2sums = 44b673203d0d2fa3af9f7e9bce8c6aefd61f14cde9dff2a261132ab99f2433940f37a9b70c49a234689a4277b7240ec411a38b9708001f49114a960d0770d7ed + b2sums = 2495de270a7037dc51ea8b6e75742f07fd98995da4f928aaeb2b5d3ef41094f9fa8a5cd1836fc05c246192255c34c85bb80a056e12986094b4f80634e1450237 pkgname = promscale @@ -1,8 +1,8 @@ # Maintainer: George Rawlinson <george@rawlinson.net.nz> pkgname=promscale -pkgver=0.2.1 -pkgrel=2 +pkgver=0.3.0 +pkgrel=1 pkgdesc="An open source analytical platform for Prometheus metrics" arch=('x86_64') url="https://github.com/timescale/promscale" @@ -10,32 +10,36 @@ license=(Apache) depends=(glibc) makedepends=(go) checkdepends=() -optdepends=(timescaledb - prometheus - promscale_extension) +optdepends=( + timescaledb + prometheus + promscale_extension +) backup=("etc/conf.d/promscale") source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz" "$pkgname.service" "$pkgname.sysusers.conf" "$pkgname.conf") -b2sums=('8a2cdf2d252f22b7e89cca27c54687ecd43ab636b5719812005a1796957ea729eb210cb585014e449c434d17ccea85ed6b4894f34caec59262516b54a7977159' +b2sums=('b0f25128107a21368d28da462897accf10ba048b5b4de4ff9db39dd1157710063f626a515faf0316b701c382eef7fc7fa8ca452bc20ddb2b0593baf0edb05331' '23a357e2fd252d1f6c1cd8d3cd4174bdd27d0ae5035f5afd08ac377405868ad0cc5d782fb5a73fcfdbd7169361e2c4b639aa096ebfe2d9adf95ffc1e26caa3b1' '2fae9c07cd255528a1c87062650956b857caa8a3c656b59e85d740f527433f510a8fe18025e03480d9145673e6dd03867d60ead5a48044353262105a173cbbfd' - '44b673203d0d2fa3af9f7e9bce8c6aefd61f14cde9dff2a261132ab99f2433940f37a9b70c49a234689a4277b7240ec411a38b9708001f49114a960d0770d7ed') + '2495de270a7037dc51ea8b6e75742f07fd98995da4f928aaeb2b5d3ef41094f9fa8a5cd1836fc05c246192255c34c85bb80a056e12986094b4f80634e1450237') prepare() { cd "$pkgname-$pkgver" + mkdir build_output go mod vendor } build() { - cd "$pkgname-$pkgver/cmd/$pkgname" + cd "$pkgname-$pkgver" go build -v \ -buildmode=pie \ -trimpath \ -mod=vendor \ -modcacherw \ - -ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" + -ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" \ + -o build_output ./cmd/... } package() { @@ -46,6 +50,13 @@ package() { # environment variable file install -Dm640 "$srcdir/$pkgname.conf" "$pkgdir/etc/conf.d/$pkgname" - # binary - install -Dm755 -t "$pkgdir/usr/bin" "$pkgname-$pkgver/cmd/$pkgname/$pkgname" + # documentation + install -Dm644 "$pkgname-$pkgver/cmd/prom-migrator/README.md" "$pkgdir/usr/share/doc/$pkgname/prom-migrator.md" + install -Dm644 "$pkgname-$pkgver/README.md" "$pkgdir/usr/share/doc/$pkgname/README.md" + cp -r "$pkgname-$pkgver/docs" "$pkgdir/usr/share/doc/$pkgname" + + # binaries + install -Dm755 -t "$pkgdir/usr/bin" \ + "$pkgname-$pkgver/build_output/$pkgname" \ + "$pkgname-$pkgver/build_output/prom-migrator" } diff --git a/promscale.conf b/promscale.conf index 9e67078107a4..d87b7903a7db 100644 --- a/promscale.conf +++ b/promscale.conf @@ -2,54 +2,97 @@ PROMSCALE_ARGS="" # Available arguments and environment variables: -# +# -app string +# 'app' sets application_name in database connection string. This is helpful during debugging when looking at pg_stat_activity. [PROMSCALE_APP] [TS_PROM_APP] (default "promscale@0.3.0") # -async-acks -# Ack before data is written to DB [TS_PROM_ASYNC_ACKS] +# Acknowledge asynchronous inserts. If this is true, the inserter will not wait after insertion of metric data in the database. This increases throughput at the cost of a small chance of data loss. [PROMSCALE_ASYNC_ACKS] [TS_PROM_ASYNC_ACKS] +# -auth-password string +# Authentication password used for web endpoint authentication. This flag should be set together with auth-username. It is mutually exclusive with auth-password-file and bearer-token flags. [PROMSCALE_AUTH_PASSWORD] [TS_PROM_AUTH_PASSWORD] +# -auth-password-file string +# Path for auth password file containing the actual password used for web endpoint authentication. This flag should be set together with auth-username. It is mutually exclusive with auth-password and bearer-token methods. [PROMSCALE_AUTH_PASSWORD_FILE] [TS_PROM_AUTH_PASSWORD_FILE] +# -auth-username string +# Authentication username used for web endpoint authentication. Disabled by default. [PROMSCALE_AUTH_USERNAME] [TS_PROM_AUTH_USERNAME] +# -bearer-token string +# Bearer token (JWT) used for web endpoint authentication. Disabled by default. Mutually exclusive with bearer-token-file and basic auth methods. [PROMSCALE_BEARER_TOKEN] [TS_PROM_BEARER_TOKEN] +# -bearer-token-file string +# Path of the file containing the bearer token (JWT) used for web endpoint authentication. Disabled by default. Mutually exclusive with bearer-token and basic auth methods. [PROMSCALE_BEARER_TOKEN_FILE] [TS_PROM_BEARER_TOKEN_FILE] +# -config string +# YAML configuration file path for Promscale. [PROMSCALE_CONFIG] [TS_PROM_CONFIG] (default "config.yml") # -db-connect-retries int -# How many times to retry connecting to the database [TS_PROM_DB_CONNECT_RETRIES] +# Number of retries Promscale should make for establishing connection with the database. [PROMSCALE_DB_CONNECT_RETRIES] [TS_PROM_DB_CONNECT_RETRIES] +# -db-connection-timeout duration +# Timeout for establishing the connection between Promscale and TimescaleDB. [PROMSCALE_DB_CONNECTION_TIMEOUT] [TS_PROM_DB_CONNECTION_TIMEOUT] (default 1m0s) # -db-connections-max int -# maximum connections that can be open at once, defaults to 80% of the max the DB can handle [TS_PROM_DB_CONNECTIONS_MAX] (default -1) +# Maximum number of connections to the database that should be opened at once. It defaults to 80% of the maximum connections that the database can handle. [PROMSCALE_DB_CONNECTIONS_MAX] [TS_PROM_DB_CONNECTIONS_MAX] (default -1) # -db-host string -# The TimescaleDB host [TS_PROM_DB_HOST] (default "localhost") +# Host for TimescaleDB/Vanilla Postgres. [PROMSCALE_DB_HOST] [TS_PROM_DB_HOST] (default "localhost") # -db-name string -# The TimescaleDB database [TS_PROM_DB_NAME] (default "timescale") +# Database name. [PROMSCALE_DB_NAME] [TS_PROM_DB_NAME] (default "timescale") # -db-password string -# The TimescaleDB password [TS_PROM_DB_PASSWORD] +# Password for connecting to TimescaleDB/Vanilla Postgres. [PROMSCALE_DB_PASSWORD] [TS_PROM_DB_PASSWORD] # -db-port int -# The TimescaleDB port [TS_PROM_DB_PORT] (default 5432) +# TimescaleDB/Vanilla Postgres connection password. [PROMSCALE_DB_PORT] [TS_PROM_DB_PORT] (default 5432) # -db-ssl-mode string -# The TimescaleDB connection ssl mode [TS_PROM_DB_SSL_MODE] (default "require") +# TimescaleDB/Vanilla Postgres connection ssl mode. If you do not want to use ssl, pass 'allow' as value. [PROMSCALE_DB_SSL_MODE] [TS_PROM_DB_SSL_MODE] (default "require") +# -db-statements-cache +# Whether database connection pool should use cached prepared statements. Disable if using PgBouncer [PROMSCALE_DB_STATEMENTS_CACHE] [TS_PROM_DB_STATEMENTS_CACHE] (default true) +# -db-uri postgres://postgres:password@localhost:5432/timescale?sslmode=require +# TimescaleDB/Vanilla Postgres DB URI. Example DB URI postgres://postgres:password@localhost:5432/timescale?sslmode=require [PROMSCALE_DB_URI] [TS_PROM_DB_URI] # -db-user string -# The TimescaleDB user [TS_PROM_DB_USER] (default "postgres") +# TimescaleDB/Vanilla Postgres user. [PROMSCALE_DB_USER] [TS_PROM_DB_USER] (default "postgres") # -db-writer-connection-concurrency int -# maximum number of database connections per go process writing to the database [TS_PROM_DB_WRITER_CONNECTION_CONCURRENCY] (default 4) -# -install-timescaledb -# Install or update the TimescaleDB extension [TS_PROM_INSTALL_TIMESCALEDB] (default true) +# Maximum number of database connections for writing per go process. [PROMSCALE_DB_WRITER_CONNECTION_CONCURRENCY] [TS_PROM_DB_WRITER_CONNECTION_CONCURRENCY] (default 4) +# -enable-ha +# Enable external_labels based HA. [PROMSCALE_ENABLE_HA] [TS_PROM_ENABLE_HA] +# -install-extensions +# Install TimescaleDB, Promscale extension. [PROMSCALE_INSTALL_EXTENSIONS] [TS_PROM_INSTALL_EXTENSIONS] (default true) # -labels-cache-size uint -# maximum number of labels to cache [TS_PROM_LABELS_CACHE_SIZE] (default 10000) +# Maximum number of labels to cache. [PROMSCALE_LABELS_CACHE_SIZE] [TS_PROM_LABELS_CACHE_SIZE] (default 10000) # -leader-election-pg-advisory-lock-id int -# Unique advisory lock id per adapter high-availability group. Set it if you want to use leader election implementation based on PostgreSQL advisory lock. [TS_PROM_LEADER_ELECTION_PG_ADVISORY_LOCK_ID] -# -leader-election-pg-advisory-lock-prometheus-timeout slack -# Adapter will resign if there are no requests from Prometheus within a given timeout (0 means no timeout). Note: make sure that only one Prometheus instance talks to the adapter. Timeout value should be co-related with Prometheus scrape interval but add enough slack to prevent random flips. [TS_PROM_LEADER_ELECTION_PG_ADVISORY_LOCK_PROMETHEUS_TIMEOUT] (default -1ns) +# (DEPRECATED) Leader-election based high-availability. It is based on PostgreSQL advisory lock and requires a unique advisory lock ID per high-availability group. Only a single connector in each high-availability group will write data at one time. A value of 0 disables leader election. [PROMSCALE_LEADER_ELECTION_PG_ADVISORY_LOCK_ID] [TS_PROM_LEADER_ELECTION_PG_ADVISORY_LOCK_ID] +# -leader-election-pg-advisory-lock-prometheus-timeout duration +# (DEPRECATED) Prometheus timeout duration for leader-election high-availability. The connector will resign if the associated Prometheus instance does not respond within the given timeout. This value should be a low multiple of the Prometheus scrape interval, big enough to prevent random flips. [PROMSCALE_LEADER_ELECTION_PG_ADVISORY_LOCK_PROMETHEUS_TIMEOUT] [TS_PROM_LEADER_ELECTION_PG_ADVISORY_LOCK_PROMETHEUS_TIMEOUT] (default -1ns) +# -leader-election-scheduled-interval duration +# (DEPRECATED) Interval at which scheduled election runs. This is used to select a leader and confirm that we still holding the advisory lock. [PROMSCALE_LEADER_ELECTION_SCHEDULED_INTERVAL] [TS_PROM_LEADER_ELECTION_SCHEDULED_INTERVAL] (default 5s) # -log-format string -# The log format to use [ "logfmt", "json" ]. [TS_PROM_LOG_FORMAT] (default "logfmt") +# The log format to use [ 'logfmt', 'json' ]. [PROMSCALE_LOG_FORMAT] [TS_PROM_LOG_FORMAT] (default "logfmt") # -log-level string -# The log level to use [ "error", "warn", "info", "debug" ]. [TS_PROM_LOG_LEVEL] (default "debug") +# Log level to use from [ 'error', 'warn', 'info', 'debug' ]. [PROMSCALE_LOG_LEVEL] [TS_PROM_LOG_LEVEL] (default "debug") +# -memory-target value +# Target for max amount of memory to use. Specified in bytes or as a percentage of system memory (e.g. 80%). [PROMSCALE_MEMORY_TARGET] [TS_PROM_MEMORY_TARGET] (default 80%) # -metrics-cache-size uint -# maximum number of metric names to cache [TS_PROM_METRICS_CACHE_SIZE] (default 10000) +# Maximum number of metric names to cache. [PROMSCALE_METRICS_CACHE_SIZE] [TS_PROM_METRICS_CACHE_SIZE] (default 10000) # -migrate string -# Update the Prometheus SQL to the latest version. Valid options are: [true, false, only] [TS_PROM_MIGRATE] (default "true") +# Update the Prometheus SQL schema to the latest version. Valid options are: [true, false, only]. [PROMSCALE_MIGRATE] [TS_PROM_MIGRATE] (default "true") +# -promql-default-subquery-step-interval duration +# Default step interval to be used for PromQL subquery evaluation. This value is used if the subquery does not specify the step value explicitly. Example: <metric_name>[30m:]. Note: in Prometheus this setting is set by the evaluation_interval option. [PROMSCALE_PROMQL_DEFAULT_SUBQUERY_STEP_INTERVAL] [TS_PROM_PROMQL_DEFAULT_SUBQUERY_STEP_INTERVAL] (default 1m0s) +# -promql-enable-feature string +# [EXPERIMENTAL] Enable optional PromQL features, separated by commas. These are disabled by default in Promscale's PromQL engine. Currently, this includes 'promql-at-modifier' and 'promql-negative-offset'. For more information, see https://github.com/prometheus/prometheus/blob/master/docs/disabled_features.md [PROMSCALE_PROMQL_ENABLE_FEATURE] [TS_PROM_PROMQL_ENABLE_FEATURE] +# -promql-query-timeout duration +# Maximum time a query may take before being aborted. This option sets both the default and maximum value of the 'timeout' parameter in '/api/v1/query.*' endpoints. [PROMSCALE_PROMQL_QUERY_TIMEOUT] [TS_PROM_PROMQL_QUERY_TIMEOUT] (default 2m0s) # -read-only -# Read-only mode. Don't write to database. Useful when pointing adapter to read replica [TS_PROM_READ_ONLY] -# -scheduled-election-interval duration -# Interval at which scheduled election runs. This is used to select a leader and confirm that we still holding the advisory lock. [TS_PROM_SCHEDULED_ELECTION_INTERVAL] (default 5s) +# Read-only mode for the connector. Operations related to writing or updating the database are disallowed. It is used when pointing the connector to a TimescaleDB read replica. [PROMSCALE_READ_ONLY] [TS_PROM_READ_ONLY] +# -series-cache-initial-size uint +# Maximum number of series to cache. [PROMSCALE_SERIES_CACHE_INITIAL_SIZE] [TS_PROM_SERIES_CACHE_INITIAL_SIZE] (default 250000) +# -series-cache-max-bytes value +# Initial number of elements in the series cache. Specified in bytes or as a percentage of the memory-target (e.g. 50%). [PROMSCALE_SERIES_CACHE_MAX_BYTES] [TS_PROM_SERIES_CACHE_MAX_BYTES] (default 50%) +# -tls-cert-file string +# TLS Certificate file for web server, leave blank to disable TLS. [PROMSCALE_TLS_CERT_FILE] [TS_PROM_TLS_CERT_FILE] +# -tls-key-file string +# TLS Key file for web server, leave blank to disable TLS. [PROMSCALE_TLS_KEY_FILE] [TS_PROM_TLS_KEY_FILE] # -tput-report int -# interval in seconds at which throughput should be reported [TS_PROM_TPUT_REPORT] +# Interval in seconds at which throughput should be reported. [PROMSCALE_TPUT_REPORT] [TS_PROM_TPUT_REPORT] +# -upgrade-extensions +# Upgrades TimescaleDB, Promscale extensions. [PROMSCALE_UPGRADE_EXTENSIONS] [TS_PROM_UPGRADE_EXTENSIONS] (default true) +# -upgrade-prerelease-extensions +# Upgrades to pre-release TimescaleDB, Promscale extensions. [PROMSCALE_UPGRADE_PRERELEASE_EXTENSIONS] [TS_PROM_UPGRADE_PRERELEASE_EXTENSIONS] # -use-schema-version-lease -# Prevent race conditions during migration [TS_PROM_USE_SCHEMA_VERSION_LEASE] (default true) +# Use schema version lease to prevent race conditions during migration. [PROMSCALE_USE_SCHEMA_VERSION_LEASE] [TS_PROM_USE_SCHEMA_VERSION_LEASE] (default true) # -web-cors-origin string -# Regex for CORS origin. It is fully anchored. Example: 'https?://(domain1|domain2)\.com' [TS_PROM_WEB_CORS_ORIGIN] (default ".*") +# Regex for CORS origin. It is fully anchored. Example: 'https?://(domain1|domain2)\.com' [PROMSCALE_WEB_CORS_ORIGIN] [TS_PROM_WEB_CORS_ORIGIN] (default ".*") +# -web-enable-admin-api +# Allow operations via API that are for advanced users. Currently, these operations are limited to deletion of series. [PROMSCALE_WEB_ENABLE_ADMIN_API] [TS_PROM_WEB_ENABLE_ADMIN_API] # -web-listen-address string -# Address to listen on for web endpoints. [TS_PROM_WEB_LISTEN_ADDRESS] (default ":9201") +# Address to listen on for web endpoints. [PROMSCALE_WEB_LISTEN_ADDRESS] [TS_PROM_WEB_LISTEN_ADDRESS] (default ":9201") # -web-telemetry-path string -# Address to listen on for web endpoints. [TS_PROM_WEB_TELEMETRY_PATH] (default "/metrics") +# Web endpoint for exposing Promscale's Prometheus metrics. [PROMSCALE_WEB_TELEMETRY_PATH] [TS_PROM_WEB_TELEMETRY_PATH] (default "/metrics") |