Replies: 1 comment
-
Yes, use this store and copy plugin to get over it. I used this, it allows both file saving as well as email. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All.
Having issue with fluentd and grepcounter and mail. My setup docker that is using fluend as logging driver and then is plan to send log into file(s) for each container. That works fine, but if I want to use grepcounter and mail, then I cannot get log into file.
basic logging works like this and it works fine.
<match taggedservice1.**>
@type copy
@type file
path /var/log/td-agent/app/taggedservice1
time_slice_format %Y%m%d%H
time_slice_wait 10m
time_format %Y%m%dT%H%M%S%z
compress gzip
utc
@type stdout
This works fine, but If I add grepcounter, then I will lose ability to log into file like this:
<match taggedservice1.**>
@type grepcounter
count_interval 10 # The time window for counting errors (in secs)
input_key message # The field to apply the regular expression
regexp "Action send failed"
threshold 2 # The minimum number of errors to trigger an alert
add_tag_prefix catastrofic_error # Generate tags like "error_5xx.apache.access"#
@type stdout
<match catastrofic_error.taggedservice1.**>
@type copy
@type mail
host 127.0.0.1 # Change this to your SMTP server host
port 25 # Normally 25/587/465 are used for submission
enable_starttls_auto true # Use this option to enable STARTTLS
from [email protected] # Set the sender address
to [email protected] # Set the recipient address
subject ‘service failed multiple times ()’
message Total Service error count: %s\n\nPlease check environment ASAP
message_out_keys count # Use the "count" field to replace "%s" above
@type stdout
So, when using grepcounter I will lose ability to get log into files and same time email alerts. any workarounds for that issue?
Sorry for stupid question..
Eero
Beta Was this translation helpful? Give feedback.
All reactions