Hello Jochen;

When I used snippets, I see the snippet is appended to the end of the 
filebeats config, like so:

filebeat:
  prospectors:
  - document_type: apache_domlogs
    fields:
      gl2_source_collector: 084fabcd-fb99-4001-a5a6-ddd86f90e5a7
    ignore_older: 0
    input_type: log
    paths:
    - /etc/httpd/domlogs/*
    scan_frequency: 10s
    tail_files: true

exclude_files: "\\-bytes_log$"

I think this way the exclude is not applied to a specific prospect, while I 
need this to be applied only to a specific prospector. 

Could you tell me how do I apply the snippet only to the type 
apache_domlogs?

Best Regards

On Tuesday, October 4, 2016 at 5:55:01 PM UTC+2, Jochen Schalanda wrote:
>
> Hi Ahmed,
>
> you can try doing this using a custom snippet (see 
> http://docs.graylog.org/en/2.1/pages/collector_sidecar.html#snippets).
>
> Cheers,
> Jochen
>
> On Friday, 30 September 2016 21:03:35 UTC+2, Ahmed Shibani wrote:
>>
>> Hello;
>>
>> Is it possible to exclude files based on a regular expression when 
>> creating a Beats input in GrayLog 2.1?
>>
>> For example, my current filebeat input looks like this:
>>
>> filebeat:
>>   prospectors:
>>   - document_type: apache_domlogs
>>     fields:
>>       gl2_source_collector: 084fabcd-fb99-4001-a5a6-ddd86f90e5a7
>>     ignore_older: 0
>>     input_type: log
>>     paths:
>>     - /etc/httpd/domlogs/*
>>     scan_frequency: 10s
>>     tail_files: true
>>
>>
>> What I would like to achieve is to exclude all files in the 
>> /etc/httpd/domlogs/ that ends with "bytes_log", something like this:
>>
>> filebeat:
>>   prospectors:
>>   - document_type: apache_domlogs
>>     fields:
>>       gl2_source_collector: 084fabcd-fb99-4001-a5a6-ddd86f90e5a7
>>     ignore_older: 0
>>     input_type: log
>>     paths:
>>     - /etc/httpd/domlogs/*
>>     exclude_files: "\\-bytes_log$"
>>     scan_frequency: 10s
>>     tail_files: true
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Graylog Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/graylog2/5865e09d-c659-4593-8995-b71729ad191f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to