Skip to content

Commit

Permalink
add metrics_path
Browse files Browse the repository at this point in the history
  • Loading branch information
lhpqaq committed Dec 24, 2024
1 parent ca61706 commit b3a0550
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
<#list scrape_jobs as job>
- job_name: '${job.name}'
<#if job.metrics_path??>
metrics_path: "${job.metrics_path}"
</#if>
file_sd_configs:
- files: ['${job.targets_file}']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public Map<String, Object> agentJob() {
job.put("name", BM_AGENT_JOB_NAME);
job.put("targets_file", targetsConfigFile(BM_AGENT_JOB_NAME));
job.put("targets_list", getAllHost());
job.put("metrics_path", "/actuator/prometheus");
agentScrapeJob = job;
return LocalSettings.configurations(getServiceName(), "prometheus");
}
Expand Down

0 comments on commit b3a0550

Please sign in to comment.