Mysql 5.7.x version intgeration with PMM

Hi,

can someone please explain and end to end process of mysql 5.7 integration with PMM tool using docker approach?

Note: I tried using below steps but was getting error:
Step1:Created the the mysql5.7 docker container (based on debian GNU favour)
Step2:created and run the PMM server and launched the web ui thriugh local browser.
Step3: while adding mysql instance using PMM dasboard getting “TLS connection not establihed error”

1 Like

Hello, you should be following the steps here Install Percona Monitoring and Management
Adding mysql instances through the web UI is useful for the cases where you don’t have the ability to deploy the pmm2-client directly on the mysql instance. It is preferred to install pmm2-client and use the pmm-admin add command on the mysql instance.

1 Like

@Anurag_sharma,
Am I correct in understanding that you have 1 docker container with MySQL server and 1 docker container with PMM? If so, then you have two choices: A) access the shell of the mysql container and manually add the pmm agent, or B) use the add remote instance in PMM web UI. Make sure to turn off any SSL/TLS verification. Make sure you have created a monitoring user in MySQL and use those credentials when adding to PMM.

1 Like

Thanks igroene for the response.Will try the method suggested by you.

1 Like

Thanks matthewb for the repnonse. Will try apply method suggested by you.

1 Like

Hi ,

as a continuation of issue stated by me in my first post…
I am succesfully able to proceed with getting Mysql DB sql queries stats into the percona UI dashboard.However remaining stats like CPU,Memory,disk usage etc metrics of my Mysql db instance(dockerised ) are not getting captured.I could only see complete metrics of PMM-server and my local host metrics stats.
Below is the screenshot:

Steps: executed by me as of now:
step1: Created mysql5.7 DB dockerised container
step2: careted and run the PMM
data and PM server
step3: Added the dockerised mysql db instance using Percona UI dashboard by giving hostname ,port details

your help will be highly appreciated.
Thanks

1 Like

Yes, this is correct. If you use the UI to add a remote Mysql instance, you will never see the CPU/memory metrics. These metrics can only be gathered by installing the PMM agent on to the same server/container as Mysql.

1 Like

Hi,
I am getting errors and issues while installing the PMM2 client on Mysql5.7(dockerised container based on debian).

I performed below steps after getting inside into MY_sql 5.7.x(container):

step1)install GnuPG, the GNU Privacy Guard:
apt install gnupg
Note: Note gnupg2 was not avaible

step2)Fetch the repository packages from Percona web:
wget https://repo.percona.com/apt/percona-release_latest.zesty_all.deb
Note: I have Replaced $(lsb_release -sc).as given in percona site, with zesty

Step3)Install the downloaded package
apt-get install percona-release_latest.zesty_all.deb

Note:Step3 gives error as “Unable to locate package percona-release_latest.zesty_all.deb” and “Couldn’t find any package by glob ‘percona-release_latest.zesty_all.deb’” and “Couldn’t find any package by regex ‘percona-release_latest.zesty_all.deb’”

below is screenshot:
image

As step3 is failing so I am not ale to proceed further.
Any help will be highly appreciated.
Thanks

1 Like

If you download the package, you need to use dpkg to install it, not apt.

sudo dpkg -i percona-release_latest.zesty_all.deb
1 Like

Hi ,

I am getting error as “pmm-agent is not running” when I am trying to make Connection of Client to Server using below command:
“pmm-admin config --server-insecure-tls --server-url=https://admin:<password>@pmm.example.com

Can you please suggest on that:
Thanks

1 Like

Did you install pmm2-agent or pmm-agent? You need v2 as v1 is obsolete.

1 Like

Hi Matthewb,

I have installed the pmmclient2 using below comand "apt-get install pmm2-client " but it is stil throwing error as agent not running.Could you pase suggest
Thanks

1 Like

Hi Matthewb,

I have installed the pmmclient2 using below command "apt-get install pmm2-client " but it is still throwing error as below:
“pmm-agent is not running. Please re-run pmm-agent setup with --config-file flag.”
Could you please suggest as I am stuck on this step for a long time.


Thanks

1 Like

Hello, you need to start the pmm-agent service before running pmm-admin config command.

1 Like

Hi,
I have started the pmm-agent service using “pmm-agent run” command but I am still getting error .
1)Getting below error when running pm-admin status command:
"Failed to get PMM Agent status from local pmm-agent: pmm-agent is running, but not set up.
2)Getting below error when running pmm-admin config command:
“Checking local pmm-agent status…
pmm-agent is running but does not read configuration from the file. Please restart it with --config-file flag.
Please run pmm-admin config with --server-url flag.”
Below is the screenshot for the reference:

Can you please suggest on that
Thanks

1 Like

Hi igroene/matthewb,
I have started the pmm-agent service using “pmm-agent run” command but I am still getting error .
1)Getting below error when running pm-admin status command:
"Failed to get PMM Agent status from local pmm-agent: pmm-agent is running, but not set up.
2)Getting below error when running pmm-admin config command:
“Checking local pmm-agent status…
pmm-agent is running but does not read configuration from the file. Please restart it with --config-file flag.
Please run pmm-admin config with --server-url flag.”
Below is the screenshot for the reference:

Can you please suggest on that
Thanks

1 Like

Looks like PMM agent is crashing because something else is listening on port 7777. Can you check this?

1 Like

Hi mattheweb,igroene,perconateam

I have been struggling in setting up percona from last few weeks…I have listed down detailed the steps which has been exceuted by me and errors which I am getting:

Note:
1)I have run the Mysql 5.7.x DB conatiner succesfully.
2)I have run the PMM server also sucessfully using container

