You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using Filebeat to parse a log file that contains two different types of logs: JSON encoded and PHP logs. We are migrating all of our application code to use the JSON encoded format, but until then we are using the following Filebeat configuration in an attempt to parse the same log file twice, once with a json document type and a second with a php document type. The Filebeat configuration looks like this:
I am noticing that sometimes (it doesnt seem to happen consistently), the log formats get mixed up. For example, I saw a message in Kibana that looks like this:
Looking at the registry file, it looks like there is only a single entry for source == "/mnt/logs/php.log", which made me wonder... is this supposed to work? It's possible that the problem lies in our multiline regex, but the fact that the registry contains only a single entry, despite there being multiple prospectors for this file.
The text was updated successfully, but these errors were encountered:
Harvesting the same file in two different prospectors is not supported. This messes up the state internally and can lead to strange behaviour. For your use case you should use 2 instances of filebeat and make sure, they use a different registry file. I'm closing this issue as it is not a bug but I'm happy to discuss it further on discuss: https://discuss.elastic.co/c/beats/filebeat
We should allow overriding the definition of prospector.
For my encounter with this issue is because I have enabled one generic prospector for *.log in a specific directory.
And later added specialized prospector for one log file from that directory with different different parsing details in config_dir.
What I actually want here is that the generic prospector should pickup files if no specialized prospector defined for them.
But filebeat does not even start, it should atleast ignore that propspector config so I don't miss logs.
We are using Filebeat to parse a log file that contains two different types of logs: JSON encoded and PHP logs. We are migrating all of our application code to use the JSON encoded format, but until then we are using the following Filebeat configuration in an attempt to parse the same log file twice, once with a
json
document type and a second with aphp
document type. The Filebeat configuration looks like this:I am noticing that sometimes (it doesnt seem to happen consistently), the log formats get mixed up. For example, I saw a message in Kibana that looks like this:
Looking at the registry file, it looks like there is only a single entry for
source == "/mnt/logs/php.log"
, which made me wonder... is this supposed to work? It's possible that the problem lies in our multiline regex, but the fact that the registry contains only a single entry, despite there being multiple prospectors for this file.The text was updated successfully, but these errors were encountered: