Open aukfood opened 9 months ago
@aukfood: Thanks for opening an issue, it is currently awaiting triage.
In the meantime, you can:
Did you try the steps of expanding the inotify
limit?
How many files do you have within folders? because what is the value of monitoring really old files that wont be written too again?
@LaurenceJJones yes I try this : https://discourse.crowdsec.net/t/problem-config-for-acquisition/1257/4
With 8192 and
fs.inotify.max_user_instances=16384
And same error.
I have more than 13594 files :
# ls -la /var/www/*/var/log/apache2/ |wc -l
13594
@LaurenceJJones there is another solution ?
@LaurenceJJones there is another solution ?
Not really, reduce the amount of logs that match the globing pattern as CrowdSec is monitoring old files that will never be used.
Unless @blotus has anymore ideas?
yes I think I have to modify my acquisition to match the daily file and not old files
@LaurenceJJones it's possible in acquisition to have this format ?
---
filenames:
- /var/www/*/var/log/apache2/access.%Y.%m.%d
- /var/www/*/var/log/apache2/error.%Y.%m.%d
labels:
type: apache2
Hello @aukfood,
Can you try to increase more (at least double) the max amount of user watches ?
You have around 13k files, but crowdsec will also add a watch on each file by default to get notified where there's a new line (you can disable this behavior by setting poll_without_inotify: true
, but crowdsec will revert to calling stat()
very frequently on each file, which will make your CPU usage explode.
@blotus I try 32000 but no results.
Where to add poll_without_inotify: true ??? I try in section common in config.yaml
@blotus I try 32000 but no results.
Where to add poll_without_inotify: true ??? I try in section common in config.yaml
You add it like this
---
filenames:
- /var/www/*/var/log/apache2/access*
- /var/www/*/var/log/apache2/error*
poll_without_inotify: true
labels:
type: apache2
@LaurenceJJones @blotus no change with 32000 files and poll_without_inotify: true
poll_without_inotify: true
@LaurenceJJones @blotus no change with 32000 files and poll_without_inotify: true
poll_without_inotify: true
And you dont have any duplicate entries?
cat /etc/crowdsec/acquis.yaml
cat /etc/crowdsec/acquis.d/*.yaml
@LaurenceJJones no i have no configuration in acquis.d directory
cat /etc/crowdsec/acquis.d/*.yaml
cat: '/etc/crowdsec/acquis.d/*.yaml': Aucun fichier ou dossier de ce type
What happened?
When I start to run crowdsec I have these error
What did you expect to happen?
A normal start of crowdsec :)
How can we reproduce it (as minimally and precisely as possible)?
We add acquisition for all apache log of all web site
Anything else we need to know?
No response
Crowdsec version
OS version
Enabled collections and parsers
Acquisition config
Config show
Prometheus metrics
Related custom configs versions (if applicable) : notification plugins, custom scenarios, parsers etc.
Best regards