Mercurial > code > home > repos > victoriametrics
comparison 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 |
comparison
equal
deleted
inserted
replaced
31:d39a8038227b | 32:eb1de82c93aa |
---|---|
9 | 9 |
10 | 10 |
11 @task | 11 @task |
12 def push_config(ctx): | 12 def push_config(ctx): |
13 configObj = scrapeConfig(ctx) | 13 configObj = scrapeConfig(ctx) |
14 rulesObj = alert_rules.allRules() | 14 rulesObj = alert_rules.allRules(ctx) |
15 rulesObj["groups"] += alert_rules.expectedK8sNodes(ctx)["groups"] | |
16 rulesObj["groups"] += alert_rules.hostsExpectedOnline(ctx)["groups"] | |
17 | 15 |
18 replaceCmap("victoriametrics-config", {"scrape_main": configObj, "rules": rulesObj}) | 16 replaceCmap("victoriametrics-config", {"scrape_main": configObj, "rules": rulesObj}) |
19 | 17 |
20 refreshPodCmaps(firstPodName("app=victoriametrics")) | 18 refreshPodCmaps(firstPodName("app=victoriametrics")) |
21 refreshPodCmaps(firstPodName("app=vmalert")) | 19 refreshPodCmaps(firstPodName("app=vmalert")) |