base/frameworks/config/main.bro

Config

The configuration framework provides a way to change Bro 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
Source File:/scripts/base/frameworks/config/main.bro

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.

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 occured.

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.

Functions

Config::set_value
Type:function (ID: string, val: any, location: string &default = "" &optional &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.

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.
Copyright 2016, The Bro Project. Last updated on January 10, 2019. Created using Sphinx 1.7.5.