Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimized log watching for multiple filters on the same log file #776

Open
szepeviktor opened this issue Aug 6, 2014 · 12 comments
Open

Comments

@szepeviktor
Copy link
Member

Does fail2ban open a log file twice if I set up two jails for the same log with different filters?

@yarikoptic
Copy link
Member

yes AFAIK

@szepeviktor
Copy link
Member Author

It would be nice to have a logic that optimizes this.

@yarikoptic
Copy link
Member

agree

@szepeviktor
Copy link
Member Author

I am very weak in python, debugging at most.
Do you know someone who can design the logic and implement it?

@szepeviktor
Copy link
Member Author

1/2 solution
Should I merge filters temporarily?

@yarikoptic
Copy link
Member

if it hurts you so badly I guess you could indeed manually merge those

@szepeviktor
Copy link
Member Author

Thank you!
I think it saves some disk load.
Do you plan to implement it or should I close this?

@yarikoptic
Copy link
Member

On Tue, 19 Aug 2014, Viktor Szépe wrote:

I think it save some disk load.
unlikely since most probably those would be cached anyways at that point
upon initial read

Do you plan to implement it or should I close this?

it can stay open since it is a valid enhancement request, so may be
someone decides to jump on

Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Research Scientist, Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834 Fax: +1 (603) 646-1419
WWW: http://www.linkedin.com/in/yarik

@szepeviktor
Copy link
Member Author

Maybe someone would be glad to have this feature in fail2ban.

@szepeviktor szepeviktor changed the title optimized log watching optimized log watching for multiple filters on the same log file Aug 19, 2014
@leeclemens
Copy link
Contributor

suggest close this 'issue', if using inotify (pyinotify) this is irrelevant. A watch is added and signals used to notify fail2ban to reexamine - so the log isn't really 'open' (use lsof to test). This is kernel level, so suggestions to 'save some disk load' should be directed to kernel-dev's.

@szepeviktor
Copy link
Member Author

Now what I do is merge filters for the same log files by hand. Actually joining regexps.

@sebres
Copy link
Contributor

sebres commented Jul 3, 2017

just to link #1379

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants