How to ignore a resource

Community forum to discuss cxs.
If you believe that there is a problem with your cxs installation and want support then, as a paid product, you should use the helpdesk after having consulted the documentation.
9 posts Page 1 of 1
ovan
Junior Member
Posts: 9
Joined: 09 Feb 2014, 12:03


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
Smjork
Junior Member
Posts: 7
Joined: 10 Feb 2014, 08:29


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
ovan
Junior Member
Posts: 9
Joined: 09 Feb 2014, 12:03


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.?
craigedmonds
Junior Member
Posts: 21
Joined: 21 Dec 2010, 09:24


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?
markpap
Junior Member
Posts: 2
Joined: 11 Feb 2011, 00:31


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.
ethical
Junior Member
Posts: 10
Joined: 12 Nov 2010, 01:59


would love to get an answer for this too i tried various ways and nothing has worked yet.
Sarah
Moderator
Posts: 811
Joined: 09 Dec 2006, 22:49


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.
chrismfz
Junior Member
Posts: 20
Joined: 04 Feb 2010, 20:55


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 ?
chrismfz
Junior Member
Posts: 20
Joined: 04 Feb 2010, 20:55


Anyone out there searching for this:
Code: Select all
pfile:/home\/.*\/error_log$
pfile:/home\/.*\/*.log$
9 posts Page 1 of 1