# Only Linux metrics are captured. MySQL metrics not available in the dashboard

**URL:** <https://forums.percona.com/t/only-linux-metrics-are-captured-mysql-metrics-not-available-in-the-dashboard/6750>\
**Category:** PMM 1.x\
**Created:** [December 19, 2018, 4:32am UTC](https://forums.percona.com/t/only-linux-metrics-are-captured-mysql-metrics-not-available-in-the-dashboard/6750 "2018-12-19T04:32:43Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![udhayan](https://avatars.discourse-cdn.com/v4/letter/u/f05b48/32.png) [@udhayan](https://forums.percona.com/u/udhayan)\
**Post date:** [December 19, 2018, 4:32am UTC](https://forums.percona.com/t/only-linux-metrics-are-captured-mysql-metrics-not-available-in-the-dashboard/6750/1 "2018-12-19T04:32:43Z")

</div>

Hi Guys,  
I tried setting up PMM server via docker image and AWS AMI. I installed PMM client in my DB host.  
I added mysql metrics with below command  
pmm-admin add mysql --user username --password password

[root@ip-192-168-5-203 ~]# pmm-admin list  
pmm-admin 1.17.0

PMM Server | 192.168.5.205 (password-protected)  
Client Name | ip-192-168-5-203.us-east-2.compute.internal  
Client Address | 192.168.5.203  
Service Manager | linux-systemd

* * *

SERVICE TYPE NAME LOCAL PORT RUNNING DATA SOURCE OPTIONS

* * *

mysql:queries ip-192-168-5-203.us-east-2.compute.internal - YES pmm:_**@unix(/var/lib/mysql/mysql.sock) query\_source=slowlog, query\_examples=true, slow\_log\_rotation=true, retain\_slow\_logs=1  
linux:metrics ip-192-168-5-203.us-east-2.compute.internal 42000 YES -  
mysql:metrics ip-192-168-5-203.us-east-2.compute.internal 42002 YES pmm:**_@tcp(192.168.5.203:3306)

I can see the OS metrics in the dashboard but mysql metrics are not captured.  
I opened ports 42000,42002 in my DB host already. PMM server is running in AWS T2 micro EC2 instance,since its a POC

[root@ip-192-168-5-203 ~]# pmm-admin check-network  
PMM Network Status

Server Address | 192.168.5.205  
Client Address | 192.168.5.203

- System Time  
NTP Server ([0.pool.ntp.org](http://0.pool.ntp.org)) | 2018-12-19 09:54:23 +0000 UTC  
PMM Server | 2018-12-19 09:54:23 +0000 GMT  
PMM Client | 2018-12-19 09:54:23 +0000 UTC  
PMM Server Time Drift | OK  
PMM Client Time Drift | OK  
PMM Client to PMM Server Time Drift | OK

- Connection: Client → Server

* * *

SERVER SERVICE STATUS

* * *

Consul API OK  
Prometheus API OK  
Query Analytics API OK

Connection duration | 458.015µs  
Request duration | 133.959µs  
Full round trip | 591.974µs

- Connection: Client ← Server

* * *

SERVICE TYPE NAME REMOTE ENDPOINT STATUS HTTPS/TLS PASSWORD

* * *

linux:metrics ip-192-168-5-203.us-east-2.compute.internal 192.168.5.203:42000 OK YES YES  
mysql:metrics ip-192-168-5-203.us-east-2.compute.internal 192.168.5.203:42002 DOWN YES YES

When an endpoint is down it may indicate that the corresponding service is stopped (run ‘pmm-admin list’ to verify).  
If it’s running, check out the logs /var/log/pmm-\*.log

When all endpoints are down but ‘pmm-admin list’ shows they are up and no errors in the logs,  
check the firewall settings whether this system allows incoming connections from server to address:port in question.

Also you can check the endpoint status by the URL: [url][http://192.168.5.205/prometheus/targets[/url]](http://192.168.5.205/prometheus/targets%5B/url%5D)

When i look at less /var/log/pmm-mysql-metrics-42002.log, i could see below error

2018/12/19 09:54:23 http: TLS handshake error from 192.168.5.203:39188: tls: first record does not look like a TLS handshake  
2018/12/19 09:54:23 http: TLS handshake error from 192.168.5.203:39190: tls: first record does not look like a TLS handshake

Please help me in troubleshooting this issue.

Thanks

---

<div class="post-metadata">

**Author:** ![Michael\_Coburn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michael_coburn/32/18_2.png) [@Michael\_Coburn](https://forums.percona.com/u/Michael_Coburn)\
**Post date:** [February 4, 2019, 2:52pm UTC](https://forums.percona.com/t/only-linux-metrics-are-captured-mysql-metrics-not-available-in-the-dashboard/6750/2 "2019-02-04T14:52:40Z")

</div>

First, those TLS Handshake errors are safe to ignore.

Now you want to confirm you can connect to the exporters correctly, so for example, from PMM Server run a command similar to this:  
curl -sk [url][https://192.168.5.203:42002/metrics-hr[/url]](https://192.168.5.203:42002/metrics-hr%5B/url%5D)

Do you see records? You should on a working system.

Let us know if this works or not, then we can continue troubleshooting

---

<div class="post-metadata">

**Author:** ![muffycompo](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/muffycompo/32/1254_2.png) [@muffycompo](https://forums.percona.com/u/muffycompo)\
**Post date:** [February 6, 2019, 3:36pm UTC](https://forums.percona.com/t/only-linux-metrics-are-captured-mysql-metrics-not-available-in-the-dashboard/6750/3 "2019-02-06T15:36:27Z")

</div>

Hello Michael, we are having the same issue as mentioned above and running the curl command on the PMM server gave us an out “Invalid username or password”. We can connect to the Web UI using the credentials we used when running the PMM server container and when we hit the URL in a web browser, we can authenticate using the correct username/password.

---

<div class="post-metadata">

**Author:** ![muffycompo](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/muffycompo/32/1254_2.png) [@muffycompo](https://forums.percona.com/u/muffycompo)\
**Post date:** [February 6, 2019, 3:40pm UTC](https://forums.percona.com/t/only-linux-metrics-are-captured-mysql-metrics-not-available-in-the-dashboard/6750/4 "2019-02-06T15:40:50Z")

</div>

We have the same issue as mentioned above and after running the curl command on the PMM server, we got an out “Invalid username or password”. We can hit the URL and can authenticate using the username/password we set when running PMM Server container.

---

<div class="post-metadata">

**Author:** ![Michael\_Coburn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michael_coburn/32/18_2.png) [@Michael\_Coburn](https://forums.percona.com/u/Michael_Coburn)\
**Post date:** [February 6, 2019, 4:15pm UTC](https://forums.percona.com/t/only-linux-metrics-are-captured-mysql-metrics-not-available-in-the-dashboard/6750/5 "2019-02-06T16:15:17Z")

</div>

> [@muffycompo;53504](#):
>
> Hello Michael, we are having the same issue as mentioned above and running the curl command on the PMM server gave us an out “Invalid username or password”. We can connect to the Web UI using the credentials we used when running the PMM server container and when we hit the URL in a web browser, we can authenticate using the correct username/password.

If you’ve configured username/password then you need curl to use it as well, here is an example:  
curl -u myuser:mypass -sk [https://192.168.5.203:42002/metrics-hr](https://192.168.5.203:42002/metrics-hr)

---

<div class="post-metadata">

**Author:** ![muffycompo](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/muffycompo/32/1254_2.png) [@muffycompo](https://forums.percona.com/u/muffycompo)\
**Post date:** [February 7, 2019, 8:17am UTC](https://forums.percona.com/t/only-linux-metrics-are-captured-mysql-metrics-not-available-in-the-dashboard/6750/6 "2019-02-07T08:17:07Z")

</div>

> [@Michael Coburn;53506](#):
>
> If you’ve configured username/password then you need curl to use it as well, here is an example:  
> curl -u myuser:mypass -sk [https://192.168.5.203:42002/metrics-hr](https://192.168.5.203:42002/metrics-hr)

Thanks for pointing that out Michael, It showed the content of the /metrics stats. Now it works but not sure what fixed it. All the endpoints showed DOWN but then after restarting the PMM Server server, they all came back as UP.

---

<div class="post-metadata">

**Author:** ![Michael\_Coburn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michael_coburn/32/18_2.png) [@Michael\_Coburn](https://forums.percona.com/u/Michael_Coburn)\
**Post date:** [February 7, 2019, 11:24am UTC](https://forums.percona.com/t/only-linux-metrics-are-captured-mysql-metrics-not-available-in-the-dashboard/6750/7 "2019-02-07T11:24:49Z")

</div>

Interesting, not sure what changed, but I am glad you are recovered [muffycompo](https://percona.vanillacommunities.com/profile/x/x/42661) !

---

<div class="post-metadata">

**Author:** ![udhayan](https://avatars.discourse-cdn.com/v4/letter/u/f05b48/32.png) [@udhayan](https://forums.percona.com/u/udhayan)\
**Post date:** [February 11, 2019, 7:44am UTC](https://forums.percona.com/t/only-linux-metrics-are-captured-mysql-metrics-not-available-in-the-dashboard/6750/8 "2019-02-11T07:44:59Z")

</div>

Thanks for the reply Michael. I guess the problem was RAM of the docker server. Since it is T2 Ec2 instance , it had only 1 GB memory.  
I was able to set PMM without any issues in PROD setup with ample amount of resources.

---

<div class="post-metadata">

**Author:** ![Michael\_Coburn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michael_coburn/32/18_2.png) [@Michael\_Coburn](https://forums.percona.com/u/Michael_Coburn)\
**Post date:** [February 18, 2019, 11:00am UTC](https://forums.percona.com/t/only-linux-metrics-are-captured-mysql-metrics-not-available-in-the-dashboard/6750/9 "2019-02-18T11:00:16Z")

</div>

Great [udhayan](https://percona.vanillacommunities.com/profile/x/x/42494) , glad it is solved!
