From 3e3d5b225d019ce95ca5b4b2bb0f61392f9ebab9 Mon Sep 17 00:00:00 2001 From: YeaChan05 Date: Thu, 20 Jun 2024 19:29:27 +0900 Subject: [PATCH] =?UTF-8?q?[ci]=20loki=20=EC=84=B8=ED=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit loki 세팅 --- loki-config.yml | 37 ++++++++++++++++--------------------- promtail-config.yml | 9 ++++++++- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/loki-config.yml b/loki-config.yml index fe966212..e1ff4290 100644 --- a/loki-config.yml +++ b/loki-config.yml @@ -2,19 +2,18 @@ auth_enabled: false server: http_listen_port: 3100 - grpc_listen_port: 9095 -common: - instance_addr: 127.0.0.1 - path_prefix: /tmp/loki - storage: - filesystem: - chunks_directory: /tmp/loki/chunks - rules_directory: /tmp/loki/rules - replication_factor: 1 - ring: - kvstore: - store: inmemory +ingester: + lifecycler: + address: 127.0.0.1 + ring: + kvstore: + store: inmemory + replication_factor: 1 + final_sleep: 0s + chunk_idle_period: 5m + chunk_retain_period: 30s + max_transfer_retries: 0 schema_config: configs: @@ -28,15 +27,11 @@ schema_config: storage_config: boltdb_shipper: - active_index_directory: /tmp/loki/index - cache_location: /tmp/loki/boltdb-cache + active_index_directory: /loki/index + cache_location: /loki/boltdb-cache shared_store: filesystem filesystem: - directory: /tmp/loki/chunks - -compactor: - working_directory: /tmp/loki/compactor - shared_store: filesystem + directory: /loki/chunks limits_config: enforce_metric_name: false @@ -47,5 +42,5 @@ chunk_store_config: max_look_back_period: 0s table_manager: - retention_deletes_enabled: true - retention_period: 168h + retention_deletes_enabled: false + retention_period: 0s diff --git a/promtail-config.yml b/promtail-config.yml index 0fceee85..fe50e91f 100644 --- a/promtail-config.yml +++ b/promtail-config.yml @@ -15,4 +15,11 @@ scrape_configs: - localhost labels: job: varlogs - __path__: /var/log/*log \ No newline at end of file + __path__: /var/log/*log + - job_name: applications + static_configs: + - targets: + - localhost + labels: + job: applications + __path__: /path/to/your/application/logs/*.log