Ok, I guess writing that post allowed me to figure out what I was actually asking for, so after some better Googling I think I’ve found the answer.
What I needed to do is configure the variable to only return the IP/hostname of the target, leaving the port out. This means I can keep the target IP the same across all panels, but define the port number absolutely, for example:
For something from node_exporter: node_load1{instance="$node:9100",job="$job"}
For something from nginx_exporter: irate(nginx_http_requests_total{instance=~"$node:9113"}[5m])
This seems to work fine. I guess I’ll know for certain when I add more servers.
For posterity, I found the solution at this forum thread:
I added the following regex to the variable in Dashboard Settings.
/(.*[^:])[:]/