Hi,
Following resolver section passes configuration check
resolvers mydns1
nameserver ns1 8.8.8.8:53
nameserver ns1 8.8.4.4:53
resolve_retries 3
timeout retry 1s
hold valid 10s
IMHO: allowing same ID for 2 different objects, which have stats attached
to them, may not be the best approach here. Since, HAProxy doesn't allow
more than one resolver sections with same name, I would say for consistency
reasons should do the same for nameserver parameters within the same
resolver section.
If IDs for nameserver are different then you can fetch stats per nameserver:
echo 'show stat resolvers mydns1 ns1'|socat /run/haproxy/admin1.sock stdio
Cheers,
Pavlos