Closed jerome83136 closed 8 years ago
Hello,
Update:
It seems that if I make the configuration like bellow it works:
output {
if [p0x] == 'p01' {
file {
idle_timeout => 600
path => '/central_logs/output/prod/webservers/#{type}/#{type}_#{p0x}.#{now:YYYYMMDD}.log'
}
}
if [p0x] == 'p03' {
file {
idle_timeout => 600
path => '/central_logs/output/prod/webservers/#{type}/#{type}_#{p0x}.#{now:YYYYMMDD}.log'
}
}
if [p0x] == 'p04' {
file {
idle_timeout => 600
path => '/central_logs/output/prod/webservers/#{type}/#{type}_#{p0x}.#{now:YYYYMMDD}.log'
}
}
[...]
Best regards Jérôme
Please see https://github.com/bpaquet/node-logstash/commit/a8e0b4bce96198ac14a801f17ccab96c0f48e629.
I just added tags and fields management. This can be a cleaner solution to solve your initial problem.
Just great ! Thank you very much
Hello,
I'm using Grok custom patterns to match my logs and output them in files
My config looks like this:
The Grok's patterns file:
It works. I have several output files created, with the correct name. But I get a number of the following errors when I launch node-logstash:
I think some messages does not match the Grok patterns, so they don't have the ${p0x} field populated; preventing node-logstash from writing to the correct output file.
Am I right ? If yes, is there a way to drop non-matching messages ? (I want only the matching messages to be processed)
Many thanks for your help
Best regards Jérôme