From 972eda37300670b4152df39cd4dbc10eab226b55 Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 16 Apr 2024 21:22:16 -0400 Subject: [PATCH] Breaking stuff again, this worked before Im adding two outputs from here out. --- docker/fluentd/Dockerfile | 3 ++- docker/fluentd/fluent.conf | 13 +++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/docker/fluentd/Dockerfile b/docker/fluentd/Dockerfile index e39f44d..f22e162 100644 --- a/docker/fluentd/Dockerfile +++ b/docker/fluentd/Dockerfile @@ -4,5 +4,6 @@ USER root COPY go-glitch / RUN chmod 777 /go-glitch COPY fluent.conf /fluentd/etc/ -RUN chown -R fluent:fluent /fluentd && chmod -R 700 /fluentd/etc +RUN chown -R fluent:fluent /fluentd && chmod -R 700 /fluentd/etc && \ + gem install fluent-plugin-gelf USER fluent \ No newline at end of file diff --git a/docker/fluentd/fluent.conf b/docker/fluentd/fluent.conf index 42336aa..cc1ffdd 100644 --- a/docker/fluentd/fluent.conf +++ b/docker/fluentd/fluent.conf @@ -8,10 +8,11 @@ @type parser key_name log reserve_data true - expression /^(?.*)\b(SIGTERM|SEVERE ERROR|FATAL|CRITICAL)\b/i + expression /^(?.*)\b(SIGTERM|SEVERE ERROR|FATAL|CRITICAL)\b/i - +# Route 1: Errors to Glitchtip + # Matches docker logs containing the severity terms @type exec command "/go-glitch" @@ -22,3 +23,11 @@ run_interval 10s + +# Route 2: Unfiltered to stdout + # Catch-all match for logs not matched by the error filter + @type copy # Duplicate to prevent original event modification + + @type stdout + + \ No newline at end of file