balena-io-modules / device-diagnostics

on-device diagnostics tool
9 stars 8 forks source link

Check for IPv6 addresses #286

Closed zwhitchcox closed 3 years ago

zwhitchcox commented 3 years ago

the upstream dns diagnostics check does not currently check for IPv6 addresses

Change-type: patch

klutchell commented 3 years ago

@zwhitchcox I was just about to merge this change to balena-proxy but it seems that this command doesn't work anymore and it prints no results. Specifically it is mangled by the awk '{print $NF}'. We don't want to print the last column.

root@d4bd107:~# journalctl _SYSTEMD_INVOCATION_ID="$(systemctl show -p InvocationID --value dnsmasq.service)" | awk '{print $NF}'                             --
1631534793
entries.
55468
0
0
0
39
root@d4bd107:~# journalctl _SYSTEMD_INVOCATION_ID="$(systemctl show -p InvocationID --value dnsmasq.service)"                     
-- Logs begin at Fri 2021-09-03 13:49:37 UTC, end at Mon 2021-09-13 12:12:50 UTC. --
Sep 13 12:06:33 d4bd107 dnsmasq[1485]: dnsmasq[1485]: time 1631534793
Sep 13 12:06:33 d4bd107 dnsmasq[1485]: dnsmasq[1485]: cache size 150, 0/69080 cache insertions re-used unexpired cache entries.
Sep 13 12:06:33 d4bd107 dnsmasq[1485]: dnsmasq[1485]: queries forwarded 22627, queries answered locally 55468
Sep 13 12:06:33 d4bd107 dnsmasq[1485]: dnsmasq[1485]: queries for authoritative zones 0
Sep 13 12:06:33 d4bd107 dnsmasq[1485]: dnsmasq[1485]: pool memory in use 0, max 0, allocated 0
Sep 13 12:06:33 d4bd107 dnsmasq[1485]: dnsmasq[1485]: server 8.8.8.8#53: queries sent 11674, retried or failed 0
Sep 13 12:06:33 d4bd107 dnsmasq[1485]: dnsmasq[1485]: server 192.168.1.55#53: queries sent 22458, retried or failed 39