Newbie Question - MySQL instance not linked to System agent

Not sure if I described this correctly - first time through setting up PMM. Followed the setup guide and registered client agent on the server that hosts my db.

On PMM, I can see this node showing the OS statistics - looks fine.

Then I used PMM > PMM Add Instance to select MySQL Remote. Filled in MySQL details - connected fine. (Followed setup guide to add plugins/config/user for MySQL support.)

But … the new instance for MySQL seems to be a different “node” than the node that got created for the system.

Therefore when I look at the dash for the node linked to the system, I see the OS stats, but it doesn’t know about the DB.

When I look at the instance summary for the DB, it shows the DB stats correctly, but it doesn’t know about the OS. (Hence, how much total memory in the system, etc.)

I can’t figure out how to “link” the MySQL instance to the correct node, rather than being created on its own node. Maybe I’m totally misunderstanding. Help?

Hi @beagle72,

If it’s not an PaaS Mysql instance you should enable mysql monitoring directly on the node.

e.g.

pmm-admin add mysql --username=pmm --password=pass

Please check section “On the command line” for more details
https://www.percona.com/doc/percona-monitoring-and-management/2.x/setting-up/client/mysql.html

1 Like

@adivinho Thank you! Yes, that seemed to work.

The only small issue now is that the dropdown for “Services” still shows the name of the old mysql service I removed (including its agents/nodes). The new service tied to the OS is correctly listed also and works - it just seems like the dropdown is still showing services that are no longer in the inventory.

Is there a way to just tell PMM to “refresh” the UI so it doesn’t show removed/ghost names of services?

1 Like

Time series are not removed automatically if an instance is removed of being monitored.
The default retention period is 30 days.

Also you may perform an API request for removing time series that are related to a particular instance.
e.g.
curl -s -G -u admin:admin http://172.17.0.2/prometheus/api/v1/admin/tsdb/delete_series -d 'match={__name__=~".*",service_name=~"my-mysql"}'