syepes / network_exporter

ICMP / Ping & MTR & TCP Port & HTTP Get - Network Prometheus exporter
Apache License 2.0
336 stars 60 forks source link

Only one MTR probe is working although multiple MTR targets are configured #2

Closed guyellen closed 4 years ago

guyellen commented 4 years ago

Hi,

I've configured multiple MTR targets: conf: refresh: 15m nameserver: 192.168.1.1:53

icmp: interval: 3s timeout: 1s count: 10

mtr: interval: 3s timeout: 500ms max-hops: 30 count: 3

tcp: interval: 3s timeout: 1s

http_get: interval: 15m timeout: 5s

targets:

However, in the exporter, i can see only one MTR. also MTR count metric is 1

syepes commented 4 years ago

If the above is your current config, this is normal you have only defined one MTR target. For this target you will see the traceroute path in the metrics mtr_rtt_seconds..

guyellen commented 4 years ago

Sorry, this is the correct configuration:

conf: refresh: 15m

icmp: interval: 3s timeout: 1s count: 10

mtr: interval: 3s timeout: 500ms max-hops: 30 count: 3

tcp: interval: 3s timeout: 1s

http_get: interval: 15m timeout: 5s

targets:

See attached.

ping_exporter_metrics.txt

syepes commented 4 years ago

Looking at this I found a labeling issue with the mtr_hops metric but it should not be related.

Can you please try running the 1.3.1 version with the logging level at debug mode --log.level=debug and when the output + the metrics

guyellen commented 4 years ago

it works perfectly on 1.3.1: mtr_targets 2 see attached. To run on debug mode, can i add parameter to docker run or should i change the Dockerfile and build? Do you need still the debug log? Thanks!! metrics1_3_1.txt

syepes commented 4 years ago

From the image it looks ok now.

If you want you can use the same images, you just need to pass the params: docker run --rm -p 9427:9427 -v $PWD/ping_exporter.yml:/ping_exporter.yml:ro --name ping_exporter syepes/ping_exporter /app/ping_exporter --log.level=debug