Skip to content

Commit

Permalink
Fix prometheus labels
Browse files Browse the repository at this point in the history
  • Loading branch information
ausias-armesto committed Mar 13, 2024
1 parent d4a64e1 commit 67507d6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 34 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hoprd_operator"
version = "0.2.8"
version = "0.2.9"
authors = ["HOPR Association <[email protected]>"]
edition = "2021"

Expand Down
34 changes: 2 additions & 32 deletions src/identity_pool/identity_pool_service_monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,27 +93,7 @@ pub fn build_metric_relabel() -> Vec<ServiceMonitorEndpointsRelabelings> {
}, ServiceMonitorEndpointsRelabelings {
action: Some(ServiceMonitorEndpointsRelabelingsAction::Replace),
source_labels: Some(vec![
"__meta_kubernetes_pod_label_app_kubernetes_io_instance".to_owned(),
]),
target_label: Some("node_name".to_owned()),
modulus: None,
regex: None,
replacement: None,
separator: None,
}, ServiceMonitorEndpointsRelabelings {
action: Some(ServiceMonitorEndpointsRelabelingsAction::Replace),
source_labels: Some(vec![
"__meta_kubernetes_pod_label_app_kubernetes_io_instance".to_owned(),
]),
target_label: Some("nodename".to_owned()),
modulus: None,
regex: None,
replacement: None,
separator: None,
}, ServiceMonitorEndpointsRelabelings {
action: Some(ServiceMonitorEndpointsRelabelingsAction::Replace),
source_labels: Some(vec![
"__meta_kubernetes_pod_label_hoprds_hoprnet_org_safe_address".to_owned(),
"__meta_kubernetes_pod_label_hoprds_hoprnet_org_safeAddress".to_owned(),
]),
target_label: Some("hoprd_safe_address".to_owned()),
modulus: None,
Expand All @@ -123,17 +103,7 @@ pub fn build_metric_relabel() -> Vec<ServiceMonitorEndpointsRelabelings> {
}, ServiceMonitorEndpointsRelabelings {
action: Some(ServiceMonitorEndpointsRelabelingsAction::Replace),
source_labels: Some(vec![
"__meta_kubernetes_pod_label_hoprds_hoprnet_org_module_address".to_owned(),
]),
target_label: Some("hoprd_module_address".to_owned()),
modulus: None,
regex: None,
replacement: None,
separator: None,
}, ServiceMonitorEndpointsRelabelings {
action: Some(ServiceMonitorEndpointsRelabelingsAction::Replace),
source_labels: Some(vec![
"__meta_kubernetes_pod_label_hoprds_hoprnet_org_address".to_owned(),
"__meta_kubernetes_pod_label_hoprds_hoprnet_org_native_address".to_owned(),
]),
target_label: Some("hoprd_address".to_owned()),
modulus: None,
Expand Down

0 comments on commit 67507d6

Please sign in to comment.