From 6fb0e4919811cc51e0b47d2360ef8715c15575af Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Wed, 3 Apr 2024 18:09:31 +0900 Subject: [PATCH] Delete `promtail` config for `nomad`. --- .../nomad/templates/etc/promtail/nomad.yaml | 88 ------------------- 1 file changed, 88 deletions(-) delete mode 100644 cookbooks/nomad/templates/etc/promtail/nomad.yaml diff --git a/cookbooks/nomad/templates/etc/promtail/nomad.yaml b/cookbooks/nomad/templates/etc/promtail/nomad.yaml deleted file mode 100644 index b43a0e9..0000000 --- a/cookbooks/nomad/templates/etc/promtail/nomad.yaml +++ /dev/null @@ -1,88 +0,0 @@ -server: - disable: true - -positions: - filename: /var/opt/promtail/promtail_nomad_position.yaml - -clients: - - url: http://<%= @LOKIENDPOINT %>/loki/api/v1/push - -scrape_configs: - - job_name: nomad - static_configs: - - targets: - - localhost - labels: - job: nomad - hostname: <%= @HOSTNAME %> - __path__: /var/log/nomad.log - - pipeline_stages: - - match: - selector: '{job="nomad"} != "task="' - stages: - - regex: - expression: '^\w+ +[0-9]+ [0-9]+:[0-9]+:[0-9]+ [^ ]+ nomad[^:]+: +(?P\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+\+\d{4}) \[(?P[^\]]+)\] +(?P.*)$' - - - timestamp: - source: timestamp - format: 2006-01-02T15:04:05.000-0700 - location: Asia/Tokyo - - - template: - source: level - template: '{{ ToLower .level }}' - - - labels: - level: - - - output: - source: message - - - match: - selector: '{job="nomad"} |~ "task=.*timestamp="' - stages: - - regex: - expression: '^\w+ +[0-9]+ [0-9]+:[0-9]+:[0-9]+ [^ ]+ nomad[^:]+: +\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+\+\d{4} \[(?P[^\]]+)\] +(?P.*) task=(?P[^ ]+) .* timestamp=(?P\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+\+\d{4})$' - - - timestamp: - source: timestamp - format: 2006-01-02T15:04:05.000-0700 - location: Asia/Tokyo - - - template: - source: level - template: '{{ ToLower .level }}' - - - labels: - level: - task: - - - output: - source: message - - - match: - selector: '{job="nomad"} |~ "task=.*reason="' - stages: - - regex: - expression: '^\w+ +[0-9]+ [0-9]+:[0-9]+:[0-9]+ [^ ]+ nomad[^:]+: +(?P\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}\+\d{4}) \[(?P[^\]]+)\] +(?P.*) task=(?P.*) reason="(?P.*)"$' - - - timestamp: - source: timestamp - format: 2006-01-02T15:04:05.000-0700 - location: Asia/Tokyo - - - template: - source: msg - template: 'Message={{ .message }} Reason={{ .reason }}' - - - template: - source: level - template: '{{ ToLower .level }}' - - - labels: - level: - task: - - - output: - source: msg