Skip to content
This repository was archived by the owner on Mar 6, 2023. It is now read-only.

Commit 8b22ab6

Browse files
Merge pull request #10 from cloudalchemy/prometheus_job
Prometheus job
2 parents 17c5b9a + 3adab4a commit 8b22ab6

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ env:
88
- ANSIBLE=2.2.3 PROMETHEUS=2.0.0
99
- ANSIBLE=2.3.2 PROMETHEUS=1.8.2
1010
- ANSIBLE=2.3.2 PROMETHEUS=2.0.0
11-
- ANSIBLE=2.4.1 PROMETHEUS=1.8.2
12-
- ANSIBLE=2.4.1 PROMETHEUS=2.0.0
11+
- ANSIBLE=2.4.2 PROMETHEUS=1.8.2
12+
- ANSIBLE=2.4.2 PROMETHEUS=2.0.0
1313
install:
1414
- pip install ansible==${ANSIBLE} ansible-lint>=3.4.15 molecule==1.25.0 docker git-semver testinfra>=1.7.0
1515
script:

templates/prometheus.yml.j2

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,14 @@ alerting:
2020

2121
scrape_configs:
2222
- job_name: "prometheus"
23-
scrape_interval: "5s"
2423
scheme: http
2524
metrics_path: {{ "/" + prometheus_web_external_url.split('/')[-1] }}/metrics
2625
{# metrics_path: /{{ prometheus_web_external_url.split('/')[3:]|join('/') }}metrics #}
2726
static_configs:
2827
- targets:
29-
- 'localhost:9090'
28+
- "{{ ansible_fqdn | default(ansible_host) | default('localhost') }}:9090"
3029

3130
- job_name: "node"
32-
scrape_interval: 30s
33-
scrape_timeout: 10s
3431
metrics_path: /metrics
3532
file_sd_configs:
3633
- files:

0 commit comments

Comments
 (0)