Merge branch 'accumulated-modification-on-promtail' of kazu634/itamae into master
This commit is contained in:
commit
00cd4e09a8
|
@ -21,8 +21,10 @@ scrape_configs:
|
||||||
- match:
|
- match:
|
||||||
selector: '{job="loki"}'
|
selector: '{job="loki"}'
|
||||||
stages:
|
stages:
|
||||||
- regex:
|
- drop:
|
||||||
|
expression: 'entry out of order'
|
||||||
|
|
||||||
|
- regex:
|
||||||
expression: '^[^ ]+ +[0-9]+ [0-9]+:[0-9]+:[0-9]+ [^ ]+ loki[^ ]+ .*level=(?P<level>[^ ]+) ts=(?P<timestamp>[^ ]+) (?P<message>.+)$'
|
expression: '^[^ ]+ +[0-9]+ [0-9]+:[0-9]+:[0-9]+ [^ ]+ loki[^ ]+ .*level=(?P<level>[^ ]+) ts=(?P<timestamp>[^ ]+) (?P<message>.+)$'
|
||||||
|
|
||||||
- timestamp:
|
- timestamp:
|
||||||
|
|
|
@ -35,7 +35,7 @@ scrape_configs:
|
||||||
|
|
||||||
- template:
|
- template:
|
||||||
source: level
|
source: level
|
||||||
template: '{{ regexReplaceAllLiteral "(2|3)[0-9]+" .Value "info" }}'
|
template: '{{ regexReplaceAllLiteral "(1|2|3)[0-9]+" .Value "info" }}'
|
||||||
|
|
||||||
- template:
|
- template:
|
||||||
source: level
|
source: level
|
||||||
|
|
|
@ -32,7 +32,7 @@ scrape_configs:
|
||||||
selector: '{job="sudo"} |~ "/bin/sh"'
|
selector: '{job="sudo"} |~ "/bin/sh"'
|
||||||
stages:
|
stages:
|
||||||
- drop:
|
- drop:
|
||||||
expression: (CRON|sshd|session|securetty)
|
expression: (CRON|sshd|session|securetty|systemd-logind)
|
||||||
- regex:
|
- regex:
|
||||||
expression: '^(?P<timestamp>\w+ +[0-9]+ [0-9]+:[0-9]+:[0-9]+) [^ ]+ sudo: +(?P<user>[^ ]+) : TTY=(?P<tty>[^ ]+) ; PWD=(?P<pwd>[^ ]+) ; USER=(?P<foo>[^ ]+) ; COMMAND=(?P<cmd>.+)$'
|
expression: '^(?P<timestamp>\w+ +[0-9]+ [0-9]+:[0-9]+:[0-9]+) [^ ]+ sudo: +(?P<user>[^ ]+) : TTY=(?P<tty>[^ ]+) ; PWD=(?P<pwd>[^ ]+) ; USER=(?P<foo>[^ ]+) ; COMMAND=(?P<cmd>.+)$'
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ scrape_configs:
|
||||||
selector: '{job="sudo"} !~ "/bin/sh"'
|
selector: '{job="sudo"} !~ "/bin/sh"'
|
||||||
stages:
|
stages:
|
||||||
- drop:
|
- drop:
|
||||||
expression: (CRON|sshd|session|securetty)
|
expression: (CRON|sshd|session|securetty|systemd-logind)
|
||||||
- regex:
|
- regex:
|
||||||
expression: '^(?P<timestamp>\w+ +[0-9]+ [0-9]+:[0-9]+:[0-9]+) [^ ]+ sudo: +(?P<user>[^ ]+) : TTY=(?P<tty>[^ ]+) ; PWD=(?P<pwd>[^ ]+) ; USER=(?P<foo>[^ ]+) ; COMMAND=(?P<cmd>.+)$'
|
expression: '^(?P<timestamp>\w+ +[0-9]+ [0-9]+:[0-9]+:[0-9]+) [^ ]+ sudo: +(?P<user>[^ ]+) : TTY=(?P<tty>[^ ]+) ; PWD=(?P<pwd>[^ ]+) ; USER=(?P<foo>[^ ]+) ; COMMAND=(?P<cmd>.+)$'
|
||||||
|
|
||||||
|
@ -210,6 +210,10 @@ scrape_configs:
|
||||||
- match:
|
- match:
|
||||||
selector: '{job="promtail"}'
|
selector: '{job="promtail"}'
|
||||||
stages:
|
stages:
|
||||||
|
|
||||||
|
- drop:
|
||||||
|
expression: 'entry out of order'
|
||||||
|
|
||||||
- regex:
|
- regex:
|
||||||
expression: '^[^ ]+ +[0-9]+ [0-9]+:[0-9]+:[0-9]+ [^ ]+ promtail[^ ]+ .*ts=(?P<timestamp>[^ ]+) (?P<message>.+)$'
|
expression: '^[^ ]+ +[0-9]+ [0-9]+:[0-9]+:[0-9]+ [^ ]+ promtail[^ ]+ .*ts=(?P<timestamp>[^ ]+) (?P<message>.+)$'
|
||||||
|
|
||||||
|
@ -258,7 +262,7 @@ scrape_configs:
|
||||||
|
|
||||||
pipeline_stages:
|
pipeline_stages:
|
||||||
- match:
|
- match:
|
||||||
selector: '{job="init"} |~ "(apt|Message of the Day|Temporary Directories)"'
|
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)"'
|
||||||
stages:
|
stages:
|
||||||
- template:
|
- template:
|
||||||
source: level
|
source: level
|
||||||
|
@ -268,7 +272,7 @@ scrape_configs:
|
||||||
level:
|
level:
|
||||||
|
|
||||||
- match:
|
- match:
|
||||||
selector: '{job="init"} !~ "(apt|Message of the Day|Temporary Directories)"'
|
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)"'
|
||||||
stages:
|
stages:
|
||||||
- template:
|
- template:
|
||||||
source: level
|
source: level
|
||||||
|
|
Loading…
Reference in New Issue