prom: increase scrape_interval for quanta targets
This commit is contained in:
parent
4ae69ceb89
commit
c5cc75e826
2 changed files with 5 additions and 4 deletions
|
@ -3,7 +3,8 @@ prometheus__scraping_quanta:
|
|||
targets: "{{ groups.quanta }}"
|
||||
address: 127.0.0.1:9116
|
||||
path: /snmp
|
||||
timeout: 60s
|
||||
timeout: 180s
|
||||
interval: 180s
|
||||
params:
|
||||
module:
|
||||
- quanta
|
||||
|
|
|
@ -9,9 +9,7 @@ class FilterModule:
|
|||
|
||||
|
||||
def convert_jobs(config):
|
||||
|
||||
for name, job in config.items():
|
||||
|
||||
config = {
|
||||
"job_name": name,
|
||||
"static_configs": [
|
||||
|
@ -28,8 +26,10 @@ def convert_jobs(config):
|
|||
if "timeout" in job:
|
||||
config["scrape_timeout"] = job["timeout"]
|
||||
|
||||
if "address" in job:
|
||||
if "interval" in job:
|
||||
config["scrape_interval"] = job["interval"]
|
||||
|
||||
if "address" in job:
|
||||
try:
|
||||
replacement = f"$1:{job['address']['port']}"
|
||||
except Exception:
|
||||
|
|
Loading…
Reference in a new issue