Compare commits

...

3 Commits

Author SHA1 Message Date
il 7debdfcb93 fix(alloy): fix log level parser
- remove parser for JSON and logfmt, and add regex expression to extract the level of log
2026-04-13 10:42:10 +09:00
il da016343c0 feat(alloy): add json parser to categorize log level 2026-04-12 14:09:44 +09:00
il bf749ebbde chore(chromium): delete the roles from the console playbook 2026-04-12 10:58:07 +09:00
2 changed files with 5 additions and 14 deletions
+1 -9
View File
@@ -115,18 +115,10 @@
become: true
tags: ["init", "site", "install-packages"]
- name: Install CLI tools
- name: Set CLI tools
ansible.builtin.include_role:
name: "console"
tasks_from: "services/set_cli_tools"
apply:
tags: ["init", "site", "tools"]
tags: ["init", "site", "tools"]
- name: Install chromium with font
ansible.builtin.include_role:
name: "console"
tasks_from: "services/set_chromium"
apply:
tags: ["init", "site", "chromium"]
tags: ["init", "site", "chromium"]
@@ -203,12 +203,11 @@ loki.relabel "caddy_relabel" {
loki.process "journal_parser" {
forward_to = [loki.write.loki.receiver]
// Severity parsing
// If content of log includes "level" information, change the level
stage.logfmt {
mapping = {
"content_level" = "level",
}
stage.regex {
// Regex to extract the log level from the content.
expression = "(?i)(?:level[\"\\s:=]+|\\[|\\s|^)(?P<content_level>info|warn|warning|error|debug|fatal|critical|trace)(?:[\"\\]\\s]|$)"
}
stage.labels {
values = {
"level" = "content_level",