# redef plugin variables

**URL:** <https://community.zeek.org/t/redef-plugin-variables/4717>\
**Category:** Zeek\
**Created:** [March 8, 2017, 7:50pm UTC](https://community.zeek.org/t/redef-plugin-variables/4717 "2017-03-08T19:50:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Munroe\_Sollog](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Munroe\_Sollog](https://community.zeek.org/u/Munroe_Sollog)\
**Post date:** [March 8, 2017, 7:50pm UTC](https://community.zeek.org/t/redef-plugin-variables/4717/1 "2017-03-08T19:50:36Z")

</div>

I am using the elasticsearch plugin with NSQ and I am trying to set the following:

redef destination = "nsq";  
redef server\_port = 4151;  
redef nsq\_topic = "bro\_logs";

These statements when put in plugins/Bro\_Elasticsearch/scripts/init.bro causes everything to work as  
expected. However that file gets overwritten when the plugin gets rebuilt. I am trying to figure  
out how to put these statements in my local.bro. when I include the above in local.bro I get the  
following errors:

worker-1-1 scripts failed.  
error in /usr/local/bro/share/bro/site/local.bro, line 98: "redef" used but not previously defined  
(destination)  
internal warning in /usr/local/bro/share/bro/site/local.bro, line 98: Can't document redef of  
destination, identifier lookup failed

I'm assuming I have to prepend these variables with something like "Bro::ElasticSearch" but I can't  
find any docs to clarify.

---

<div class="post-metadata">

**Author:** ![johanna](https://avatars.discourse-cdn.com/v4/letter/j/50afbb/32.png) [@johanna](https://community.zeek.org/u/johanna)\
**Post date:** [March 14, 2017, 6:07pm UTC](https://community.zeek.org/t/redef-plugin-variables/4717/2 "2017-03-14T18:07:20Z")

</div>

Try redef LogElasticSearch::destination = ...

basically you have to specify the module name explicitly when redef-ing  
outside of the module in question.

Johanna

---

<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:44pm UTC](https://community.zeek.org/t/redef-plugin-variables/4717/3 "2022-05-06T15:44:43Z")

</div>


