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

Truncate /var/log/syslog, or read from end? #9

Open
MatthewClarkMay opened this issue Feb 14, 2017 · 3 comments
Open

Truncate /var/log/syslog, or read from end? #9

MatthewClarkMay opened this issue Feb 14, 2017 · 3 comments

Comments

@MatthewClarkMay
Copy link
Owner

If there are residual logs in /var/log/syslog, they will all be processed by DataServer.py when initialized. I would prefer if it only processed real time events.

Two options:

  1. Truncate /var/log/syslog when DataServer.py is initialized.
  2. Start reading from end of /var/log/syslog.

Thoughts/Ideas?

@diegodblr
Copy link
Contributor

I liked the second option

@zaxfenfeiyu
Copy link

I like the first, truncate the syslog when run DataServer.py once time.
And I also do that.
The syslog.py can run all the time, even restart DataServer.py several times.
And if never truncate the syslog,it will be bigger and bigger.

@diegodblr
Copy link
Contributor

The log files should not be modified in my opinion. Better work on the application so it reads only the new data and not from start to finish how it is done. Another interesting option I make here is to transfer the log that arrives in syslog to a specific file. This makes things easier because it does not mix attack logs with system logs, access, etc ... It is possible by editing the configuration file of your log system and put something like this:

if $fromhost-ip startswith '192.168.0.2' then /var/log/snort.log

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

No branches or pull requests

3 participants