pub struct GlobalOptions {Show 13 fields
pub data_dir: Option<PathBuf>,
pub wildcard_matching: Option<WildcardMatching>,
pub log_schema: LogSchema,
pub telemetry: Telemetry,
pub timezone: Option<TimeZone>,
pub proxy: ProxyConfig,
pub acknowledgements: AcknowledgementsConfig,
pub expire_metrics: Option<Duration>,
pub expire_metrics_secs: Option<f64>,
pub expire_metrics_per_metric_set: Option<Vec<PerMetricSetExpiration>>,
pub buffer_utilization_ewma_half_life_seconds: Option<f64>,
pub latency_ewma_alpha: Option<f64>,
pub metrics_storage_refresh_period: Option<f64>,
}Expand description
Global configuration options.
Fields§
§data_dir: Option<PathBuf>The directory used for persisting Vector state data.
This is the directory where Vector will store any state data, such as disk buffers, file checkpoints, and more.
Vector must have write permissions to this directory.
wildcard_matching: Option<WildcardMatching>Set wildcard matching mode for inputs
Setting this to “relaxed” allows configurations with wildcards that do not match any inputs to be accepted without causing an error.
log_schema: LogSchemaDefault log schema for all events.
This is used if a component does not have its own specific log schema. All events use a log schema, whether or not the default is used, to assign event fields on incoming events.
telemetry: TelemetryTelemetry options.
Determines whether source and service tags should be emitted with the
component_sent_* and component_received_* events.
timezone: Option<TimeZone>The name of the time zone to apply to timestamp conversions that do not contain an explicit time zone.
The time zone name may be any name in the TZ database or local to indicate system
local time.
Note that in Vector/VRL all timestamps are represented in UTC.
proxy: ProxyConfig§acknowledgements: AcknowledgementsConfigControls how acknowledgements are handled for all sinks by default.
See End-to-end Acknowledgements for more information on how Vector handles event acknowledgement.
expire_metrics: Option<Duration>The amount of time, in seconds, that internal metrics will persist after having not been updated before they expire and are removed.
Deprecated: use expire_metrics_secs instead
expire_metrics_secs: Option<f64>The amount of time, in seconds, that internal metrics will persist after having not been updated before they expire and are removed.
Set this to a value larger than your internal_metrics scrape interval (default 5 minutes)
so metrics live long enough to be emitted and captured.
expire_metrics_per_metric_set: Option<Vec<PerMetricSetExpiration>>This allows configuring different expiration intervals for different metric sets.
By default this is empty and any metric not matched by one of these sets will use
the global default value, defined using expire_metrics_secs.
buffer_utilization_ewma_half_life_seconds: Option<f64>The half-life, in seconds, for the exponential weighted moving average (EWMA) of source and transform buffer utilization metrics.
This controls how quickly the *_buffer_utilization_mean gauges respond to new
observations. Longer half-lives retain more of the previous value, leading to slower
adjustments.
- Lower values (< 1): Metrics update quickly but may be volatile
- Default (5): Balanced between responsiveness and stability
- Higher values (> 5): Smooth, stable metrics that update slowly
Adjust based on whether you need fast detection of buffer issues (lower) or want to see sustained trends without noise (higher).
Must be greater than 0.
latency_ewma_alpha: Option<f64>The alpha value for the exponential weighted moving average (EWMA) of transform latency metrics.
This controls how quickly the component_latency_mean_seconds gauge responds to new
observations. Values closer to 1.0 retain more of the previous value, leading to slower
adjustments. The default value of 0.9 is equivalent to a “half life” of 6-7 measurements.
Must be between 0 and 1 exclusively (0 < alpha < 1).
metrics_storage_refresh_period: Option<f64>The interval, in seconds, at which the internal metrics cache for VRL is refreshed. This must be set to be able to access metrics in VRL functions.
Higher values lead to stale metric values from get_vector_metric,
find_vector_metrics, and aggregate_vector_metrics functions.
Implementations§
Source§impl GlobalOptions
impl GlobalOptions
Sourcepub fn resolve_and_validate_data_dir(
&self,
local_data_dir: Option<&PathBuf>,
) -> Result<PathBuf>
pub fn resolve_and_validate_data_dir( &self, local_data_dir: Option<&PathBuf>, ) -> Result<PathBuf>
Resolve the data_dir option in either the global or local config, and
validate that it exists and is writable.
§Errors
Function will error if it is unable to make data directory.
Sourcepub fn resolve_and_make_data_subdir(
&self,
local: Option<&PathBuf>,
subdir: &str,
) -> Result<PathBuf>
pub fn resolve_and_make_data_subdir( &self, local: Option<&PathBuf>, subdir: &str, ) -> Result<PathBuf>
Resolve the data_dir option using resolve_and_validate_data_dir and
then ensure a named subdirectory exists.
§Errors
Function will error if it is unable to make data subdirectory.
Sourcepub fn merge(&self, with: Self) -> Result<Self, Vec<String>>
pub fn merge(&self, with: Self) -> Result<Self, Vec<String>>
Merge a second global configuration into self, and return the new merged data.
§Errors
Returns a list of textual errors if there is a merge conflict between the two global configs.
Sourcepub fn timezone(&self) -> TimeZone
pub fn timezone(&self) -> TimeZone
Get the configured time zone, using “local” time if none is set.
Sourcepub fn diff(&self, other: &Self) -> Result<Vec<String>, Error>
pub fn diff(&self, other: &Self) -> Result<Vec<String>, Error>
Returns a list of top-level field names that differ between two GlobalOptions values.
This function performs a shallow comparison by serializing both configs to JSON and comparing their top-level keys.
Useful for logging which global fields changed during config reload attempts.
§Errors
Returns a serde_json::Error if either of the GlobalOptions values
cannot be serialized into a JSON object. This is unlikely under normal usage,
but may occur if serialization fails due to unexpected data structures or changes
in the type definition.
Trait Implementations§
Source§impl Clone for GlobalOptions
impl Clone for GlobalOptions
Source§fn clone(&self) -> GlobalOptions
fn clone(&self) -> GlobalOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Configurable for GlobalOptions
impl Configurable for GlobalOptions
Source§fn referenceable_name() -> Option<&'static str>
fn referenceable_name() -> Option<&'static str>
Source§fn generate_schema(
schema_gen: &RefCell<SchemaGenerator>,
) -> Result<SchemaObject, GenerateError>
fn generate_schema( schema_gen: &RefCell<SchemaGenerator>, ) -> Result<SchemaObject, GenerateError>
§fn is_optional() -> boolwhere
Self: Sized,
fn is_optional() -> boolwhere
Self: Sized,
§fn validate_metadata(_metadata: &Metadata) -> Result<(), GenerateError>where
Self: Sized,
fn validate_metadata(_metadata: &Metadata) -> Result<(), GenerateError>where
Self: Sized,
§fn as_configurable_ref() -> ConfigurableRefwhere
Self: Sized + 'static,
fn as_configurable_ref() -> ConfigurableRefwhere
Self: Sized + 'static,
Source§impl Debug for GlobalOptions
impl Debug for GlobalOptions
Source§impl Default for GlobalOptions
impl Default for GlobalOptions
Source§fn default() -> GlobalOptions
fn default() -> GlobalOptions
Source§impl<'de> Deserialize<'de> for GlobalOptions
impl<'de> Deserialize<'de> for GlobalOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl GenerateConfig for GlobalOptions
impl GenerateConfig for GlobalOptions
fn generate_config() -> Value
Source§impl PartialEq for GlobalOptions
impl PartialEq for GlobalOptions
Source§impl Serialize for GlobalOptions
impl Serialize for GlobalOptions
Source§impl ToValue for GlobalOptions
impl ToValue for GlobalOptions
impl StructuralPartialEq for GlobalOptions
Auto Trait Implementations§
impl Freeze for GlobalOptions
impl RefUnwindSafe for GlobalOptions
impl Send for GlobalOptions
impl Sync for GlobalOptions
impl Unpin for GlobalOptions
impl UnwindSafe for GlobalOptions
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
§impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
impl<Source, Target> OctetsInto<Target> for Sourcewhere
Target: OctetsFrom<Source>,
type Error = <Target as OctetsFrom<Source>>::Error
§fn try_octets_into(
self,
) -> Result<Target, <Source as OctetsInto<Target>>::Error>
fn try_octets_into( self, ) -> Result<Target, <Source as OctetsInto<Target>>::Error>
§fn octets_into(self) -> Targetwhere
Self::Error: Into<Infallible>,
fn octets_into(self) -> Targetwhere
Self::Error: Into<Infallible>,
§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more