I want to add my HTTPS target URL to Prometheus, an error like this appears:
"https://myDomain.dev" is not a valid hostname"
my domain can access and run using proxy pass Nginx with port 9100(basically I made a domain for node-exporter)
my configuration prometheus.yml
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: 'domain-job'
static_configs:
- targets: ['https://myDomain.dev']
is there any more configuration to add?
Use the following configuration:
- job_name: 'domain-job'
scheme: https
static_configs:
- targets: ['myDomain.dev']
Besides configuring the https scheme, if you need to skip the tls or need to configure a bearer token, this config will work:
job_name: 'spring-actuator'
scheme: https
authorization:
type: Bearer
credentials: <your_token>
tls_config:
insecure_skip_verify: true
metrics_path: '/actuator/prometheus'
scrape_interval: 5s
static_configs:
- targets: ['your_ip:your_port']
If you need other configuration, this reference might help you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With