base/frameworks/config/main.zeek

Config

The configuration framework provides a way to change Zeek options (as specified by the “option” keyword) at runtime. It also logs runtime changes to options to config.log.

Namespace

Config

Imports

base/frameworks/cluster

Summary

Types

Config::Info: record

Represents the data in config.log.

Redefinitions

Log::ID: enum

The config logging stream identifier.

Events

Config::log_config: event

Event that can be handled to access the Config::Info record as it is sent on to the logging framework.

Hooks

Config::log_policy: Log::PolicyHook

A default logging policy hook for the stream.

Functions

Config::set_value: function

This function is the config framework layer around the lower-level Option::set call.

Detailed Interface

Types

Config::Info
Type

record

ts: time &log

Timestamp at which the configuration change occurred.

id: string &log

ID of the value that was changed.

old_value: string &log

Value before the change.

new_value: string &log

Value after the change.

location: string &optional &log

Optional location that triggered the change.

Represents the data in config.log.

Events

Config::log_config
Type

event (rec: Config::Info)

Event that can be handled to access the Config::Info record as it is sent on to the logging framework.

Hooks

Config::log_policy
Type

Log::PolicyHook

A default logging policy hook for the stream.

Functions

Config::set_value
Type

function (ID: string, val: any, location: string &default = "" &optional) : bool

This function is the config framework layer around the lower-level Option::set call. Config::set_value will set the configuration value for all nodes in the cluster, no matter where it was called. Note that Option::set does not distribute configuration changes to other nodes.

Parameters
  • ID – The ID of the option to update.

  • val – The new value of the option.

  • location – Optional parameter detailing where this change originated from.

Returns

true on success, false when an error occurs.