From 2d5f9e66c1c1c2b1db970b564ff0176273a1a727 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 10 Nov 2024 13:09:25 -0600 Subject: [PATCH] chromie: Scrape logs from serial consoles Now that we have the serial terminal server managing `picocom` processes for each serial port, and those `picocom` processes are configured to log console output to files, we can configure Promtail to scrape these log files and send them to Loki. --- host_vars/chromie.pyrocufflink.blue.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/host_vars/chromie.pyrocufflink.blue.yml b/host_vars/chromie.pyrocufflink.blue.yml index 78621d8..d68ab67 100644 --- a/host_vars/chromie.pyrocufflink.blue.yml +++ b/host_vars/chromie.pyrocufflink.blue.yml @@ -18,3 +18,12 @@ serterm_static_windows: serterm_authorized_keys: - sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAINZCN2cxMDwedJ1Ke23Z3CZRcOYjqW8fFqsooRus7RK0AAAABHNzaDo= dustin@rosalina.pyrocufflink.blue - sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIAB6xTCSNz+AcQCWcyVKs84tThXN4wpLgCo2Lc48L6EsAAAABHNzaDo= dustin@luma.pyrocufflink.blue + +promtail_dac_read_search: true +promtail_scrape_configs: +- '{{ promtail_default_scrape.journal }}' +- job_name: serial + static_configs: + - labels: + __path__: /var/log/serial/*.log + job: serial