mirror of
https://github.com/ribbybibby/ssl_exporter.git
synced 2026-02-14 17:49:58 +00:00
* feat: add remote_file probe * fix: use tls module config * chore: write http/https tests for probing remote file * chore: get rid of useless lines * fix: get rid of useless file download, check body directly * fix: use checkCertificateMetrics to actually check values * Rename remote_file to http_file You can fetch remote content with a lot of different protocols, so I think it's worth being specific here. As part of this change I've fixed up some of the logic in the code. I've also created a separate `http_file` block in the module config. * Actually include renamed files --------- Co-authored-by: Anthony LE BERRE <aleberre@veepee.com> Co-authored-by: Rob Best <rob.best@jetstack.io>
52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
global:
|
|
scrape_interval: 1m
|
|
|
|
scrape_configs:
|
|
- job_name: 'ssl'
|
|
metrics_path: /probe
|
|
static_configs:
|
|
- targets:
|
|
- 'google.co.uk:443'
|
|
- 'prometheus.io:443'
|
|
- 'example.com:443'
|
|
- 'helloworld.letsencrypt.org:443'
|
|
- 'expired.badssl.com:443'
|
|
relabel_configs:
|
|
- source_labels: [__address__]
|
|
target_label: __param_target
|
|
- source_labels: [__param_target]
|
|
target_label: instance
|
|
- target_label: __address__
|
|
replacement: 127.0.0.1:9219 # SSL exporter.
|
|
- job_name: 'ssl-files'
|
|
metrics_path: /probe
|
|
params:
|
|
module: ["file"]
|
|
target: ["/etc/ssl/**/*.pem"]
|
|
static_configs:
|
|
- targets:
|
|
- 127.0.0.1:9219
|
|
- job_name: 'ssl-kubernetes-secrets'
|
|
metrics_path: /probe
|
|
params:
|
|
module: ["kubernetes"]
|
|
target: ["kube-system/*"]
|
|
static_configs:
|
|
- targets:
|
|
- 127.0.0.1:9219
|
|
- job_name: 'ssl-http-files'
|
|
metrics_path: /probe
|
|
params:
|
|
module: ["http_file"]
|
|
static_configs:
|
|
- targets:
|
|
- 'https://www.paypalobjects.com/marketing/web/logos/paypal_com.pem'
|
|
- 'https://d3frv9g52qce38.cloudfront.net/amazondefault/amazon_web_services_inc_2024.pem'
|
|
relabel_configs:
|
|
- source_labels: [__address__]
|
|
target_label: __param_target
|
|
- source_labels: [__param_target]
|
|
target_label: instance
|
|
- target_label: __address__
|
|
replacement: 127.0.0.1:9219
|