SuperQ / smokeping_prober

Prometheus style smokeping
Apache License 2.0
554 stars 73 forks source link

debugging issue #155

Closed markschultz closed 3 months ago

markschultz commented 3 months ago

I'm trying to run smokeping in a docker-compose setup like this:

  smokeping_prober:
    image: quay.io/superq/smokeping-prober:latest
    container_name: Smokeping-Prober
    hostname: smokeping
    ports:
      - 9374:9374
    networks:
      - prometheus-net
    priviledged: true
    user: 1026:100
    command:
      - '--privileged'
      - '--log.level=debug'
      - '--config.file=/etc/smokeping/smokeping.yml'
    volumes:
      - /volume1/docker/smokeping:/etc/smokeping/:ro
    restart: on-failure:5

using the following smokeping.yml

targets:
- hosts:
  - www.google.com
  - www.twitter.com
  - 1.1.1.1
  - 8.8.8.8
  - localhost
  - 192.168.1.1

the metrics i get in prometheus show that it doesn't seem to be pinging at all

# HELP smokeping_requests_total Number of ping requests sent
# TYPE smokeping_requests_total counter
smokeping_requests_total{host="1.1.1.1",ip="1.1.1.1",source=""} 0
smokeping_requests_total{host="192.168.1.1",ip="192.168.1.1",source=""} 0
smokeping_requests_total{host="8.8.8.8",ip="8.8.8.8",source=""} 0
smokeping_requests_total{host="localhost",ip="127.0.0.1",source=""} 0
smokeping_requests_total{host="www.google.com",ip="<<IP>>",source=""} 0
smokeping_requests_total{host="www.twitter.com",ip="<<IP>>",source=""} 0

even with debugging on, there doesn't seem to be any error messages

ts=2024-06-04T22:09:34.418Z caller=main.go:228 level=info msg="Starting smokeping_prober" version="(version=0.8.1, branch=HEAD, revision=71f17c17eef4eb8b3d2dbd2687ae703d480f7d02)"
ts=2024-06-04T22:09:34.418Z caller=main.go:229 level=info msg="Build context" build_context="(go=go1.22.1, platform=linux/amd64, user=root@ed4c47e0e006, date=20240402-19:08:02, tags=unknown)"
ts=2024-06-04T22:09:34.556Z caller=main.go:109 level=info msg="Starting prober" address=www.google.com interval=1s size_bytes=56 source=
ts=2024-06-04T22:09:34.700Z caller=main.go:109 level=info msg="Starting prober" address=www.twitter.com interval=1s size_bytes=56 source=
ts=2024-06-04T22:09:34.843Z caller=main.go:109 level=info msg="Starting prober" address=1.1.1.1 interval=1s size_bytes=56 source=
ts=2024-06-04T22:09:34.986Z caller=main.go:109 level=info msg="Starting prober" address=8.8.8.8 interval=1s size_bytes=56 source=
ts=2024-06-04T22:09:35.273Z caller=main.go:109 level=info msg="Starting prober" address=localhost interval=1s size_bytes=56 source=
ts=2024-06-04T22:09:35.417Z caller=main.go:109 level=info msg="Starting prober" address=192.168.1.1 interval=1s size_bytes=56 source=
ts=2024-06-04T22:09:35.561Z caller=tls_config.go:313 level=info msg="Listening on" address=[::]:9374
ts=2024-06-04T22:09:35.561Z caller=tls_config.go:316 level=info msg="TLS is disabled." http2=false address=[::]:9374

does anyone have any idea what might be wrong with my setup or suggestions for diagnosing the problem?

markschultz commented 3 months ago

huh, turns out it was the user line in the docker-compose that needed to be removed. i guess thats a lesson against copy pasting without full understanding.