Match directive not working #4457
-
Describe the bugI have writted one fluentd configuration output as elasticsearch plugin but it's not working as it should work please check the below configurationn |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 2 replies
-
anyone here?? |
Beta Was this translation helpful? Give feedback.
-
@ankit-groverDevops <source>
@type sample
tag xxxx.logs
</source>
<match xxxx.logs>
@type stdout
</match> So, with the information you reported, we can't find what is the cause.
Mayby We can use <source>
@type sample
tag xxxx.logs
</source> <match xxxx.logs>
@type stdout
</match> |
Beta Was this translation helpful? Give feedback.
-
@daipom Thanks for your reply tried this configuration already but it seems that tail logs are comming not stdout one. logs:-
<source>
@type tail
@id tail_resumeparserLogs
tag resumeparser
path "/var/log/containers/rchilli-resumeparser-*.log"
pos_file "/var/log/containers/fluentd-resumeparser.log.pos"
exclude_path ["/var/log/containers/fluentd-*.log"]
refresh_interval 30
read_from_head true
<parse>
@type "json"
time_format "%Y-%m-%dT%H:%M:%S.%NZ"
time_type string
</parse>
</source>
<match resumeparser>
@type stdout
</match>
<system>
log_level debug
</system> |
Beta Was this translation helpful? Give feedback.
-
@daipom You there?? it would be greatly appreciated if you help me out for this |
Beta Was this translation helpful? Give feedback.
-
@daipom if we try ** in match block it works as stdout but if we try to use resumeparser.** it doesnt work . Please help me out if you can otherwise i have to change the whole approach for application logging |
Beta Was this translation helpful? Give feedback.
-
@ankit-groverDevops Sorry for my late response.
Could you show me the stdout? |
Beta Was this translation helpful? Give feedback.
-
@daipom Hi daipom
|
Beta Was this translation helpful? Give feedback.
-
Logs for the ** match
|
Beta Was this translation helpful? Give feedback.
-
@ankit-groverDevops I found the cause! <parse>
@type json
time_format "%Y-%m-%dT%H:%M:%S.%NZ"
time_type string
</parse> If you don't need to parse it, you can read them as is with the following settings. <parse>
@type none
</parse> |
Beta Was this translation helpful? Give feedback.
-
@daipom Thankyou daipom it worked |
Beta Was this translation helpful? Give feedback.
@ankit-groverDevops I found the cause!
This
parse
setting would not be appropriate for the logs.Is the format of the logs really JSON?
If you don't need to parse it, you can read them as is with the following settings.