Skip to content

no DNS resolution when using file based targets #1099

Closed

Description

@kerus1024

i'm configuring probes using file-based targets, and it seems like DNS resolution isn't happening when the targets are specified as domain names.

here's my configuration:

surfacer {
  type: PROBESTATUS
  metrics_buffer_size: 1000000
  probestatus_surfacer {
    max_targets_per_probe: 500
  }
}

surfacer {
  type: PROMETHEUS
  prometheus_surfacer {
    metrics_prefix: "cloudprober_"
    metrics_buffer_size: 1000000
  }
  add_failure_metric: true
}

# include "probe-config-icmp.cfg"
probe {
  name: "icmp-1s"
  type: PING
  interval_msec: 1000
  timeout_msec: 1000
  targets {
    file_targets {
      file_path: "./targets-icmp.yaml"
      re_eval_sec: 60
    }
    dns_options {
      server: "8.8.8.8"
      ttl_sec: 300
      max_cache_age_sec: 3600
    }
  }
  latency_unit: "ms"
  ip_version: IPV4
  ping_probe {
  }
  additional_label {
    key: "group"
    value: "@target.label.group@"
  }
}

# include "probe-config-tcp.cfg"
probe {
  name: "tcp-30s"
  type: TCP
  interval_msec: 30000
  timeout_msec: 30000
  targets {
    file_targets {
      file_path: "./targets-tcp.yaml"
      re_eval_sec: 60
    }
    dns_options {
      server: "8.8.8.8"
      ttl_sec: 300
      max_cache_age_sec: 3600
    }
  }
  tcp_probe {
    resolve_first: true
  }
  latency_unit: "ms"
  additional_label {
    key: "group"
    value: "@target.label.group@"
  }
}

yaml targets-icmp.yaml

---
resource:
- name: time.google.com.
  labels:
    group: google

yaml targets-tcp.yaml

---
resource:
- name: fcm.googleapis.com.
  port: 443
  labels:
    group: google

and here’s the output:

