pub struct MonitoringManager { /* private fields */ }Expand description
Monitoring manager for comprehensive cluster monitoring.
Implementations§
Source§impl MonitoringManager
impl MonitoringManager
Sourcepub fn register_metric(
&self,
name: MetricId,
metric_type: MetricType,
) -> Result<()>
pub fn register_metric( &self, name: MetricId, metric_type: MetricType, ) -> Result<()>
Register a custom metric.
Sourcepub fn record_metric(
&self,
metric_id: MetricId,
value: f64,
labels: HashMap<String, String>,
) -> Result<()>
pub fn record_metric( &self, metric_id: MetricId, value: f64, labels: HashMap<String, String>, ) -> Result<()>
Record a metric value.
Sourcepub fn create_alert_rule(&self, rule: AlertRule) -> Result<AlertId>
pub fn create_alert_rule(&self, rule: AlertRule) -> Result<AlertId>
Create an alert rule.
Sourcepub fn get_active_alerts(&self) -> Vec<Alert>
pub fn get_active_alerts(&self) -> Vec<Alert>
Get active alerts.
Sourcepub fn get_alert_history(&self, limit: usize) -> Vec<Alert>
pub fn get_alert_history(&self, limit: usize) -> Vec<Alert>
Get alert history.
Sourcepub fn get_stats(&self) -> MonitoringStats
pub fn get_stats(&self) -> MonitoringStats
Get monitoring statistics.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MonitoringManager
impl !RefUnwindSafe for MonitoringManager
impl Send for MonitoringManager
impl Sync for MonitoringManager
impl Unpin for MonitoringManager
impl UnsafeUnpin for MonitoringManager
impl !UnwindSafe for MonitoringManager
Blanket Implementations§
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
Mutably borrows from an owned value. Read more