I have added domain name of the client servers in the prometheus.yml file under targets
by replacing the IP.
In Prometheus Status page it shows the domain name alone but in Grafana it shows both domain name and IP under Host tab. I have restarted the Grafana server also.
How to remove the IP listing in the Grafana dashboard page.
From where it has displaying the IP
When you change the targets you are scraping the data for the old names and for the new names are not linked. The hostnames are just labels for a time series, so switching from IPs to hostnames in your config will create a new set of time series in Prometheus.
and
will create different time series even if no-reply.com resolves to 256.256.256.256.
That said i would expect the IPs getting removed from your Host tab in Grafana as soon as the old time series drop out of the time range you are querying the data from.