mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +00:00
Add a new node type for logging
Changed the cluster framework scripts by adding a new Bro node type for doing logging (this is intended to reduce the load on the manager). If a user chooses not to specify a logger node in the cluster configuration, then the manager will write logs locally as usual.
This commit is contained in:
parent
98a272b9fd
commit
f45a3e8878
6 changed files with 85 additions and 10 deletions
29
scripts/base/frameworks/cluster/nodes/logger.bro
Normal file
29
scripts/base/frameworks/cluster/nodes/logger.bro
Normal file
|
@ -0,0 +1,29 @@
|
|||
##! This is the core Bro script to support the notion of a cluster logger.
|
||||
##!
|
||||
##! The logger is passive (other Bro instances connect to us), and once
|
||||
##! connected the logger receives logs from other Bro instances.
|
||||
##! This script will be automatically loaded if necessary based on the
|
||||
##! type of node being started.
|
||||
|
||||
##! This is where the cluster logger sets it's specific settings for other
|
||||
##! frameworks and in the core.
|
||||
|
||||
@prefixes += cluster-logger
|
||||
|
||||
## Turn on local logging.
|
||||
redef Log::enable_local_logging = T;
|
||||
|
||||
## Turn off remote logging since this is the logger and should only log here.
|
||||
redef Log::enable_remote_logging = F;
|
||||
|
||||
## Log rotation interval.
|
||||
redef Log::default_rotation_interval = 1 hrs;
|
||||
|
||||
## Alarm summary mail interval.
|
||||
redef Log::default_mail_alarms_interval = 24 hrs;
|
||||
|
||||
## Use the cluster's archive logging script.
|
||||
redef Log::default_rotation_postprocessor_cmd = "archive-log";
|
||||
|
||||
## We're processing essentially *only* remote events.
|
||||
redef max_remote_events_processed = 10000;
|
|
@ -10,17 +10,20 @@
|
|||
|
||||
@prefixes += cluster-manager
|
||||
|
||||
## Turn off remote logging since this is the manager and should only log here.
|
||||
redef Log::enable_remote_logging = F;
|
||||
## Don't do any local logging since the logger handles writing logs.
|
||||
redef Log::enable_local_logging = F;
|
||||
|
||||
## Turn on remote logging since the logger handles writing logs.
|
||||
redef Log::enable_remote_logging = T;
|
||||
|
||||
## Log rotation interval.
|
||||
redef Log::default_rotation_interval = 1 hrs;
|
||||
redef Log::default_rotation_interval = 24 hrs;
|
||||
|
||||
## Alarm summary mail interval.
|
||||
redef Log::default_mail_alarms_interval = 24 hrs;
|
||||
|
||||
## Use the cluster's archive logging script.
|
||||
redef Log::default_rotation_postprocessor_cmd = "archive-log";
|
||||
## Use the cluster's delete-log script.
|
||||
redef Log::default_rotation_postprocessor_cmd = "delete-log";
|
||||
|
||||
## We're processing essentially *only* remote events.
|
||||
redef max_remote_events_processed = 10000;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
##! Redefines some options common to all worker nodes within a Bro cluster.
|
||||
##! In particular, worker nodes do not produce logs locally, instead they
|
||||
##! send them off to a manager node for processing.
|
||||
##! send them off to a logger node for processing.
|
||||
|
||||
@prefixes += cluster-worker
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue