comparison tasks.py @ 34:3b91d52b007d

rules tuning
author drewp@bigasterisk.com
date Mon, 09 Oct 2023 18:50:36 -0700
parents eb1de82c93aa
children 21185db8a52e
comparison
equal deleted inserted replaced
33:ce7ae4d2b24b 34:3b91d52b007d
13 configObj = scrapeConfig(ctx) 13 configObj = scrapeConfig(ctx)
14 rulesObj = alert_rules.allRules(ctx) 14 rulesObj = alert_rules.allRules(ctx)
15 15
16 replaceCmap("victoriametrics-config", {"scrape_main": configObj, "rules": rulesObj}) 16 replaceCmap("victoriametrics-config", {"scrape_main": configObj, "rules": rulesObj})
17 17
18 # these don't give errors on rules format! they just quietly keep the old
19 # rules! use `skaffold run` to get errs.
20 #
21 # or run
22 # validateTemplates = flag.Bool("rule.validateTemplates", true, "Whether to validate annotation and label templates")
23 # validateExpressions = flag.Bool("rule.validateExpressions", true, "Whether to validate rules expressions via MetricsQL engine")
24
18 refreshPodCmaps(firstPodName("app=victoriametrics")) 25 refreshPodCmaps(firstPodName("app=victoriametrics"))
19 refreshPodCmaps(firstPodName("app=vmalert")) 26 refreshPodCmaps(firstPodName("app=vmalert"))
20 27
21 # If the VM reloader isn't fast enough, we could do this too: 28 # If the VM reloader isn't fast enough, we could do this too:
22 # hup(ctx, 'deploy/victoriametrics', 'victoria-metrics-prod') 29 # hup(ctx, 'deploy/victoriametrics', 'victoria-metrics-prod')