mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Management framework: additional logging tweaks
Ensure the framework's log stream exists prior to using it in zeek_init(), and use a node-is-live message similar to those in agent and controller also in launched nodes.
This commit is contained in:
parent
e947e1d1c2
commit
ffebf99bad
2 changed files with 4 additions and 1 deletions
|
@ -122,7 +122,8 @@ function error(message: string)
|
|||
$role=r2s[Management::role], $message=message]);
|
||||
}
|
||||
|
||||
event zeek_init()
|
||||
# Bump priority to ensure the log stream exists when other zeek_init handlers use it.
|
||||
event zeek_init() &priority=5
|
||||
{
|
||||
if ( ! Supervisor::is_supervised() )
|
||||
return;
|
||||
|
|
|
@ -118,4 +118,6 @@ event zeek_init()
|
|||
|
||||
Broker::peer(epi$network$address, epi$network$bound_port, Management::connect_retry);
|
||||
Broker::subscribe(node_topic);
|
||||
|
||||
Management::Log::info(fmt("node %s is live, Broker ID %s", Cluster::node, Broker::node_id()));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue