munin::check { $munin_ips: script => 'ip_', }
- if getfromhash($site::nodeinfo, 'misc', 'v6addrs') {
- $munin6_ips = getfromhash($site::nodeinfo, 'misc', 'v6addrs')
- .map |$addr| { "ip_${addr}" }
- munin::ipv6check { $munin6_ips: }
- }
+ $munin6_ips = getfromhash($site::nodeinfo, 'misc', 'v6addrs')
+ .map |$addr| { "ip_${addr}" }
+ munin::ipv6check { $munin6_ips: }
# get rid of old stuff
$munin6_ip6s = split(regsubst($::v6ips, '([^,]+)', 'ip6_\1', 'G'), ',')
# find out if we are behind nat
intersection = nodeinfo['misc']['v4addrs'] & nodeinfo['ldap']['ipHostNumber']
nodeinfo['misc']['natted'] = intersection.empty?
+ else
+ nodeinfo['misc']['v4addrs'] = []
end
v6ips = lookupvar('::v6ips')
if v6ips and v6ips.to_s != "" and v6ips.to_s != 'undefined'
nodeinfo['misc']['v6addrs'] = v6ips.split(',')
+ else
+ nodeinfo['misc']['v6addrs'] = []
end
end