Closed lemoer closed 2 years ago
[root@leintor]:/opt/nfctd # curl -s https://harvester.ffh.zone/nodes.json | \
jq -r '.nodes[] | select( .nodeinfo.hostname == "perf-test") | .nodeinfo.network.addresses[] | select(. | startswith("2"))'
2a02:790:ff:999:250:56ff:fe00:b608
2a02:790:ff:599:250:56ff:fe00:b608
2a02:790:ff:1099:250:56ff:fe00:b608
2001:678:978:299:250:56ff:fe00:b608
2a02:790:ff:799:250:56ff:fe00:b608
Next level:
curl -s https://harvester.ffh.zone/nodes.json | jq 'def lpad(n):tostring |if (n > length) then ((n - length) * "0") + . else . end; [.nodes[] | select( .nodeinfo.hostname == "perf-test") | .nodeinfo.network.addresses[] | select(. | startswith("2")) | { "peeraddr": ., "supernode": ("sn"+(. | split(":") | .[3] | sub("99$";"") | lpad(2))) }]'
Would pinging hard coded IP addresses be such a bad idea? (But hey, cool jq expression.) :-D
This is already implemented in the Zabbix Template "FF Statuspage Reachability" (see here: https://zabbix.ffh.zone/templates.php?form=update&templateid=10342)
Sometimes due to routing issues or radv issues, some of these addresses
become unreachable...
I would suggest to monitor them with Zabbix.