mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
Generalize Cluster::worker_count.
This commit is contained in:
parent
379624404c
commit
3db8bb4a44
6 changed files with 62 additions and 47 deletions
|
@ -32,7 +32,8 @@ redef Log::default_rotation_interval=0sec;
|
|||
event Cluster::node_up(name: string, id: string)
|
||||
{
|
||||
# Insert the data once both workers are connected.
|
||||
if ( Cluster::local_node_type() == Cluster::MANAGER && Cluster::worker_count == 2 )
|
||||
if ( Cluster::local_node_type() == Cluster::MANAGER &&
|
||||
Cluster::get_active_node_count(Cluster::WORKER) == 2 )
|
||||
{
|
||||
Intel::insert([$indicator="1.2.3.4", $indicator_type=Intel::ADDR, $meta=[$source="manager"]]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue