#Exporter not starting over HTTPS despite tls parameter

1 messages · Page 1 of 1 (latest)

strange cliff
#

Hello team,
im struggling to setup exporter to expose information over https instead of http. Certificates were created according to the documentation. Even with debug log level i don't see its looking and loading the certificates.
Here is the lab config:
Admin:
httpsd:
listen: localhost:8887
tls:
cert_file: cert/prom-sd-cert.pem
key_file: cert/prom-sd-key.pem

Tools:
grafana_api_token: 'eyJrIjoiTGt3VzlhMGFOZ1p5S0o3QzJpZUliTkZDZHg0SE1FZEIiLCJuIjoia2V5MSIsImlkIjoxfQ=='

Exporters:
prom-sd:
exporter: Prometheus
local_http_addr: localhost
tls:
cert_key: cert/prom-sd-cert.pem
cert_file: cert/prom-sd-key.pem
use_insecure_tls: false

Defaults:
collectors:
- Zapi
- ZapiPerf

Pollers:
barbuda:
datacenter: MUC
addr: barbuda.***.com
auth_style: basic_auth
username: admin
password: ****
use_insecure_tls: true
exporters:
- prom-sd

antigua:
datacenter: MUC
addr: antigua.***.com
auth_style: basic_auth
username: admin
password: ****
use_insecure_tls: true
exporters:
- prom-sd

Log:
2023-09-18T10:44:15+02:00 INF prometheus/httpd.go:40 > server listen Poller=barbuda exporter=prom-sd url=http://localhost:12000/metrics

high hatch
#

And that is the output of harvest admin start ?

urban cipher
#

hi @strange cliff can you try changing your prom-sd exporter's tls section to match the sections here? https://netapp.github.io/harvest/nightly/prometheus-exporter/#configure-harvest-prometheus-exporter-to-use-tls

You want cert_file and key_file instead of what you pasted above which has cert_key

Also make sure those config keys point to the correct files. I think your files are swapped. The prom-sd-cert.pem should have -----BEGIN CERTIFICATE----- at the top of the file while prom-sd-key.pem should have -----BEGIN PRIVATE KEY-----

strange cliff
strange cliff