From 71f0431808a9a6297e36583e712543d3c8632289 Mon Sep 17 00:00:00 2001 From: noah Date: Sun, 23 Jul 2023 22:37:59 -0500 Subject: [PATCH] Removing optlogs, rearranging static_configs to avoid dupe logs --- promtail-agent/promtail/promtail-config.yml | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/promtail-agent/promtail/promtail-config.yml b/promtail-agent/promtail/promtail-config.yml index 883b879..00c6aaa 100644 --- a/promtail-agent/promtail/promtail-config.yml +++ b/promtail-agent/promtail/promtail-config.yml @@ -11,7 +11,12 @@ clients: # local machine logs scrape_configs: - job_name: system - pipeline_stages: + static_configs: + - targets: + - localhost + labels: + job: varlogs + __path__: /var/log/**/**log - job_name: journal journal: max_age: 12h @@ -22,16 +27,3 @@ scrape_configs: target_label: "unit" - source_labels: ["__journal_container_name"] target_label: "container" - static_configs: - - targets: - - localhost - labels: - job: varlogs - __path__: /var/log/**/**log - - targets: - - localhost - labels: - job: containers - __path__: /opt/logs/**/*log # internal container logs - -