# Bro 2.5.4

**URL:** <https://community.zeek.org/t/bro-2-5-4/5570>\
**Category:** Development\
**Tags:** development\
**Created:** [January 3, 2019, 4:01pm UTC](https://community.zeek.org/t/bro-2-5-4/5570 "2019-01-03T16:01:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajput\_Jawad\_CONTR](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@Rajput\_Jawad\_CONTR](https://community.zeek.org/u/Rajput_Jawad_CONTR)\
**Post date:** [January 3, 2019, 4:01pm UTC](https://community.zeek.org/t/bro-2-5-4/5570/1 "2019-01-03T16:01:28Z")

</div>

Hello All,

Is there a way to add Bro server hostname field into all the Bro log types? We have 5 Bro servers capturing traffic on different network nodes, we are trying to add each server/sensor hostname into all the log types so analyst can identify where the logs are coming from.

v/r  
Jawad Rajput

---

<div class="post-metadata">

**Author:** ![seth](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/seth/32/642_2.png) [@seth](https://community.zeek.org/u/seth)\
**Post date:** [January 24, 2019, 6:10pm UTC](https://community.zeek.org/t/bro-2-5-4/5570/2 "2019-01-24T18:10:50Z")

</div>

Yes!

We added a log extension mecahnism a while ago. Here’s a snippet you could start from…

```auto
option my_server_name = "";

type MyLogExtension: record {
        server_name: string &log;
};

function add_my_log_extension(path: string): MyLogExtension
        {
        return MyLogExtension($server_name = my_server_name);
        }

redef Log::default_ext_func = add_my_log_extension;

```

.Seth

---

<div class="post-metadata">

**Author:** ![Rajput\_Jawad\_CONTR](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@Rajput\_Jawad\_CONTR](https://community.zeek.org/u/Rajput_Jawad_CONTR)\
**Post date:** [January 26, 2019, 4:23pm UTC](https://community.zeek.org/t/bro-2-5-4/5570/3 "2019-01-26T16:23:44Z")

</div>

Thanks a lot Seth, it worked out.

v/r

Jawad

---

<div class="post-metadata">

**Author:** ![Aashish\_Sharma1](https://avatars.discourse-cdn.com/v4/letter/a/a88e57/32.png) [@Aashish\_Sharma1](https://community.zeek.org/u/Aashish_Sharma1)\
**Post date:** [April 1, 2019, 5:15pm UTC](https://community.zeek.org/t/bro-2-5-4/5570/4 "2019-04-01T17:15:31Z")

</div>

What Seth suggest is a better way to do this.

I also do one more thing - when logs rotate overnight - we add the hostname to  
the log file names too.

So our logs from different bro instances are named like:

conn.log.cluster-1-mgr.2019-03-29-00:00:00-00:00:00.gz  
conn.log.wireless-bro.2019-03-29-00:00:00-00:00:00.gz

etc.

How we do this:

Basically in broctl.cfg I've added:

# change log naming  
MakeArchiveName = /usr/local/bro/common/scripts/makelocal-archivename-2.1

and here is the makelocal-archivename-2.1

$ cat makelocal-archivename-2.1  
#! /usr/bin/env bash

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:46pm UTC](https://community.zeek.org/t/bro-2-5-4/5570/5 "2022-05-06T15:46:16Z")

</div>


