FIlebeat various log paths

Hello,

We have the following structrure in our services :

/var/www/hosts/sys/www.customer1.com/logs/access_log
/var/www/hosts/sys/www.customer2.com/logs/access_log
/var/www/hosts/sys/www.customer3.com/logs/access_log
/var/www/hosts/sys/www.customer4.com/logs/access_log

and it expanded to thousands.
The question is:
How Im going to define those path’s via Filebeat in Graylog config ?
I tried the following , but it didnt work:

filebeat.inputs:

  • input_type: log
    paths:
    • /var/www/hosts/sys/*_log

Any ideas?

Wouldn’t that be:

filebeat.inputs:
- input_type: log
  paths:
    - /var/www/hosts/sys/www.*.com/logs/access_log
  type: log

Where the wildcard is the customer1, customer2, customer3…

(Notice how I used the forum formatting tools </> to make it look nice?)

1 Like

Thanks a lot for your reply!
Could you please also check this directory structrure:

/var/www/hosts/sys/w6050.panelcontr.domain.gr/logs/access_log
/var/www/hosts/sys/w4050.panelcontr.domain.gr/logs/access_log
/var/www/hosts/sys/w1030.panelcontr.domain.gr/logs/access_log
/var/www/hosts/sys/w1120.panelcontr.domain.gr/logs/access_log

According to your post , wouldn’t be:

/var/www/hosts/sys/w*.panelcontr.domain.gr/logs/access_log

Is that correct ?

That looks correct to me - based on what is said here:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.