diff tasks.py @ 32:eb1de82c93aa

refactor the merging of all the groups
author drewp@bigasterisk.com
date Wed, 19 Jul 2023 21:28:10 -0700
parents eec015e90818
children 3b91d52b007d
line wrap: on
line diff
--- a/tasks.py	Wed Jul 19 21:27:46 2023 -0700
+++ b/tasks.py	Wed Jul 19 21:28:10 2023 -0700
@@ -11,9 +11,7 @@
 @task
 def push_config(ctx):
     configObj = scrapeConfig(ctx)
-    rulesObj = alert_rules.allRules()
-    rulesObj["groups"] += alert_rules.expectedK8sNodes(ctx)["groups"]
-    rulesObj["groups"] += alert_rules.hostsExpectedOnline(ctx)["groups"]
+    rulesObj = alert_rules.allRules(ctx)
 
     replaceCmap("victoriametrics-config", {"scrape_main": configObj, "rules": rulesObj})