Breaking stuff again, this worked before Im adding two outputs from here out.

This commit is contained in:
Colin 2024-04-16 21:22:16 -04:00
parent c5b3687854
commit 972eda3730
2 changed files with 13 additions and 3 deletions

View File

@ -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

View File

@ -8,10 +8,11 @@
@type parser
key_name log
reserve_data true
expression /^(?<message>.*)\b(SIGTERM|SEVERE ERROR|FATAL|CRITICAL)\b/i
expression /^(?<message>.*)\b(SIGTERM|SEVERE ERROR|FATAL|CRITICAL)\b/i
</filter>
<match docker.**>
# Route 1: Errors to Glitchtip
<match docker.**> # Matches docker logs containing the severity terms
@type exec
command "/go-glitch"
<buffer>
@ -22,3 +23,11 @@
</format>
run_interval 10s
</match>
# Route 2: Unfiltered to stdout
<match **> # Catch-all match for logs not matched by the error filter
@type copy # Duplicate to prevent original event modification
<store>
@type stdout
</store>
</match>