Apologies for the silly question, but I am trying to work out where ELSA is getting all it's logs from.
I have had my system crash once due to full disk space. Once it has been re-booted, it appears that most of the disk space is used by the "/nsm/elsa/data/elsa/tmp/buffers" direcrory.
According to the elsa config file, this is the dir where logs are stored before being processed.
I had a quick look at some of the files in the dir, and I noticed that there are a huge amount of lines in these files with windows related details along with lines mentioning Argus and other things.
Now, the Argus lines I can understand as security-onion runs argus, but the windows things i am confused about.
The only thing that makes sense to me is that these log entries are being pulled off the interfaces that are being monitored as this box is not a windows box, and i have not configured anything to specifically send log data to it.
Also, the sheer volume of the logs is surprising, as the buffers dir mentioned above used up 1.6tb of 1.8tb on the /nsm mount, in a matter of days max.
So simple question is where does all the log data for elsa come from?
Also, is there a way to make sure the /nsm/elsa/data/elsa/tmp/buffers directory does not fill up the disk again?
I have the cleanup setting set to 80% so i would have thought that would keep the size down.
Thanks
Allan
--
You received this message because you are subscribed to the Google Groups "security-onion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to security-onio...@googlegroups.com.
To post to this group, send email to securit...@googlegroups.com.
Visit this group at http://groups.google.com/group/security-onion.
For more options, visit https://groups.google.com/groups/opt_out.
On Tuesday, 18 February 2014 13:42:19 UTC+11, Doug Burks wrote:
> > # ls /nsm/elsa/data/elsa/tmp/buffers | wc -l
>
> > 9737
>
>
>
> This is abnormally high and most likely means that logs are no longer
>
> being processed. A possible culprit is a MySQL table marked as
>
> crashed. Have you had any ungraceful shutdowns?
>
Currently the only ungraceful shutdown was yesterday (or the day before).
I came in and found that the server was un-responsive, loaded the console and it had crashed, I forced a re-boot and then found that /nsm was full. I just manually removed about 500gb of the logs from the elsa tmp directory and then posted the question.
I am not sure if something stopped working causing the logs to stop being processed, or if i just had too many logs at once and it filled up the disk before it could all be processed.
I suspect the former, but have no easy way to tell.
> Please try the following:
>
> sudo mysqlcheck -A
>
Everything responds "OK" other than this:
syslog_data.syslogs_archive_1
Error : Can't find file: 'syslogs_archive_1' (errno: 2)
status : Operation failed
Regards
Allan
syslog_data.syslogs_archive_1
Error : Can't find file: 'syslogs_archive_1' (errno: 2)
status : Operation failed
I will have a look over the elsa doco and see if there is a way to sort it.
Allan
On Thursday, 20 February 2014 00:28:17 UTC+11, Doug Burks wrote:
Ok, so I have done some reading on the ELSA mail group and found a solution.
The first suggestion was to try to repair the table:
mysql -uroot syslog_data -e "REPAIR TABLE syslogs_archive_1"
This gave me the error that it could not find the table.
Something I confirmed with a "show tables;" command in the syslog_data dabase.
From there, I followed advice of dropping the table (even though it didnt exist) and removing it from the syslog.tables metadata table:
mysql -uroot syslog_data -e "DROP TABLE syslog_data.syslogs_archive_1"
mysql -uroot syslog_data -e "DELETE FROM syslog.tables WHERE table_name='syslog_data.syslogs_archive_1'"
I then re-started syslog-ng (Elsa restarts with a syslog-ng restart and attempts to re-create tables), and then checked mysql again, but still the same issue.
I did some more reading and there was a suggestion to remove the actual files used for the tables.
I did a quick "ls /nsm/elsa/data/elsa/mysql/" and sure enough there were a couple of files called syslogs_archive_1*
I promptly re-ran the mysql drop table and delete from commands, then removed the physical files, and re-started syslog-ng and it seems to be processing logs again.
The file count has dropped over 100 in the past 3 hours so it looks like it will be a long time but it is working.
Final Command sequence:
mysql -uroot syslog_data -e "DROP TABLE syslog_data.syslogs_archive_1"
mysql -uroot syslog_data -e "DELETE FROM syslog.tables WHERE table_name='syslog_data.syslogs_archive_1'"
sudo rm /nsm/elsa/data/elsa/mysql/syslogs_archive_1*
sudo service syslog-ng restart
Obviously, you will lose all the data that the table stores, but for me it was that or re-install Security Onion.
Hope that helps someone else out sometime.
Also, please feel free to let me know of any other possible solutions or ways to detect and fix this with out dropping tables.
Allan
Except, in my case, there is another wrinkle...
I came across this thread while troubleshooting a large number of files in
/nsm/elsa/data/elsa/buffers ( 39,000 files ! ), and NULL values for ELSA Date Range from sostat.
sudo mysqlcheck -A revealed the same results as shown by Hurgh above:
syslog_data.syslogs_archive_1
Error : Can't find file: 'syslogs_archive_1' (errno: 2)
status : Operation failed
The dates covered by these buffer files were April 1 through April 28.
After DROPPING syslog_data.syslogs_archive_1, DELETEing, and restarting syslog-ng ( as above ), the number of files in /nsm/elsa/data/elsa/buffers dropped to about half the number it was before ( this took some time ), and mysqlcheck was now happy.
ll /nsm/elsa/data/elsa/mysql/ now looks like this:
-rw-rw---- 1 mysql mysql 157524426 Apr 30 05:25 syslogs_archive_10000101.ARZ
-rw-rw---- 1 mysql mysql 569343439 Apr 30 05:03 syslogs_archive_1.ARZ
-rw-rw---- 1 mysql mysql 931077884 Apr 30 05:25 syslogs_index_10000053.MYD
-rw-rw---- 1 mysql mysql 50106368 Apr 30 05:25 syslogs_index_10000053.MYI
-rw-rw---- 1 mysql mysql 3170916900 Apr 29 06:28 syslogs_index_1.MYD
-rw-rw---- 1 mysql mysql 144172032 Apr 30 05:25 syslogs_index_1.MYI
/nsm/elsa/data/elsa/tmp/buffers:
Still has 19K files in it, and the dates covered by these files is April 1 through April 15, so only the second half of the 39K files were processed as expected, leaving 19K files unprocessed.
So the question is "why are the first half of April's files still stuck in queue ?"
Specifically:
1. What impact does this have, having a bunch of elsa buffer files that appear to be orphaned ?
2. Is there anything I can do to get these files processed normally ?
https://groups.google.com/forum/#!topic/security-onion/MHf2ogdm3l4