From 92fd453cc6bff2c95ad44a104e81cc072c4c8fff Mon Sep 17 00:00:00 2001 From: Giacomo Sanchietti Date: Mon, 4 Mar 2024 18:12:53 +0100 Subject: [PATCH] remove loki_path --- imageroot/actions/configure-module/20configure | 4 +--- imageroot/etc/config.yml | 2 +- imageroot/etc/loki.yaml | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/imageroot/actions/configure-module/20configure b/imageroot/actions/configure-module/20configure index 5b27757..1f85ba6 100755 --- a/imageroot/actions/configure-module/20configure +++ b/imageroot/actions/configure-module/20configure @@ -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: @@ -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') diff --git a/imageroot/etc/config.yml b/imageroot/etc/config.yml index 4f68684..d099e7a 100644 --- a/imageroot/etc/config.yml +++ b/imageroot/etc/config.yml @@ -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 diff --git a/imageroot/etc/loki.yaml b/imageroot/etc/loki.yaml index 03b78ff..4813bfd 100644 --- a/imageroot/etc/loki.yaml +++ b/imageroot/etc/loki.yaml @@ -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 @@ -45,4 +44,4 @@ compactor: compaction_interval: 10m retention_enabled: true retention_delete_delay: 1h - retention_delete_worker_count: 150 \ No newline at end of file + retention_delete_worker_count: 150