Anyone using Bro doctor plugin?

Hi all,

I have enable bro doctor plugin in my Zeek 3.0.3 cluster and I see the following error:

Hi there,

Traceback (most recent call last):
  File "/opt/zeek/lib/zeek/plugins/packages/bro-doctor/doctor.py", line 596, in cmd_custom
    results.ok = f() and results.ok
  File "/opt/zeek/lib/zeek/plugins/packages/bro-doctor/doctor.py", line 457, in check_connection_distribution
    variance = reduce(lambda var, cnt: var + (cnt - mean)**2, nodes.values(), 0) / len(nodes)
NameError: name 'reduce' is not defined

This particular error may be related to a Python 2 / Python 3 issue:
reduce() was a built-in in Python 2 and is part of the functools
module in Python3.

Hope this helps,

Pierre

Sorry about that, I just pushed 2.0.3 that fixes that issue.

Many thanks Justin ... I will try asap.

Hi Justin,

Same problem:

And errors appears with reporter also:

Gah, looks like there are still some stupid python3 issues. I could have sworn I fixed all of those a while back… Must have been in a branch I never finished.

Changing the “{” to b"{" in read_bro_log should fix that immediate issue.

I’ll see about getting this fixed and tested better this weekend.

Looks like I did finish it, but I might have missed the final git
push, oops :slight_smile: I merged in the recent changes and pushed a new tag
2.0.4 that has the python3 fixes from December, so everything should
be working like it's supposed to now.

Many thanks Justin ... It is working ok now ...