Not the answer you need?
Register and ask your own question!

How to delete double host entries

shomanshoman ContributorCurrent User Role Beginner
I have host entries with different hostnames for same hosts.

Original hosts were created with name <hostname> 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?

Comments

  • weberweber Advisor Inactive User Role Beginner
    You can set --client-name when configuring PMM client with `pmm-admin config` command.
    By default, client name is set to the system hostname.
  • shomanshoman Contributor Current User Role Beginner
    weber wrote: »
    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 <server>/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.
  • weberweber Advisor Inactive User Role Beginner
    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.
  • shomanshoman Contributor Current User Role Beginner
    Thanks for the tip,

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

    I use the docker image.
  • weberweber Advisor Inactive User Role Beginner
    I mean http://<your server address>/consul/
  • shomanshoman Contributor Current User Role Beginner
    Ok, some tries later I found the page.

    Chrome has automatic removed my forwarded ports from the url :(
This discussion has been closed.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.