How to Configure Scraper to Skip Validation on Self-signed Certificates

I cannot figure out how to configure the scraper on InfluxDB OSS 2.0.7.
In particular, I am trying to skip the validation on self-signed certificates.

The release notes for v2.0.2 mention that the following features were added, but nowhere does it mention how to configure them.

  • Allow scraper to ignore insecure certificates on an endpoint.
  • Allow self-signed certificates for scraper targets.

The log continues to output the following each time a scrape is attempted.
remote error: tls: bad certificate

I’ve spent a considerable amount of time trying to figure this out on my own. If anyone could help me figure out how to utilize this feature, I’d really appreciate it.

Thank you!

@EytyxfWMnMj74Y-KoiCn it looks like the change was API-only. I’ll open an issue against the UI repository, but in the meantime you can curl to make it work. Something like this:

curl \
    -H "Authorization: Token <your-token>" \
    -H "Content-Type: application/json" \
    -XPOST \
    "<your-server-url>/api/v2/scrapers" \
    -d '{
  "name": "<your-scraper-name>",
  "type": "prometheus",
  "url": "<url-to-scrape>",
  "orgID": "<your-org-id>",
  "bucketID": "<your-bucket-id>",
  "allowInsecure": true
}'
1 Like

UI issue here: Expose toggle for `allowInsecure` when creating new scrapers · Issue #1718 · influxdata/ui · GitHub

Thank you very much sir.