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
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user