Monitoring GCP CloudSQL MySQL with Percona PMM its possible?


I can’t find a way to have an advanced monitoring of the databases inside the CloudSQL Instance, I would like to know that databases within the GCP CloudSQL instance is the one that receives the most load, (selects, inserts, etc).

Its this possible know that information with Percona and its possible connect to CloudSQL MySQL?

I was not able to find any tutorial or documentation about it :frowning:

Thank you very much

Dear @davidoceans

Perhaps these links will help you,

if not, then I think colleagues will help a little later.

Hi @davidoceans,

Yes you can connect to your remote CloudSQL MySQL instances by using the following documentation:

After connecting you can use Query Analytics to see that information about your databases. And note that you won’t get system performance metrics it will be limited only to MySQL metrics.

Thanks for the question and hope this helps!

Hi @tiagomotasantos ,

What do you mean with “it will be limited only to MySQL metrics”?

Will I be able to obtain which DB within the instance is the one that most queries receive? and the individual use of each database?

Or that kind of information is not possible?

Thank you very much

By “limited only to MySQL metrics” I mean that you won’t see host metrics (e.g. CPU, memory, disk activity, …).

Yes you will be able to see which DB within the instance is the one that receives most queries through a percentage shown for each DB in the filters section of Query Analytics. If you want the individual use you can filter by that DB.

Thanks for the question :slight_smile:

@tiagomotasantos I don’t what I did wrong, I installed the pmm server in google cloud VM, following the tutorial:

But, when I open the endpoint I see the grafana, I follow the steps in the tutorial to add a remote DB but I get this and it won’t let me add any.

Have I forgot something? Why can I add any Google Database Instance?

Thank you very much

It seems that I have managed to register an instance, but I cannot see the queries and I get a yellow message.

Any suggestion?

Thank you very much

Any suggestion? or has someone come across the same problem?

Thank you very much

I can give you the basic troubleshooting to see what’s happening. With remote monitoring we’re really just executing selects from various databases/tables around performance so most of the things we’re doing behind the scenes on a regular interval you can do yourself as a test.

First of all, have you enabled performance schema in the google console? Also, what version are you using (I know some stuff isn’t available if you’re using some older versions of 5.7)

I’ll assume you can login from the CLI so can you connect to your cloudsql instance from the CLI: mysql -u -h <ip/hostname of instance> -P -p just to verify connectivity and then select something against performance_schema (“select * from performance_schema.setup_consumers”)

I’m leaning towards permissions and you might need to grant select on performance_schema to your user assuming it’s enabled…this will help narrow that down.