Change `level` and the regular expression.

This commit is contained in:
Kazuhiro MUSASHI 2020-09-23 00:02:22 +09:00
parent a5b9a41124
commit bfbf20e80f
1 changed files with 2 additions and 1 deletions

View File

@ -328,6 +328,7 @@ scrape_configs:
labels:
job: consul
hostname: <%= @HOSTNAME %>
level: info
__path__: /var/log/supervisor/consul.log
pipeline_stages:
@ -335,7 +336,7 @@ scrape_configs:
selector: '{job="consul"}'
stages:
- 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:
source: timestamp