feat: deploys cluster monitoring from MonitoringAlertingScore
Some checks failed
Run Check Script / check (push) Failing after 44s
Some checks failed
Run Check Script / check (push) Failing after 44s
This commit is contained in:
11
examples/monitoring/Cargo.toml
Normal file
11
examples/monitoring/Cargo.toml
Normal file
@@ -0,0 +1,11 @@
|
||||
[package]
|
||||
name = "monitoring"
|
||||
edition = "2024"
|
||||
version.workspace = true
|
||||
readme.workspace = true
|
||||
license.workspace = true
|
||||
|
||||
[dependencies]
|
||||
harmony = { version = "0.1.0", path = "../../harmony" }
|
||||
harmony_cli = { version = "0.1.0", path = "../../harmony_cli" }
|
||||
tokio.workspace = true
|
||||
23
examples/monitoring/src/main.rs
Normal file
23
examples/monitoring/src/main.rs
Normal file
@@ -0,0 +1,23 @@
|
||||
use harmony::{
|
||||
inventory::Inventory,
|
||||
maestro::Maestro,
|
||||
modules::monitoring::monitoring_alerting::MonitoringAlertingScore,
|
||||
topology::K8sAnywhereTopology,
|
||||
};
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
let mut maestro = Maestro::<K8sAnywhereTopology>::initialize(
|
||||
Inventory::autoload(),
|
||||
K8sAnywhereTopology::from_env(),
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
let monitoring = MonitoringAlertingScore {
|
||||
alert_channel_configs: None,
|
||||
};
|
||||
|
||||
maestro.register_all(vec![Box::new(monitoring)]);
|
||||
harmony_cli::init(maestro, None).await.unwrap();
|
||||
}
|
||||
Reference in New Issue
Block a user