Closed slayer01 closed 8 years ago
Unifiedbeat is based on an older clone of Filebeat. The beats team have made many changes to filebeat since Nov 2015. Some of their changes affect how many files remain open and for how long. Once both libbeat and filebeat settle down, I will apply those changes to unifiedbeat.
Go, in general, and all of the beats do use cpu/memory resources as much as possible ... it's seen as a feature usually. Filebeat is/was aggressive about prospecting/harvesting files ... perhaps some of the config settings can lessen it's behavior. I haven't noticed the high cpu usage to adversely affect the sensor's ability to capture alerts. Have you?
Typically, with snort/suricata once a unified2 log file rotates no new data is ever added, so this is probably a change that is needed for unifiedbeat. Filebeat is focused on syslogs so it's behavior is different. Therefore, I will leave this as an open issue that needs attention. Thanks.
I downloaded Filebeat 1.1.0 and there is less cpu usage (almost zero after indexing), but there are still at least 9 threads always running:
top - 02:52:27 up 82 days, 10:46, 3 users, load average: 0.04, 0.03, 0.05
Threads: 209 total, 1 running, 208 sleeping, 0 stopped, 0 zombie
%Cpu0 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu1 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu2 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu3 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 16361156 total, 8233220 used, 8127936 free, 220088 buffers
KiB Swap: 16703484 total, 0 used, 16703484 free. 2912640 cached Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
27380 elastic+ 20 0 7901496 4.434g 24888 S 0.0 28.4 0:00.06 java
27381 elastic+ 20 0 7901496 4.434g 24888 S 0.0 28.4 0:00.06 java
27870 elastic+ 20 0 7901496 4.434g 24888 S 0.0 28.4 0:08.37 java
28384 elastic+ 20 0 7901496 4.434g 24888 S 0.0 28.4 0:00.00 java
28415 root 20 0 286460 11940 4564 S 0.0 0.1 0:00.04 filebeat
28416 root 20 0 286460 11940 4564 S 0.0 0.1 0:00.04 filebeat
28417 root 20 0 286460 11940 4564 S 0.0 0.1 0:00.02 filebeat
28418 root 20 0 286460 11940 4564 S 0.0 0.1 0:00.03 filebeat
28419 root 20 0 286460 11940 4564 S 0.0 0.1 0:00.00 filebeat
28420 root 20 0 286460 11940 4564 S 0.0 0.1 0:00.00 filebeat
28421 root 20 0 286460 11940 4564 S 0.0 0.1 0:00.03 filebeat
28422 root 20 0 286460 11940 4564 S 0.0 0.1 0:00.02 filebeat
28423 root 20 0 286460 11940 4564 S 0.0 0.1 0:00.02 filebeat
509 syslog 20 0 255840 5092 1052 S 0.0 0.0 0:00.02 rsyslogd
So it looks like I need to spend some time applying the most recent changes from filebeat to unifiedbeat. This is a side project so I am not sure when I get to do those changes.
yes, your top looks much better. Looking forward to update with your changes. thanks
Version 2 is no longer a clone of filebeat. Filebeat, while great for syslogs, was not appropriate for spooling/indexing unified2 files. It now uses less resources. Let me know if you notice anything.
dear cleesmith,
first of all, thank you very much for your effort.
I installed unifiedbeat on my snort box, my snort version is 2.9.8.0 its running on centos 7. Actually there are two unified log files:
an top looks like this:
so you see up to 15 unifiedbeat threads, first 5-10 use cpu about 20 - 70%. Is that normal behaviour?
Here is my unifiedbeat.yml