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?
2
Answers
Use the following configuration:
Besides configuring the https scheme, if you need to skip the tls or need to configure a bearer token, this config will work:
If you need other configuration, this reference might help you.