Skip to content

Commit

Permalink
feat: add deployment config example
Browse files Browse the repository at this point in the history
  • Loading branch information
thobianchi committed Sep 7, 2021
1 parent bd7a21d commit 865a6e8
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 42 deletions.
7 changes: 0 additions & 7 deletions deploy/after_install.sh

This file was deleted.

18 changes: 0 additions & 18 deletions deploy/cortex-tenant.deb.service

This file was deleted.

1 change: 0 additions & 1 deletion deploy/cortex-tenant.env

This file was deleted.

14 changes: 6 additions & 8 deletions deploy/cortex-tenant.rpm.service
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
[Unit]
Description=Cortex-Tenant
Documentation=https://github.com/blind-oracle/cortex-tenant
Documentation=https://github.com/mia-platform/cortex-tenant
Wants=network-online.target
After=network-online.target

[Service]
Restart=always
User=cortex-tenant
EnvironmentFile=/etc/sysconfig/cortex-tenant
ExecStart=/usr/sbin/cortex-tenant -config $CONFIG_FILE
Restart=on-failure
User=gitlab-prometheus
Environment=AUTH_USER_PASS=user:password
ExecStart=/usr/bin/cortex-tenant -config /etc/cortex-tenant.yml
ExecReload=/bin/kill -HUP $MAINPID
TimeoutStopSec=30
SendSIGKILL=no
WorkingDirectory=/var/lib/cortex-tenant
TimeoutStopSec=65

[Install]
WantedBy=multi-user.target
30 changes: 22 additions & 8 deletions deploy/cortex-tenant.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
listen: 0.0.0.0:8080
target: http://127.0.0.1:9091/receive
log_level: warn
timeout: 10s
# Where to listen for incoming write requests from Prometheus
listen: 0.0.0.0:8034
# Profiling API, remove to disable
listen_pprof: 0.0.0.0:7008
# Where to send the modified requests (Cortex)
target: https://example.com/api/v1/push
# Log level
log_level: info
# HTTP request timeout
timeout: 60s
# Timeout to wait on shutdown to allow load balancers detect that we're going away.
# During this period after the shutdown command the /alive endpoint will reply with HTTP 503.
# Set to 0s to disable.
timeout_shutdown: 60s

tenant:
label: __tenant__
label_remove: true
header: X-Scope-OrgID
default: default
query_interval: 60
# To which header to add the tenant ID
header: X-Scope-OrgId
# Which tenant ID to use if the label is missing in any of the timeseries
# If this is not set or empty then the write request with missing tenant label
# will be rejected with HTTP code 400
default: example
batch_size: 500

0 comments on commit 865a6e8

Please sign in to comment.