Add ability to reset metrics between crawl to limit payload absorbed (#5)

by the prometheus/victoria metric crawlers.
This commit is contained in:
2023-11-16 16:45:48 +00:00
committed by GitHub
parent 9c9fa94140
commit 0b642f8be1
6 changed files with 34 additions and 13 deletions
+1
View File
@@ -55,6 +55,7 @@ func parseConfig() {
c.Server.EnableApi = envutil.GetBool("ENABLE_API", false)
c.Server.ApiPort = envutil.GetInt("API_PORT", 9090)
c.Api.BannedUsersFile = envutil.Getenv("BANNED_USERS_FILE", "/go/src/app/banned_users.json")
c.Server.PurgeOnCrawl = envutil.GetBool("PURGE_METRICS_ON_CRAWL", false)
cfg = &c
enableCache() // takes close to no resources, but can be used with dynamic query cache
loadRatelimitConfig()