Skip to main content Logo

Quis custodiet ipsos custodes?
Home | About | All pages | Cluster Status | RSS Feed

Traceroute IPv6 to Smokeping Target config

Published: 05-03-2017 | Author: Remy van Elst | Text only version of this article

❗ This post is over seven years old. It may no longer be up to date. Opinions may have changed.

This little one-liner converts the output of traceroute for IPv6 to Smokeping Target output. This way you can build your smokeping config faster.

Recently I removed all Google Ads from this site due to their invasive tracking, as well as Google Analytics. Please, if you found this content useful, consider a small donation using any of the options below:

I'm developing an open source monitoring app called Leaf Node Monitoring, for windows, linux & android. Go check it out!

Consider sponsoring me on Github. It means the world to me if you show your appreciation and you'll help pay the server costs.

You can also sponsor me by getting a Digital Ocean VPS. With this referral link you'll get $200 credit for 60 days. Spend $25 after your credit expires and I'll get $25!

Do note you have to setup your IPv6 probe as described here. Later in this article I'll describe the inheritance by example.

I had only setup my smokepings for IPv4. Recently we had an issue were network config was borked and the whole IPv4 network was not announced via BGP anymore. I was at home troubleshooting, but finding nothing since I have native IPv6 and that part still worked. My Smokeping did show loss, and that explicitly uses IPv4. That helped with the debugging a lot. I have a IPv4 version of this article as well.

You can see smokeping in action here at serverius. More info about Smokeping here on the website.

Traceroute one liner

This is the command to get the Smokeping config:

traceroute -6 -w 3 | grep -v "*" | sed -e 's/(//g' -e 's/)//g' | awk '{ gsub(/\./,"_",$2); gsub(/\:/,"_",$2); print "++ "$2"\nmenu = "$2" - "$3"\ntitle = "$2" - "$3"\nhost = "$3"\n"}'

The "*" are grepped out, the () are removed from the IP address and we also replace . and : in the hostname, the Smokeping config doesn't allow that.


This will give you something like this (for

++ lo0_dr11_d12_xs4all_net
menu = lo0_dr11_d12_xs4all_net - 2001:888:1:1001::1
title = lo0_dr11_d12_xs4all_net - 2001:888:1:1001::1
host = 2001:888:1:1001::1

++ 0_ae21_xr3_3d12_xs4all_net
menu = 0_ae21_xr3_3d12_xs4all_net - 2001:888:1:4024::1
title = 0_ae21_xr3_3d12_xs4all_net - 2001:888:1:4024::1
host = 2001:888:1:4024::1

++ 0_ge-0-2-0_xr1_sara_xs4all_net
menu = 0_ge-0-2-0_xr1_sara_xs4all_net - 2001:888:1:4006::1
title = 0_ge-0-2-0_xr1_sara_xs4all_net - 2001:888:1:4006::1
host = 2001:888:1:4006::1

++ 10ge12-12_core1_ams1_he_net
menu = 10ge12-12_core1_ams1_he_net - 2001:470:0:e8::1
title = 10ge12-12_core1_ams1_he_net - 2001:470:0:e8::1
host = 2001:470:0:e8::1

++ amsix_true_nl
menu = amsix_true_nl - 2001:7f8:1::a501:5703:1
title = amsix_true_nl - 2001:7f8:1::a501:5703:1
host = 2001:7f8:1::a501:5703:1

++ 2001_990_0_1378__1a
menu = 2001_990_0_1378__1a - 2001:990:0:1378::1a
title = 2001_990_0_1378__1a - 2001:990:0:1378::1a
host = 2001:990:0:1378::1a

++ tweakers_net
menu = tweakers_net - 2001:9a8:0:e:1337:0:80:1
title = tweakers_net - 2001:9a8:0:e:1337:0:80:1
host = 2001:9a8:0:e:1337:0:80:1

This can be pasted right in to Smokeping's config.

Probe config

On Debian, add the FPing6 probe to /etc/smokeping/config.d/Probes:

*** Probes ***

+ FPing
binary = /usr/bin/fping

+ FPing6
binary = /usr/bin/fping6

The documentation has a bigger example.

The inherentance in the Targets configuration bit me a bit. If your default probe is FPing, you cannot add the probe = FPing6 to a specific check. You need to make a seperate section. So instead of this:

+ cloudvps

menu = cloudvps
title = CloudVPS

++ rt-eu01_cloudvps_nl
menu = rt-eu01_cloudvps_nl -
title = rt-eu01_cloudvps_nl -
host =

++ rt-eq01_cloudvps_nl
menu = rt-eq01_cloudvps_nl - 2001:4cb8:40b:1::1d0a
title = rt-eq01_cloudvps_nl - 2001:4cb8:40b:1::1d0a
host = 2001:4cb8:40b:1::1d0a

You need to seperate the IPv6 hosts out to a new section:

+ cloudvpsv6

menu = cloudvpsv6
title = CloudVPS IPv6
probe = FPing6

++ rt-eq01_cloudvps_nl
menu = rt-eq01_cloudvps_nl - 2001:4cb8:40b:1::1d0a
title = rt-eq01_cloudvps_nl - 2001:4cb8:40b:1::1d0a
host = 2001:4cb8:40b:1::1d0a

No IPv6?

If a service doesn't have IPv6 setup, it will fail: Name or service not known
Cannot handle "host" cmdline arg `' on position 1 (argc 4)

I use the following version of Traceroute:

$ traceroute -V
Modern traceroute for Linux, version 2.1.0
Copyright (c) 2016  Dmitry Butskoy,   License: GPL v2 or any later
Tags: ipv6 , network , smokeping , snippets , traceroute