From 9cb709bdd08204a8edecf15d2b8727ee35076a9f Mon Sep 17 00:00:00 2001 From: Nulo Date: Sun, 19 Feb 2023 12:04:47 -0300 Subject: [PATCH] forgejo: usar mejor logger --- services/forgejo/index.ts | 3 +-- software/fluentbit.ts | 8 ++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/services/forgejo/index.ts b/services/forgejo/index.ts index e8c1d16..85f93d0 100644 --- a/services/forgejo/index.ts +++ b/services/forgejo/index.ts @@ -165,7 +165,6 @@ cd "$HOME" exec chpst -u $USER:$USER /usr/local/bin/forgejo web --config /etc/forgejo.conf 2>&1 `, - // TODO: usar mejor parser - runitLokiLogger(FluentBitParser.Raw, "forgejo") + runitLokiLogger(FluentBitParser.Forgejo, "forgejo") ); } diff --git a/software/fluentbit.ts b/software/fluentbit.ts index 80d82f2..fcc119b 100644 --- a/software/fluentbit.ts +++ b/software/fluentbit.ts @@ -32,17 +32,25 @@ export enum FluentBitParser { Json = "json", // Raw toma todo lo que haya en una lĂ­nea y lo guarda en `message`. No recomendado. Raw = "raw", + + Forgejo = "forgejo", } async function saveParsers(alpine: Alpine): Promise { // https://github.com/fluent/fluent-bit/blob/master/conf/parsers.conf await alpine.writeFile( parsersPath, + // https://rubular.com/ ` [PARSER] name raw format regex regex ^(?.*?)$ + +[PARSER] + name forgejo + format regex + regex ^((?