Page 1 of 1

File globbing syntax

Posted: 09 Oct 2019, 18:26
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?

Re: File globbing syntax

Posted: 09 Oct 2019, 19:17
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 '.'

Re: File globbing syntax

Posted: 11 Oct 2019, 11:22
by ricci
Hello,

thank you very much : BallyBasic79

Cheers,

V R