prometheus/blackbox_exporter

Checking config FAILED: parsing YAML file config: "http://prometheus.io" is not a valid hostname

vegaoqiang opened this issue · 1 comments

Host operating system:

Linux XXX 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

blackbox_exporter version:

blackbox_exporter-0.25.0.linux-amd64

What is the blackbox.yml module config.

used defalut blackbox.yml, not coustom

What is the prometheus.yml scrape config.

# my global config
global:
  scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
  evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
  # scrape_timeout is set to the global default (10s).

# Alertmanager configuration
alerting:
  alertmanagers:
    - static_configs:
        - targets:
            - 127.0.0.1:9093

# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
     - "first_rules.yml"
  # - "second_rules.yml"

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: "prometheus"

    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.

    static_configs:
      - targets: ["localhost:9090"]

  - job_name: 'blackbox'
    metrics_path: /probe
    params:
      module: [http_2xx]
    static_configs:
      - targets:
        - http://prometheus.io

What logging output did you get from adding &debug=true to the probe URL?

What did you do that produced an error?

./promtool check config ./prometheus.yml

What did you expect to see?

everything is success

What did you see instead?

Checking prometheus.yml
  FAILED: parsing YAML file prometheus.yml: "http://prometheus.io" is not a valid hostname

myself proplem