[Bro] Where do I find broctl error logs?

Azoff, Justin S jazoff at illinois.edu
Wed Aug 31 06:09:12 PDT 2016


> On Aug 31, 2016, at 6:41 AM, Neslog <neslog at gmail.com> wrote:
> 
> I'd like to see some basic broctl error logging also. Right now I'm running additional con jobs for status.  I'd also like to get broctl output logging as it happens. My scripts have to include 2>&1 piped to grep/awk to make it useful.

Starting in 2.4 broctl has an API, there's no reason to pipe it to grep/awk for getting status

# PYTHONPATH=/usr/local/bro/lib/broctl python
>>> from BroControl import broctl
>>> b = broctl.BroCtl()
>>> res = b.status()
>>> res.ok
True
>>> res.success_count
60
>>> for node in res.nodes[:3]: print node
...
(<BroControl.node.Node instance at 0x2376290>, True, {'status': 'running', 'name': 'nids-dev2a-1', 'started': '29 Aug 21:41:04', 'pid': 18025, 'host': '10.1.1.40', 'type': 'worker'})
(<BroControl.node.Node instance at 0x2376320>, True, {'status': 'running', 'name': 'nids-dev2a-2', 'started': '29 Aug 21:41:04', 'pid': 18037, 'host': '10.1.1.40', 'type': 'worker'})
(<BroControl.node.Node instance at 0x2376368>, True, {'status': 'running', 'name': 'nids-dev2a-3', 'started': '29 Aug 21:41:04', 'pid': 18076, 'host': '10.1.1.40', 'type': 'worker'})

-- 
- Justin Azoff




More information about the Bro mailing list