File globbing syntax

Post Reply
ricci
Junior Member
Posts: 2
Joined: 09 Oct 2019, 18:03

File globbing syntax

Post by ricci »

Hello,

I ' d like to know if inside:

Code: Select all

/etc/csf/csf.conf
I can use the following syntax for file globbing:

Code: Select all

...
...
# Log file locations
#
# File globbing is allowed for the following logs. However, be aware that the
# more files lfd has to track, the greater the performance hit
#
# Note: File globs are only evaluated when lfd is started
#
...
...
APACHE_LOG = "/var/www/vhosts/*/*/logs/*_log"
NGINX_LOG = "/var/log/nginx/*.log"
...
...

Is LFD able to read/lead those log files?

BallyBasic79
Junior Member
Posts: 80
Joined: 22 Aug 2019, 21:43

Re: File globbing syntax

Post by BallyBasic79 »

APACHE_LOG and NGINX_LOG do not appear to be valid CSF constants. You cannot add these to csf.conf. But there is a feature for this;

Code: Select all

###############################################################################
# SECTION:Log Scanner
###############################################################################
# Log Scanner. This feature will send out an email summary of the log lines of
# each log listed in /etc/csf/csf.logfiles. All lines will be reported unless
# they match a regular expression in /etc/csf/csf.logignore
#
# File globbing is supported for logs listed in /etc/csf/csf.logfiles. However,
# be aware that the more files lfd has to track, the greater the performance
# hit. Note: File globs are only evaluated when lfd is started
#
# Note: lfd builds the report continuously from lines logged after lfd has
# started, so any lines logged when lfd is not running will not be reported
# (e.g. during reboot). If lfd is restarted, then the report will include any
# lines logged during the previous lfd logging period that weren't reported
#
# 1 to enable, 0 to disable
LOGSCANNER = "1"
... [more settings] ...
Be sure to escape the period in regex. As in '\.' and not '.'

ricci
Junior Member
Posts: 2
Joined: 09 Oct 2019, 18:03

Re: File globbing syntax

Post by ricci »

Hello,

thank you very much : BallyBasic79

Cheers,

V R

Post Reply