status => '/bin/true',
}
- $munin_ips = split(regsubst($::v4ips, '([^,]+)', 'ip_\1', 'G'), ',')
+ $munin_ips = getfromhash($site::nodeinfo, 'misc', 'v4addrs')
+ .map |$addr| { "ip_${addr}" }
munin::check { $munin_ips: script => 'ip_', }
- if $v6ips {
- $munin6_ips = split(regsubst($::v6ips, '([^,]+)', 'ip_\1', 'G'), ',')
+ if getfromhash($site::nodeinfo, 'misc', 'v6addrs') {
+ $munin6_ips = getfromhash($site::nodeinfo, 'misc', 'v6addrs')
+ .map |$addr| { "ip_${addr}" }
munin::ipv6check { $munin6_ips: }
}
def $MUNIN_IPS = (<%=
begin
- scope.lookupvar('::v4ips').split(',').join(' ')
+ scope.lookupvar('site::nodeinfo')['misc']['v4addrs'].join(' ')
rescue
''
end
%>);
def $MUNIN6_IPS = (<%=
begin
- scope.lookupvar('::v6ips') == '' ? '' : scope.lookupvar('::v6ips').split(',').join(' ')
+ scope.lookupvar('site::nodeinfo')['misc']['v6addrs'].join(' ')
rescue
''
end