Modify `promtail` config for `consul`.
This commit is contained in:
parent
9af4fa19a6
commit
0d9e65359a
|
@ -262,7 +262,7 @@ scrape_configs:
|
||||||
|
|
||||||
pipeline_stages:
|
pipeline_stages:
|
||||||
- match:
|
- match:
|
||||||
selector: '{job="init"} |~ "(apt|Message of the Day|motd-news|Temporary Directories|man-db|fwupd|Firmware update daemon|systemd-tmpfiles-clean.service|Rotate log files|logrotate.service|[Pp]ackage[Kk]it|/run/dbus/system_bus_socket|[Ss]nap|lxd|Reloading|Mount unit|ext4 Metadata|e2scrub_all.service)"'
|
selector: '{job="init"} |~ "(apt|Message of the Day|motd-news|Temporary Directories|man-db|fwupd|Firmware update daemon|systemd-tmpfiles-clean.service|Rotate log files|logrotate.service|[Pp]ackage[Kk]it|/run/dbus/system_bus_socket|[Ss]nap|lxd|Reloading|Mount unit|ext4 Metadata|e2scrub_all.service|docker)"'
|
||||||
stages:
|
stages:
|
||||||
- template:
|
- template:
|
||||||
source: level
|
source: level
|
||||||
|
@ -272,7 +272,7 @@ scrape_configs:
|
||||||
level:
|
level:
|
||||||
|
|
||||||
- match:
|
- match:
|
||||||
selector: '{job="init"} !~ "(apt|Message of the Day|motd-news|Temporary Directories|man-db|fwupd|Firmware update daemon|systemd-tmpfiles-clean.service|Rotate log files|logrotate.service|[Pp]ackage[Kk]it|/run/dbus/system_bus_socket|[Ss]nap|lxd|Reloading|Mount unit|ext4 Metadata|e2scrub_all.service)"'
|
selector: '{job="init"} !~ "(apt|Message of the Day|motd-news|Temporary Directories|man-db|fwupd|Firmware update daemon|systemd-tmpfiles-clean.service|Rotate log files|logrotate.service|[Pp]ackage[Kk]it|/run/dbus/system_bus_socket|[Ss]nap|lxd|Reloading|Mount unit|ext4 Metadata|e2scrub_all.service|docker)"'
|
||||||
stages:
|
stages:
|
||||||
- template:
|
- template:
|
||||||
source: level
|
source: level
|
||||||
|
@ -356,14 +356,14 @@ scrape_configs:
|
||||||
job: consul
|
job: consul
|
||||||
hostname: <%= @HOSTNAME %>
|
hostname: <%= @HOSTNAME %>
|
||||||
level: info
|
level: info
|
||||||
__path__: /var/log/supervisor/consul.log
|
__path__: /var/log/consul/consul-*.log
|
||||||
|
|
||||||
pipeline_stages:
|
pipeline_stages:
|
||||||
- match:
|
- match:
|
||||||
selector: '{job="consul"}'
|
selector: '{job="consul"}'
|
||||||
stages:
|
stages:
|
||||||
- regex:
|
- regex:
|
||||||
expression: '^ +(?P<timestamp>\d+-\d+-[^T]+T\d+:\d+:\d+\.\d+\+\d+) \[(?P<level>[^\]]+)\] *(?P<message>.+)$'
|
expression: '^(?P<timestamp>\d+-\d+-[^T]+T\d+:\d+:\d+\.\d+\+\d+) \[(?P<level>[^\]]+)\] *(?P<message>.+)$'
|
||||||
|
|
||||||
- timestamp:
|
- timestamp:
|
||||||
source: timestamp
|
source: timestamp
|
||||||
|
|
Loading…
Reference in New Issue