Skip to main content

DolConfig

Struct DolConfig 

Source
pub struct DolConfig {
Show 28 fields pub store: Option<String>, pub output: Option<String>, pub metrics_interval: Option<u64>, pub snapshot_interval: Option<u64>, pub host: Option<String>, pub theme: Option<String>, pub api_timeout: Option<u64>, pub api_quick_timeout: Option<u64>, pub stats_timeout: Option<u64>, pub events_timeout: Option<u64>, pub webhook_timeout: Option<u64>, pub restart_timeout: Option<u64>, pub smtp_host: Option<String>, pub smtp_port: Option<u16>, pub smtp_user: Option<String>, pub smtp_pass: Option<String>, pub analysis_high_cpu_percent: Option<f64>, pub analysis_critical_cpu_percent: Option<f64>, pub analysis_memory_pressure_ratio: Option<f64>, pub analysis_critical_memory_ratio: Option<f64>, pub analysis_restart_loop_count: Option<u64>, pub analysis_deployment_error_threshold: Option<u64>, pub analysis_leak_memory_increase_pct: Option<f64>, pub analysis_leak_min_samples: Option<u64>, pub analysis_high_network_bytes: Option<u64>, pub analysis_critical_network_bytes: Option<u64>, pub analysis_high_disk_bytes: Option<u64>, pub analysis_critical_disk_bytes: Option<u64>,
}

Fields§

§store: Option<String>§output: Option<String>§metrics_interval: Option<u64>§snapshot_interval: Option<u64>§host: Option<String>§theme: Option<String>

Default colour theme: “dark” or “light”.

§api_timeout: Option<u64>

Timeout for standard Docker API calls (list, inspect, etc.). Default: 30s.

§api_quick_timeout: Option<u64>

Timeout for lightweight Docker API calls (ping). Default: 10s.

§stats_timeout: Option<u64>

Timeout for per-container stats calls. Default: 10s.

§events_timeout: Option<u64>

Max seconds to wait for a single event from the events stream. Default: 30s.

§webhook_timeout: Option<u64>

Timeout for alert webhook HTTP POST. Default: 10s.

§restart_timeout: Option<u64>

Timeout for alert container restart action. Default: 30s.

§smtp_host: Option<String>

SMTP server hostname for email alerts. Default: localhost.

§smtp_port: Option<u16>

SMTP server port. Default: 25.

§smtp_user: Option<String>

SMTP username (optional).

§smtp_pass: Option<String>

SMTP password (optional).

§analysis_high_cpu_percent: Option<f64>

CPU % above which a warning is issued. Default: 80.

§analysis_critical_cpu_percent: Option<f64>

CPU % above which a critical alert is issued. Default: 95.

§analysis_memory_pressure_ratio: Option<f64>

Memory usage/limit ratio above which a warning is issued. Default: 0.85.

§analysis_critical_memory_ratio: Option<f64>

Memory usage/limit ratio above which a critical alert is issued. Default: 0.95.

§analysis_restart_loop_count: Option<u64>

Restart count threshold for restart loop detection. Default: 3.

§analysis_deployment_error_threshold: Option<u64>

Number of die events indicating deployment failure. Default: 3.

§analysis_leak_memory_increase_pct: Option<f64>

Memory increase % indicating a resource leak. Default: 20.

§analysis_leak_min_samples: Option<u64>

Min metric samples needed for leak detection. Default: 3.

§analysis_high_network_bytes: Option<u64>

Network I/O bytes warning threshold. Default: 1048576 (1 MB).

§analysis_critical_network_bytes: Option<u64>

Network I/O bytes critical threshold. Default: 10485760 (10 MB).

§analysis_high_disk_bytes: Option<u64>

Disk I/O bytes warning threshold. Default: 10485760 (10 MB).

§analysis_critical_disk_bytes: Option<u64>

Disk I/O bytes critical threshold. Default: 104857600 (100 MB).

Implementations§

Source§

impl DolConfig

Source

pub fn load() -> Self

Source

pub fn save(&self) -> Result<()>

Trait Implementations§

Source§

impl Clone for DolConfig

Source§

fn clone(&self) -> DolConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DolConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DolConfig

Source§

fn default() -> DolConfig

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for DolConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<&DolConfig> for DockerApiConfig

Source§

fn from(cfg: &DolConfig) -> Self

Converts to this type from the input type.
Source§

impl Serialize for DolConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,