Scrape_failure_log_file not found in type config.plain

Hello there. Prometheus worked in the past but not anymore, could you please help me to troubleshoot that?

The error message:

caller=main.go:537 level=error
msg=“Error loading config (–config.file=/etc/prometheus/prometheus.yml)”
file=/etc/prometheus/prometheus.yml
err=“parsing YAML file /etc/prometheus/prometheus.yml: yaml: unmarshal errors:\n line 13: field scrape_failure_log_file not found in type config.plain\n line 127: field fallback_scrape_protocol not found in type config.ScrapeConfig\n line 133: field scrape_failure_log_file not found in type config.ScrapeConfig”

The doc says it’s pretty good to have both scrape_failure_log_file and fallback_scrape_protocol.

My config:

global:
  scrape_interval: 60s
  evaluation_interval: 60s
  body_size_limit: 15MB
  sample_limit: 2000
  target_limit: 30
  label_limit: 30
  label_name_length_limit: 200
  label_value_length_limit: 200
  query_log_file: query.log
  scrape_failure_log_file: fail.log    # < === line 13
...
scrape_configs:
  - job_name: prometheus
    fallback_scrape_protocol: PrometheusText0.0.4     # < === line 127
    ...
    scrape_failure_log_file: fail_prom.log    # < === line 133
...

I’m starting it this way:


docker run -d --name prometheus -p 9090:9090 --group-add 988 --restart=unless-stopped \
-v "/etc/prometheus.yml":"/etc/prometheus/prometheus.yml" \
--network=monit_network \
-v prometheus-volume:/prometheus \
-v /tmp/openvpn_targets:/tmp/openvpn_targets \
-v /var/run/docker.sock:/var/run/docker.sock \
--add-host=host.docker.internal:"$internal_ip" \
prom/prometheus \
--config.file=/etc/prometheus/prometheus.yml \
--storage.tsdb.path=/prometheus \
--web.console.libraries=/etc/prometheus/console_libraries \
--web.console.templates=/etc/prometheus/consoles \
--web.enable-lifecycle \
--web.enable-admin-api

The container is in the “exited” state. No more log messages besides that one above, repeated many times.

docker run --rm prom/prometheus:latest --version

prometheus, version 2.53.5 (branch: HEAD, revision: d344ea7bf4cc9e9e131a0318d10025982e9c4cc1)
  build user:       root@31e33add4c49
  build date:       20250630-10:20:25    
  go version:       go1.23.10
  platform:         linux/arm64
  tags:             netgo,builtinassets,stringlabels

What am I doing wrong? Any chances this build date: 20250630-10:20:25 is the issue, because everything worked last week and today I had to run full restart so newer version was downloaded?