Closed dajoen closed 8 years ago
It does read and tail valid unified2 format binary files from both Snort and Suricata. I see this error message in your log messages:
2016/06/06 15:17:56.802475 u2spoolandpublish.go:96: CRIT U2SpoolAndPublish: unexpected error: 'unexpected EOF'
Usually this means the file named snort.log.???
is not a valid unified2 or is corrupt.
Have you verified the file using U2SpewFoo, and that your /etc/snort/snort.conf
file contains:
output unified2: filename snort.log, limit 128, mpls_event_types, vlan_event_types
Thanks, I had those defined. But after further investigation I've had to disable some options in the default CentOS configuration in order for the output in unified2 to work. Changed those, and it is working now. Although I'm running into a new problem.
2016/06/08 13:53:08.398994 u2beat.go:123: INFO Setup: Rules warnings: 0 multiple line rules rejected, 9441 duplicate rules rejected 2016/06/08 13:53:08.399019 u2beat.go:124: INFO Setup: Rules stats: 122 rule files read, 8756 rules created 2016/06/08 13:53:08.400264 u2beat.go:140: INFO Setup: registrar: registry file: "/usr/lib/golang/src/github.com/cleesmith/unifiedbeat/.unifiedbeat" 2016/06/08 13:53:08.400290 u2beat.go:141: INFO Setup: registrar: file source: "/var/log/snort/snort.log" 2016/06/08 13:53:08.400303 u2beat.go:142: INFO Setup: registrar: file offset: 122965 2016/06/08 13:53:08.400566 beat.go:267: INFO unifiedbeat sucessfully setup. Start running. 2016/06/08 13:53:08.400585 u2beat.go:148: INFO Run: start spooling and publishing... 2016/06/08 13:53:08.400598 u2spoolandpublish.go:52: INFO U2SpoolAndPublish: spooling and publishing... fatal error: runtime: out of memory
runtime stack: runtime.throw(0xb595c0, 0x16) /usr/local/go/src/runtime/panic.go:530 +0x90 runtime.sysMap(0xc822800000, 0x1cac0000, 0x0, 0x13bf518) /usr/local/go/src/runtime/mem_linux.go:206 +0x9b runtime.(_mheap).sysAlloc(0xe90ec0, 0x1cac0000, 0x175360e88) /usr/local/go/src/runtime/malloc.go:429 +0x191 runtime.(_mheap).grow(0xe90ec0, 0xe560, 0x0) /usr/local/go/src/runtime/mheap.go:651 +0x63 runtime.(_mheap).allocSpanLocked(0xe90ec0, 0xe55f, 0x40de24) /usr/local/go/src/runtime/mheap.go:553 +0x4f6 runtime.(_mheap).alloc_m(0xe90ec0, 0xe55f, 0x100000000, 0x100e93150) /usr/local/go/src/runtime/mheap.go:437 +0x119 runtime.(_mheap).alloc.func1() /usr/local/go/src/runtime/mheap.go:502 +0x41 runtime.systemstack(0xc820123ee0) /usr/local/go/src/runtime/asm_amd64.s:307 +0xab runtime.(_mheap).alloc(0xe90ec0, 0xe55f, 0x10100000000, 0x7f1779427198) /usr/local/go/src/runtime/mheap.go:503 +0x63 runtime.largeAlloc(0x1cabcbbf, 0x1, 0x7f17752ca6e0) /usr/local/go/src/runtime/malloc.go:766 +0xb3 runtime.mallocgc.func3() /usr/local/go/src/runtime/malloc.go:664 +0x33 runtime.systemstack(0xc820019500) /usr/local/go/src/runtime/asm_amd64.s:291 +0x79 runtime.mstart() /usr/local/go/src/runtime/proc.go:1048
I'll if I can tweak that, and open a new ticket if needed.
I,m testing unifiedbeat and am whondering if it is working with my snort setup.
The beat quits with the following log:
This is my config:
I would expect the beat to keep running and tail the current snort log file.