Fixing multiple jobs generation
This commit is contained in:
parent
37342e8700
commit
a5b6333599
|
@ -44,12 +44,20 @@ scrape_configs:
|
||||||
scrape_interval: %%{job.scrpInterval}s
|
scrape_interval: %%{job.scrpInterval}s
|
||||||
scrape_timeout: %%{job.scrpTimeout}s
|
scrape_timeout: %%{job.scrpTimeout}s
|
||||||
scheme: %%job.scrpScheme
|
scheme: %%job.scrpScheme
|
||||||
%for %%target in %%getVar('prOpenTarg',[])
|
%set first = True
|
||||||
static_configs:
|
static_configs:
|
||||||
|
- targets: [ %slurp
|
||||||
|
%for %%target in %%getVar('prOpenTarg',[])
|
||||||
%if %%target.prOpenTargJob == %%job
|
%if %%target.prOpenTargJob == %%job
|
||||||
- targets: [ "%%target.prOpenTargIP:%%target.prOpenTargPort" ]
|
%if %%first
|
||||||
|
"%%target.prOpenTargIP:%%target.prOpenTargPort"%slurp
|
||||||
|
%set first = False
|
||||||
|
%else
|
||||||
|
, "%%target.prOpenTargIP:%%target.prOpenTargPort"%slurp
|
||||||
|
%end if
|
||||||
%end if
|
%end if
|
||||||
%end for
|
%end for
|
||||||
|
]
|
||||||
%end for
|
%end for
|
||||||
|
|
||||||
%if %%getVar('activerAlertmanager','non') == 'oui'
|
%if %%getVar('activerAlertmanager','non') == 'oui'
|
||||||
|
|
Loading…
Reference in New Issue