On Step1 I am getting stuck from last few weeks.

Step1) I am getting error while configuring PMM server and PMM client connection using below command:
sudo pmm-admin config --server-insecure-tls --server-url=https://admin:admin@192.x.1.2:443

output error:
Checking local pmm-agent status…
pmm-agent is not running. Please re-run pmm-agent setup with --config-file flag

Step2) I tried peforming several below commands in order to rectify the error but still different new errors:

i)command:
pmm-agent setup --server-address=192.x.1.2:443 --config-file=pmm-agent.yaml

Output error message:
root@4be85634a7c3:/# pmm-agent setup --server-address=192.x.1.2:443 --config-file=pmm-agent.yaml
INFO[2022-03-25T13:18:45.354+00:00] Loading configuration file /pmm-agent.yaml. component=setup
INFO[2022-03-25T13:18:45.354+00:00] Using /usr/local/percona/pmm2/exporters/node_exporter component=setup
INFO[2022-03-25T13:18:45.354+00:00] Using /usr/local/percona/pmm2/exporters/mysqld_exporter component=setup
INFO[2022-03-25T13:18:45.354+00:00] Using /usr/local/percona/pmm2/exporters/mongodb_exporter component=setup
INFO[2022-03-25T13:18:45.355+00:00] Using /usr/local/percona/pmm2/exporters/postgres_exporter component=setup
INFO[2022-03-25T13:18:45.355+00:00] Using /usr/local/percona/pmm2/exporters/proxysql_exporter component=setup
INFO[2022-03-25T13:18:45.355+00:00] Using /usr/local/percona/pmm2/exporters/rds_exporter component=setup
INFO[2022-03-25T13:18:45.355+00:00] Using /usr/local/percona/pmm2/exporters/azure_exporter component=setup
INFO[2022-03-25T13:18:45.355+00:00] Using /usr/local/percona/pmm2/exporters/vmagent component=setup
Checking local pmm-agent status…
pmm-agent is not running.
Registering pmm-agent on PMM Server…
Failed to register pmm-agent on PMM Server: Post “https://192.x.1.2:443/v1/management/Node/Register”: x509: cannot validate certificate for 192.x.1.2 because it doesn’t contain any IP SANs.

ii) command:
pmm-agent run

output error messge:
root@4be85634a7c3:/# pmm-agent run
INFO[2022-03-25T13:21:47.536+00:00] Using /usr/local/percona/pmm2/exporters/node_exporter component=main
INFO[2022-03-25T13:21:47.536+00:00] Using /usr/local/percona/pmm2/exporters/mysqld_exporter component=main
INFO[2022-03-25T13:21:47.536+00:00] Using /usr/local/percona/pmm2/exporters/mongodb_exporter component=main
INFO[2022-03-25T13:21:47.536+00:00] Using /usr/local/percona/pmm2/exporters/postgres_exporter component=main
INFO[2022-03-25T13:21:47.536+00:00] Using /usr/local/percona/pmm2/exporters/proxysql_exporter component=main
INFO[2022-03-25T13:21:47.536+00:00] Using /usr/local/percona/pmm2/exporters/rds_exporter component=main
INFO[2022-03-25T13:21:47.537+00:00] Using /usr/local/percona/pmm2/exporters/azure_exporter component=main
INFO[2022-03-25T13:21:47.537+00:00] Using /usr/local/percona/pmm2/exporters/vmagent component=main
INFO[2022-03-25T13:21:47.537+00:00] Starting local API server on http://127.0.0.1:7777/ … component=local-server/JSON
INFO[2022-03-25T13:21:47.537+00:00] Starting… component=client
ERRO[2022-03-25T13:21:47.538+00:00] PMM Server address is not provided, halting. component=client
INFO[2022-03-25T13:21:47.541+00:00] Started. component=local-server/JSON
^CWARN[2022-03-25T13:21:57.880+00:00] Got SIGINT, shutting down… component=main
INFO[2022-03-25T13:21:57.881+00:00] Done. component=actions-runner
INFO[2022-03-25T13:21:57.881+00:00] Done. component=supervisor
INFO[2022-03-25T13:21:57.881+00:00] Stopped. component=local-server/JSON
INFO[2022-03-25T13:21:57.883+00:00] Done. component=local-server
INFO[2022-03-25T13:21:57.883+00:00] Done. component=main

iii)command: I have checked using “netstat -abn” comand that 7777 port is not being used by any applictaion

iv)command:
pmm-agent --version

Output message:
root@4be85634a7c3:/# pmm-agent --version
ProjectName: pmm-agent
Version: 2.26.0
PMMVersion: 2.26.0
Timestamp: 2022-02-03 14:03:52 (UTC)
FullCommit: c74f5ae58331dc29af34d29c2b6905b8f47cc3ab
root@4be85634a7c3:/#

Attached is the screenshot for the refernce:

Any help will be highly appreciable
Thanks

1 Like

Hi Matthewb,

I have checked using “netstat -abn” command and noticed that 7777 port is not being used by any application in my host.

Attched is the screenshot for the reference:
image
Please suggest on this.
Thanks

1 Like

Hello @Anurag_sharma ,
I’m not sure what to tell you at this point. I cannot find any Ubuntu Zesty images in AWS to test this out for you. It sounds like you have something non-standard going on with your system. I suggest that you try starting over with a fresh docker install (remove all containers, volumes, images, etc) and follow our documentation. If you would like further assistance, you can contact our support team and they can dive deeper into your issue that we can here on the forums.

1 Like