How to delete double host entries

I have host entries with different hostnames for same hosts.

Original hosts were created with name and then servers are reinstalled and added as <hostname.domainname>.

Now i have for each host two entries in grafana/prometheus.

How can I remove an entry?

… and i’m a little bit confused.

PMM client is not configured, missing config file. Please make sure you have run 'pmm-admin config'.

How is it possible to get data without configured clients?

You can set --client-name when configuring PMM client with pmm-admin config command.
By default, client name is set to the system hostname.

If I’m running the command on one client to test it and add metrics again.

Still the same situation.

For each ip address i have two hostnames / displayed entries in grafana.

host
host.domainname

Under /prometheus/targets there are two entries for each host (IP) as endpoint:

http://1.2.3.4/metrics

__meta_consul_node=“hostname”
__meta_consul_tags=“alias_hostname”

http://1.2.3.4/metrics with

__meta_consul_node=“hostname.domainname”
__meta_consul_tags=“alias_hostname.domainname”

I want only to have one hostname for each ip address and not two as at the moment. I like to remove hostname so that i have only hostname.example.com.

If there is no active PMM client with the name “hostname.example.com” and there is no possibility to use pmm-admin to remove services named hostname.example.com, you can do the following: go to Consul UI http://server/consul/, and deregister the host “hostname.example.com” (click the button when viewing the host). It will remove it and all associated services. Do not deregister other active hosts or services. Then it will disappear from Prometheus targets.

Also you can later purge the metrics associated with “hostname.example.com”:
pmm-admin purge mysql:metrics hostname.example.com
On any PMM client. This will make “hostname.example.com” disappear from Grafana.

Thanks for the tip,

but there is no URL http://server/consul/ to deregister the hosts.

I use the docker image.

I mean http:///consul/

Ok, some tries later I found the page.

Chrome has automatic removed my forwarded ports from the url :frowning: