Page 1 of 1

How to ignore a resource

Posted: 09 Feb 2014, 12:09
by ovan
Hello,

I am a newbie in CXS, and i've just bought CXS several days ago for my web server.
i got this log messages

Feb 9 18:44:08 ovan cxswatch[29138]: WARNING: '/home/online/public_html/mobile_version/error_log' scanned 6 times in the last 30 seconds, you might want to ignore this resource
Feb 9 18:44:08 ovan cxswatch[29138]: Ignoring file for the next 300 seconds: '/home/online/public_html/mobile_version/error_log'
Feb 9 18:49:57 ovan cxswatch[29138]: WARNING: '/home/online/public_html/mobile_version/error_log' scanned 6 times in the last 30 seconds, you might want to ignore this resource
Feb 9 18:49:57 ovan cxswatch[29138]: Ignoring file for the next 300 seconds: '/home/online/public_html/mobile_version/error_log'
Feb 9 18:55:24 ovan cxswatch[29138]: WARNING: '/home/online/public_html/mobile_version/error_log' scanned 6 times in the last 30 seconds, you might want to ignore this resource
Feb 9 18:55:24 ovan cxswatch[29138]: Ignoring file for the next 300 seconds: '/home/online/public_html/mobile_version/error_log'

I know that there is a mistake in the mobile versin web and cause that error_log, how to ignore this resource.? so i can safe my cpu resource instead of letting cxs keep scanning it all the time.

Thak you

Re: How to ignore a resource

Posted: 10 Feb 2014, 08:45
by Smjork
Take a look at the documentation on how to ignore specific things.
Also take a look at cxs.ignore.sample file, specifically this:

# hfile: - ignore file relative to a users homedir

Most probably you need to put this in your cxs.ignore file:

hfile:/public_html/mobile_version/error_log

Re: How to ignore a resource

Posted: 10 Feb 2014, 10:31
by ovan
Smjork wrote:Take a look at the documentation on how to ignore specific things.
Also take a look at cxs.ignore.sample file, specifically this:

# hfile: - ignore file relative to a users homedir

Most probably you need to put this in your cxs.ignore file:

hfile:/public_html/mobile_version/error_log
Thank you, it works :)

but i still got a warning messages like this :
Ignoring file for the next 300 seconds

how to ignore it permanently.?

Re: How to ignore a resource

Posted: 22 Dec 2015, 07:54
by craigedmonds
I would like to ignore all error_log under /home/*/public_html/

Reason being is that I have 400 sites on my server and tailing the csx log is a nightmare as it shows all the error logs.

Any ideas what syntax I need to use in the ignore file?

Re: How to ignore a resource

Posted: 12 Feb 2016, 22:29
by markpap
craigedmonds wrote:I would like to ignore all error_log under /home/*/public_html/

Reason being is that I have 400 sites on my server and tailing the csx log is a nightmare as it shows all the error logs.

Any ideas what syntax I need to use in the ignore file?

I have the same question.... Any reply will be appreciated!
Thanks in advanced.

Re: How to ignore a resource

Posted: 21 May 2016, 00:57
by ethical
would love to get an answer for this too i tried various ways and nothing has worked yet.

Re: How to ignore a resource

Posted: 21 May 2016, 11:16
by Sarah
To ignore files that match a particular string like a filename (such as "error_log" in particular user directory paths), you should use the keyword pfile: and construct a regular expression that matches all the files you want cxs to ignore without matching files that you do NOT want cxs to ignore. There are many online resources for building and testing regular expressions, including:

https://regex101.com/
http://www.regular-expressions.info/

Here is an example (this is ONLY an example, I am NOT recommending you use it, it may not work and it probably is not the best regular expression to use), which could be added to an ignore file to match /home/username/public_html/anypath/error_log

Code: Select all

pfile:\/home\/.*\/public_html\/.*\/error_log$
You also need to make sure you have configured cxs to use the ignore file (by adding "--ignore [path to ignore file] to your cxs command line, for example in /etc/cxs/cxswatch.sh) and that you restart cxswatch anytime you modify the file /etc/cxs/cxswatch.sh.

Re: How to ignore a resource

Posted: 29 Oct 2019, 22:16
by chrismfz
I know this is old but still I didn't find anything to exclude/ignore error_log and error.log.
error_log isn't generated only in public_html, but in subfolders too.
And not only inside public_html (hfile) back outside of it too (if Addon domains are outside public_html for example).

So I am looking how to exclude / match exactly error_log from anywhere. Someone did it ?

Re: How to ignore a resource

Posted: 30 Oct 2019, 09:36
by chrismfz
Anyone out there searching for this:

Code: Select all

pfile:/home\/.*\/error_log$
pfile:/home\/.*\/*.log$