time=2025-07-16T08:47:22.192Z level=INFO source=targets/resolver/resolver.go:287 msg="Overriding default resolver with: 8.8.8.8" system=cloudprober probe=icmp-1s
time=2025-07-16T08:47:22.192Z level=INFO source=internal/rds/file/file.go:237 msg="file_provider: Determined file format from file name: YAML" system=cloudprober probe=icmp-1s
time=2025-07-16T08:47:22.192Z level=INFO source=prober/prober.go:119 msg="Creating a PING probe: icmp-1s" system=cloudprober component=global
time=2025-07-16T08:47:22.192Z level=INFO source=targets/resolver/resolver.go:287 msg="Overriding default resolver with: 8.8.8.8" system=cloudprober probe=tcp-30s
time=2025-07-16T08:47:22.192Z level=INFO source=internal/rds/file/file.go:237 msg="file_provider: Determined file format from file name: YAML" system=cloudprober probe=tcp-30s
time=2025-07-16T08:47:22.192Z level=INFO source=prober/prober.go:119 msg="Creating a TCP probe: tcp-30s" system=cloudprober component=global
time=2025-07-16T08:47:22.192Z level=INFO source=internal/rds/file/file.go:200 msg="file_provider(./targets-icmp.yaml): Read 1 endpoints" system=cloudprober probe=icmp-1s
time=2025-07-16T08:47:22.193Z level=INFO source=surfacers/internal/probestatus/probestatus.go:210 msg="Initialized status surfacer at the URL: /status" system=cloudprober surfacer=probestatus
time=2025-07-16T08:47:22.193Z level=INFO source=internal/rds/file/file.go:200 msg="file_provider(./targets-tcp.yaml): Read 1 endpoints" system=cloudprober probe=tcp-30s
time=2025-07-16T08:47:22.196Z level=INFO source=surfacers/internal/prometheus/prometheus.go:204 msg="Initialized prometheus exporter at the URL: /metrics" system=cloudprober surfacer=prometheus
time=2025-07-16T08:47:22.198Z level=INFO source=internal/sysvars/sysvars.go:201 msg="1752655642 labels=ptype=sysvars,probe=sysvars hostname=\"@@@@@\" start_timestamp=\"1752655642\" version=\"v0.14.0\"" system=cloudprober component=sysvars
time=2025-07-16T08:47:22.198Z level=INFO source=prober/prober.go:193 msg="Starting probe: icmp-1s" system=cloudprober component=global
time=2025-07-16T08:47:23.199Z level=WARN source=probes/ping/ping.go:233 msg="Bad target: time.google.com.. Err: no IP address for the resource: time.google.com." system=cloudprober probe=icmp-1s
time=2025-07-16T08:47:28.199Z level=WARN source=probes/ping/ping.go:233 msg="Bad target: time.google.com.. Err: no IP address for the resource: time.google.com." system=cloudprober probe=icmp-1s
time=2025-07-16T08:47:30.412Z level=INFO source=prober/prober.go:193 msg="Starting probe: tcp-30s" system=cloudprober component=global
time=2025-07-16T08:47:30.412Z level=INFO source=probes/common/sched/sched.go:102 msg="Targets update interval: 1m0s" system=cloudprober probe=tcp-30s
time=2025-07-16T08:47:30.412Z level=INFO source=probes/common/sched/sched.go:200 msg="Probe(tcp-30s) targets updated: map[fcm.googleapis.com.__443_group:group:ADD]" system=cloudprober probe=tcp-30s
time=2025-07-16T08:47:30.412Z level=ERROR source=probes/tcp/tcp.go:218 msg="target: fcm.googleapis.com., resolve error: no IP address for the resource: fcm.googleapis.com." system=cloudprober probe=tcp-30s
time=2025-07-16T08:47:33.199Z level=WARN source=probes/ping/ping.go:233 msg="Bad target: time.google.com.. Err: no IP address for the resource: time.google.com." system=cloudprober probe=icmp-1s
time=2025-07-16T08:47:38.199Z level=WARN source=probes/ping/ping.go:233 msg="Bad target: time.google.com.. Err: no IP address for the resource: time.google.com." system=cloudprober probe=icmp-1s
time=2025-07-16T08:47:43.199Z level=WARN source=probes/ping/ping.go:233 msg="Bad target: time.google.com.. Err: no IP address for the resource: time.google.com." system=cloudprober probe=icmp-1s
time=2025-07-16T08:47:48.199Z level=WARN source=probes/ping/ping.go:233 msg="Bad target: time.google.com.. Err: no IP address for the resource: time.google.com." system=cloudprober probe=icmp-1s
time=2025-07-16T08:47:53.198Z level=WARN source=probes/ping/ping.go:233 msg="Bad target: time.google.com.. Err: no IP address for the resource: time.google.com." system=cloudprober probe=icmp-1s
time=2025-07-16T08:47:58.199Z level=WARN source=probes/ping/ping.go:233 msg="Bad target: time.google.com.. Err: no IP address for the resource: time.google.com." system=cloudprober probe=icmp-1s
time=2025-07-16T08:48:00.413Z level=ERROR source=probes/tcp/tcp.go:218 msg="target: fcm.googleapis.com., resolve error: no IP address for the resource: fcm.googleapis.com." system=cloudprober probe=tcp-30s
time=2025-07-16T08:48:03.199Z level=WARN source=probes/ping/ping.go:233 msg="Bad target: time.google.com.. Err: no IP address for the resource: time.google.com." system=cloudprober probe=icmp-1s
time=2025-07-16T08:48:08.199Z level=WARN source=probes/ping/ping.go:233 msg="Bad target: time.google.com.. Err: no IP address for the resource: time.google.com." system=cloudprober probe=icmp-1s

i'm not running on GCE/Kubernetes, or any cloud environment
is there another option or workaround to support DNS based dynamic hosts in this setup?

i am looking to monitor 100+ domain named hosts

Activity

  1. added
    enhancement
    on Jul 16, 2025
  2. manugarg commented on Jul 16, 2025

    @manugarg
    Contributor

    Thanks @kerus1024! I could confirm that this is a bug. I think I know what's going on. I'll add more details shortly.

  3. added
    bug
    and removed
    enhancement
    on Jul 16, 2025
  4. manugarg commented on Jul 16, 2025

    @manugarg
    Contributor

    I've a PR with the fix: #1100

  5. added this to the v0.14.1 milestone on Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions