Skip to content

Commit

Permalink
remove loki_path
Browse files Browse the repository at this point in the history
  • Loading branch information
gsanchietti committed Mar 4, 2024
1 parent cbb26fe commit 92fd453
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 1 addition & 3 deletions imageroot/actions/configure-module/20configure
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,12 @@ server_address = request["ovpn_network"].removesuffix('.0') + '.1'
with open('promtail.env', 'w') as promtail:
promtail.write('LOKI_ADDR=127.0.0.1\n')
promtail.write(f'LOKI_HTTP_PORT={ports[5]}\n')
promtail.write(f'LOKI_PATH={config["loki_path"]}\n')
promtail.write(f'PROMTAIL_ADDRESS={server_address}\n')
promtail.write(f'PROMTAIL_PORT={ports[4]}\n')

with open('loki.env', 'w') as lfp:
lfp.write(f"LOKI_HTTP_PORT={ports[5]}\n")
lfp.write(f"LOKI_GRPC_PORT={ports[6]}\n")
lfp.write(f"LOKI_PATH={config['loki_path']}\n")
lfp.write(f"LOKI_RETENTION={request.get('loki_rentention', '180')}d\n") # retention in days

with open('grafana.env', 'w') as gfp:
Expand Down Expand Up @@ -149,7 +147,7 @@ with open('local.yml', 'w') as fp:
fp.write(' type: loki\n')
fp.write(' uid: loki\n')
fp.write(' access: proxy\n')
fp.write(f' url: http://127.0.0.1:{ports[5]}{config["loki_path"]}\n')
fp.write(f' url: http://127.0.0.1:{ports[5]}\n')

network = agent.read_envfile('network.env')
tun = network.get('OVPN_TUN')
Expand Down
2 changes: 1 addition & 1 deletion imageroot/etc/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ server:
disable: true

clients:
- url: http://${LOKI_ADDR}:${LOKI_HTTP_PORT}${LOKI_PATH}/loki/api/v1/push
- url: http://${LOKI_ADDR}:${LOKI_HTTP_PORT}/loki/api/v1/push

positions:
filename: /tmp/positions.yaml
Expand Down
3 changes: 1 addition & 2 deletions imageroot/etc/loki.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ server:
grpc_listen_port: ${LOKI_GRPC_PORT}
http_listen_address: 127.0.0.1
grpc_listen_address: 127.0.0.1
http_path_prefix: ${LOKI_PATH}

common:
instance_addr: 127.0.0.1
Expand Down Expand Up @@ -45,4 +44,4 @@ compactor:
compaction_interval: 10m
retention_enabled: true
retention_delete_delay: 1h
retention_delete_worker_count: 150
retention_delete_worker_count: 150

0 comments on commit 92fd453

Please sign in to comment.