The article you mentioned only talks about non-HA scenario.
For a HA scenario:
1. You must add one line per namenode.
For example if you have 2 namenodes nn1 and nn2 and dfs.internal.nameservices-nnha, then
dfs.namenode.servicerpc-address.<dfs.internal.nameservices>.nn1=<namenodehost1>:8021
dfs.namenode.servicerpc-address.<dfs.internal.nameservices>.nn2=<namenodehost2>:8021
2. Stop all ZKFC and then from any namenode host run the command:
hdfs zkfc -formatZK
3. Restart ZKFC and HDFS.
4. Now you will be able to see metrics in grafana after few minutes.