wip: Monitoring architecture becoming clearer, added adr/010-monitoring-alerting/architecture.rs that demonstrates how we designed the monitoring stack to be fully extensible by other crates
Some checks failed
Run Check Script / check (push) Failing after 43s
Run Check Script / check (pull_request) Failing after 42s

This commit is contained in:
2025-06-17 13:30:26 -04:00
parent 9412c0529a
commit c6a39a39a1
9 changed files with 163 additions and 52 deletions

View File

@@ -2,7 +2,13 @@ use harmony::{
data::Version,
inventory::Inventory,
maestro::Maestro,
modules::{lamp::{LAMPConfig, LAMPScore}, monitoring::monitoring_alerting::MonitoringAlertingScore},
modules::{
lamp::{LAMPConfig, LAMPScore},
monitoring::{
alert_channel::discord_alert_channel::DiscordWebhook,
monitoring_alerting::MonitoringAlertingScore,
},
},
topology::{K8sAnywhereTopology, Url},
};
@@ -29,7 +35,15 @@ async fn main() {
},
};
let monitoring = MonitoringAlertingScore { alert_channel_configs: todo!() };
let monitoring = MonitoringAlertingScore {
alert_receivers: vec![Box::new(DiscordWebhook {
url: Url::Url(url::Url::parse("https://discord.idonotexist.com").unwrap()),
// TODO write url macro
// url: url!("https://discord.idonotexist.com"),
})],
alert_rules: vec![],
scrape_targets: vec![],
};
// You can choose the type of Topology you want, we suggest starting with the
// K8sAnywhereTopology as it is the most automatic one that enables you to easily deploy
@@ -42,7 +56,8 @@ async fn main() {
.await
.unwrap();
maestro.register_all(vec![Box::new(lamp_stack)]);
// maestro.register_all(vec![Box::new(lamp_stack)]);
maestro.register_all(vec![Box::new(monitoring)]);
// Here we bootstrap the CLI, this gives some nice features if you need them
harmony_cli::init(maestro, None).await.unwrap();
}