monitoring-alerting #30
@ -7,8 +7,6 @@ use crate::{
|
|||||||
#[derive(Debug, Clone, Serialize)]
|
#[derive(Debug, Clone, Serialize)]
|
||||||
pub struct MonitoringAlertingStackScore {
|
pub struct MonitoringAlertingStackScore {
|
||||||
monitoring: HelmChartScore,
|
monitoring: HelmChartScore,
|
||||||
alerting: HelmChartScore,
|
|
||||||
alert_manager: HelmChartScore,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: Topology> Score<T> for MonitoringAlertingStackScore {
|
impl<T: Topology> Score<T> for MonitoringAlertingStackScore {
|
||||||
@ -18,6 +16,6 @@ impl<T: Topology> Score<T> for MonitoringAlertingStackScore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn name(&self) -> String {
|
fn name(&self) -> String {
|
||||||
format!("Monitoring: {}\n, Alerting: {}\n, Alert Manager: {}\n", self.monitoring, self.alerting, self.alert_manager)
|
todo!()
|
||||||
|
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,19 +0,0 @@
|
|||||||
use std::str::FromStr;
|
|
||||||
|
|
||||||
use non_blank_string_rs::NonBlankString;
|
|
||||||
|
|
||||||
use crate::modules::helm::chart::HelmChartScore;
|
|
||||||
|
|
||||||
|
|
||||||
pub fn grafana_score(ns: &str) -> HelmChartScore {
|
|
||||||
HelmChartScore {
|
|
||||||
namespace: Some(NonBlankString::from_str(ns).unwrap()),
|
|
||||||
release_name: NonBlankString::from_str("es").unwrap(),
|
|
||||||
chart_name: NonBlankString::from_str(
|
|
||||||
"oci://registry-1.docker.io/bitnamicharts/grafana",
|
|
||||||
)
|
|
||||||
.unwrap(),
|
|
||||||
chart_version: None,
|
|
||||||
values_overrides: None,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
use non_blank_string_rs::NonBlankString;
|
use non_blank_string_rs::NonBlankString;
|
||||||
@ -5,12 +6,13 @@ use non_blank_string_rs::NonBlankString;
|
|||||||
use crate::modules::helm::chart::HelmChartScore;
|
use crate::modules::helm::chart::HelmChartScore;
|
||||||
|
|
||||||
|
|
||||||
pub fn elasticsearch_score(ns: &str) -> HelmChartScore {
|
pub fn kube_prometheus_score(ns: &str) -> HelmChartScore {
|
||||||
HelmChartScore {
|
HelmChartScore {
|
||||||
namespace: Some(NonBlankString::from_str(ns).unwrap()),
|
namespace: Some(NonBlankString::from_str(ns).unwrap()),
|
||||||
release_name: NonBlankString::from_str("es").unwrap(),
|
release_name: NonBlankString::from_str("es").unwrap(),
|
||||||
chart_name: NonBlankString::from_str(
|
chart_name: NonBlankString::from_str(
|
||||||
todo()!
|
todo!() //use kube prometheus chart which includes grafana, prometheus, alert
|
||||||
|
//manager, etc
|
||||||
)
|
)
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
chart_version: None,
|
chart_version: None,
|
||||||
@ -1,3 +1 @@
|
|||||||
mod grafana;
|
mod kube_prometheus;
|
||||||
mod prometheus;
|
|
||||||
mod prometheus_alert_manager;
|
|
||||||
|
|||||||
@ -1,20 +0,0 @@
|
|||||||
use std::str::FromStr;
|
|
||||||
|
|
||||||
use non_blank_string_rs::NonBlankString;
|
|
||||||
|
|
||||||
use crate::modules::helm::chart::HelmChartScore;
|
|
||||||
|
|
||||||
|
|
||||||
pub fn elasticsearch_score(ns: &str) -> HelmChartScore {
|
|
||||||
HelmChartScore {
|
|
||||||
namespace: Some(NonBlankString::from_str(ns).unwrap()),
|
|
||||||
release_name: NonBlankString::from_str("es").unwrap(),
|
|
||||||
chart_name: NonBlankString::from_str(
|
|
||||||
todo()!
|
|
||||||
)
|
|
||||||
.unwrap(),
|
|
||||||
chart_version: None,
|
|
||||||
values_overrides: None,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user
Why does the
MonitoringAlertingStackScoreneed aVec<Box<dyn Score<MonitoringAlertingTopology>>>? It seems like it's never used for anything.A score's variables should be what is needed to set it up, i.e. any values, rules, etc you want to pass in for the interpret to use to spin up the score