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 / COPY go-glitch /
RUN chmod 777 /go-glitch RUN chmod 777 /go-glitch
COPY fluent.conf /fluentd/etc/ 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 USER fluent

View File

@ -8,10 +8,11 @@
@type parser @type parser
key_name log key_name log
reserve_data true reserve_data true
expression /^(?<message>.*)\b(SIGTERM|SEVERE ERROR|FATAL|CRITICAL)\b/i expression /^(?<message>.*)\b(SIGTERM|SEVERE ERROR|FATAL|CRITICAL)\b/i
</filter> </filter>
<match docker.**> # Route 1: Errors to Glitchtip
<match docker.**> # Matches docker logs containing the severity terms
@type exec @type exec
command "/go-glitch" command "/go-glitch"
<buffer> <buffer>
@ -22,3 +23,11 @@
</format> </format>
run_interval 10s run_interval 10s
</match> </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>