feat: added alert rule and impl for prometheus as well as a few preconfigured bmc alerts for dell server that are used in the monitoring example #67
| @ -43,14 +43,14 @@ async fn main() { | ||||
|     // K8sAnywhereTopology as it is the most automatic one that enables you to easily deploy
 | ||||
|     // locally, to development environment from a CI, to staging, and to production with settings
 | ||||
|     // that automatically adapt to each environment grade.
 | ||||
|     let maestro = Maestro::<K8sAnywhereTopology>::initialize( | ||||
|     let mut maestro = Maestro::<K8sAnywhereTopology>::initialize( | ||||
|         Inventory::autoload(), | ||||
|         K8sAnywhereTopology::from_env(), | ||||
|     ) | ||||
|     .await | ||||
|     .unwrap(); | ||||
| 
 | ||||
|     // maestro.register_all(vec![Box::new(lamp_stack)]);
 | ||||
|     maestro.register_all(vec![Box::new(lamp_stack)]); | ||||
|     // Here we bootstrap the CLI, this gives some nice features if you need them
 | ||||
|     harmony_cli::init(maestro, None).await.unwrap(); | ||||
| } | ||||
|  | ||||
| @ -1,19 +1,18 @@ | ||||
| use harmony::{ | ||||
|     inventory::Inventory, | ||||
|     maestro::Maestro, | ||||
|     modules::monitoring::{ | ||||
|         alert_channel::discord_alert_channel::DiscordWebhook, | ||||
|         alert_rule::prometheus_alert_rule::{AlertManagerRuleGroup, PrometheusAlertRule}, | ||||
|         kube_prometheus::{ | ||||
|             alerts::{ | ||||
|                 dell_server::{ | ||||
|                     alert_global_storage_status_critical, | ||||
|                     alert_global_storage_status_non_recoverable, | ||||
|                     global_storage_status_degraded_non_critical, | ||||
|                 }, | ||||
|                 pvc::high_pvc_fill_rate_over_two_days, | ||||
|     modules::{ | ||||
|         monitoring::{ | ||||
|             alert_channel::discord_alert_channel::DiscordWebhook, | ||||
|             alert_rule::prometheus_alert_rule::AlertManagerRuleGroup, | ||||
|             kube_prometheus::helm_prometheus_alert_score::HelmPrometheusAlertingScore, | ||||
|         }, | ||||
|         prometheus::alerts::{ | ||||
|             infra::dell_server::{ | ||||
|                 alert_global_storage_status_critical, alert_global_storage_status_non_recoverable, | ||||
|                 global_storage_status_degraded_non_critical, | ||||
|             }, | ||||
|             helm_prometheus_alert_score::HelmPrometheusAlertingScore, | ||||
|             k8s::pvc::high_pvc_fill_rate_over_two_days, | ||||
|         }, | ||||
|     }, | ||||
|     topology::{K8sAnywhereTopology, Url}, | ||||
|  | ||||
| @ -12,5 +12,6 @@ pub mod load_balancer; | ||||
| pub mod monitoring; | ||||
| pub mod okd; | ||||
| pub mod opnsense; | ||||
| pub mod prometheus; | ||||
| pub mod tenant; | ||||
| pub mod tftp; | ||||
|  | ||||
| @ -1,4 +1,3 @@ | ||||
| pub mod alerts; | ||||
| pub mod helm; | ||||
| pub mod helm_prometheus_alert_score; | ||||
| pub mod prometheus; | ||||
|  | ||||
| @ -1,2 +1 @@ | ||||
| pub mod dell_server; | ||||
| pub mod pvc; | ||||
							
								
								
									
										1
									
								
								harmony/src/modules/prometheus/alerts/k8s/mod.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								harmony/src/modules/prometheus/alerts/k8s/mod.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| pub mod pvc; | ||||
							
								
								
									
										2
									
								
								harmony/src/modules/prometheus/alerts/mod.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								harmony/src/modules/prometheus/alerts/mod.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,2 @@ | ||||
| pub mod infra; | ||||
| pub mod k8s; | ||||
							
								
								
									
										1
									
								
								harmony/src/modules/prometheus/mod.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								harmony/src/modules/prometheus/mod.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| pub mod alerts; | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user