Tweaking logs-to-elasticsearch.bro so that it doesn't do anything if

ES server is unset.
This commit is contained in:
Robin Sommer 2012-07-28 11:21:20 -07:00
parent 32590177a0
commit 4bdac985cb
2 changed files with 10 additions and 1 deletions

View file

@ -19,6 +19,9 @@ export {
event bro_init() &priority=-5 event bro_init() &priority=-5
{ {
if ( server_host == "" )
return;
for ( stream_id in Log::active_streams ) for ( stream_id in Log::active_streams )
{ {
if ( fmt("%s", stream_id) in excluded_log_ids || if ( fmt("%s", stream_id) in excluded_log_ids ||

View file

@ -1,6 +1,12 @@
# Sets some testing specific options. # Sets some testing specific options.
@ifdef ( SMTP::never_calc_md5 ) @ifdef ( SMTP::never_calc_md5 )
# MDD5s can depend on libmagic output. # MDD5s can depend on libmagic output.
redef SMTP::never_calc_md5 = T; redef SMTP::never_calc_md5 = T;
@endif @endif
@ifdef ( LogElasticSearch::server_host )
# Set to empty so that logs-to-elasticsearch.bro doesn't try to setup
#log forwarding to ES.
redef LogElasticSearch::server_host = "";
@endif