Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ai3
float
Commits
8485e2ff
Commit
8485e2ff
authored
Jun 10, 2019
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a blackbox probe for public HTTPS
parent
6e95949f
Pipeline
#3363
passed with stage
in 4 minutes and 47 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
+23
-3
roles/prometheus/templates/blackbox.yml.j2
roles/prometheus/templates/blackbox.yml.j2
+20
-0
roles/prometheus/templates/prometheus.yml.j2
roles/prometheus/templates/prometheus.yml.j2
+3
-3
No files found.
roles/prometheus/templates/blackbox.yml.j2
View file @
8485e2ff
modules:
modules:
# Healthcheck probe to use on internal targets.
http_health:
http_health:
prober: http
prober: http
timeout: 5s
timeout: 5s
...
@@ -13,6 +14,25 @@ modules:
...
@@ -13,6 +14,25 @@ modules:
preferred_ip_protocol: ip4
preferred_ip_protocol: ip4
tls_config:
tls_config:
ca_file: /etc/credentials/x509/prometheus/ca.pem
ca_file: /etc/credentials/x509/prometheus/ca.pem
cert_file: /etc/credentials/x509/prometheus/client/cert.pem
key_file: /etc/credentials/x509/prometheus/client/private_key.pem
insecure_skip_verify: false
# HTTP probe for the main public website.
http_public:
prober: http
timeout: 5s
http:
valid_status_codes: [200, 301, 302, 307]
method: GET
headers:
Host: "www.{{ domain_public[0] }}"
fail_if_ssl: false
fail_if_not_ssl: true
preferred_ip_protocol: ip4
tls_config:
server_name: "www.{{ domain_public[0] }}"
ca_file: /etc/ssl/certs/ca-certificates.crt
insecure_skip_verify: false
insecure_skip_verify: false
ping:
ping:
...
...
roles/prometheus/templates/prometheus.yml.j2
View file @
8485e2ff
...
@@ -88,7 +88,7 @@ scrape_configs:
...
@@ -88,7 +88,7 @@ scrape_configs:
{% endfor %}
{% endfor %}
{# Blackbox probe
r configs: host targets (icmp)
#}
{# Blackbox probe
s
#}
{% for prober_host in groups['prometheus']|sort %}
{% for prober_host in groups['prometheus']|sort %}
- job_name: "prober_ping_{{ loop.index }}"
- job_name: "prober_ping_{{ loop.index }}"
...
@@ -120,7 +120,7 @@ scrape_configs:
...
@@ -120,7 +120,7 @@ scrape_configs:
- job_name: "prober_https_{{ loop.index }}"
- job_name: "prober_https_{{ loop.index }}"
metrics_path: "/probe"
metrics_path: "/probe"
params:
params:
module: [http_
health
]
module: [http_
public
]
relabel_configs:
relabel_configs:
- source_labels: [__address__]
- source_labels: [__address__]
target_label: target
target_label: target
...
@@ -137,7 +137,7 @@ scrape_configs:
...
@@ -137,7 +137,7 @@ scrape_configs:
static_configs:
static_configs:
- targets:
- targets:
{% for host in groups['frontend']|sort %}
{% for host in groups['frontend']|sort %}
- "https://{{ host }}/
healthcheck
"
- "https://{{ host }}/"
{% endfor %}
{% endfor %}
labels:
labels:
zone: public
zone: public
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment