[Bro] - BROKER - send messages from bro workers to python listener

Johanna Amann johanna at icir.org
Thu Jun 22 12:34:39 PDT 2017


> I have a cluster and I wish bro workers to notify a single python script
> with a costume text message.
> On the python side I use pybroker.
> Do I need to use listen for the python side and send on the bro side ?
> How does the publishing works ?

This is a twofold question. First - broker has to connect python and Bro.
For that it actually is completely up to you; you can either have python
listen for connections of Bro or vice-versa. The connection is
bidirectional afterwards, it does not matter who established it.

After that, the python side has to subscribe to the correct events, and
the Bro side has to send them.

The best way is to probably look at examples; the best example nowadays
are probably the netcontrol connectors.
is the script that sends out netcontrol events,
https://github.com/bro/bro-netcontrol/blob/master/netcontrol/api.py it the
script that implements the API for listening to events.

Note that the python and Bro API for Broker are not fixed yet and will
change in the future.

I hope this helps a bit,

More information about the Bro mailing list