Telegraf cannot reach URL

  Kiến thức lập trình

I wrote a small telegraf.conf. When I put it in a docker compose it works. When I put it in my Kubernetes CLuster it does not.

The logs say: [inputs.http] Error in plugin: [url=https://dwd.api.proxy.bund.dev/v30/stationOverviewExtended?stationIds=10838,10840]: Get “https://dwd.api.proxy.bund.dev/v30/stationOverviewExtended?stationIds=10838,10840”: context deadline exceeded (Client.Timeout exceeded while awaiting headers)

I tried with http://google.de as altenrative url (for debugging) with the same result.

[agent]
  interval = "10s"
  round_interval = true
  metric_batch_size = 1000
  metric_buffer_limit = 10000
  collection_jitter = "0s"
  flush_interval = "10s"
  flush_jitter = "0s"
  precision = ""
  debug = false
  quiet = false
  logfile = ""
  hostname = ""
  omit_hostname = false

[[inputs.http]]
  ## URL zur GET-Anfrage
  urls = [
    "https://dwd.api.proxy.bund.dev/v30/stationOverviewExtended?stationIds=10838,10840"
  ]
  method = "GET"
  interval = "10s"
  response_timeout = "5s"
  data_format = "json"

[[outputs.influxdb_v2]]
  ## InfluxDB 2.0 URL
  urls = ["http://influxdb-nfluxdb2.monitoring.svc.cluster.local:8086"]
  organization = "influxdata"
  bucket = "default"
  token = "securetoken"

I expected the config to work both with docker compose and within Kubernetes(K3s).

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website Kho Theme wordpress Kho Theme WP Theme WP

LEAVE A COMMENT