PMM for localhost failing

I have setup PMM against the localhost ie PMM Server and Client on the same machine. Load average, network traffic and and memory are displaying, but not MySQL information.

I’ve been following suggested actions in [url]https://www.percona.com/forums/questions-discussions/percona-monitoring-and-management/46242-mysql-queries-and-mysql-metrics-not-work[/url]

Steps:

$ sudo iptables -nL
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Server: docker create and run steps as on website
Client: .

$ sudo pmm-admin list
pmm-admin 1.0.3

PMM Server | 127.0.0.1
Client Name | mfdb2
Client Address | 127.0.0.1
Service manager | unix-systemv


METRIC SERVICE NAME CLIENT PORT RUNNING DATA SOURCE OPTIONS


os mfdb2 42000 YES -
queries mfdb2 42001 YES root:@unix(/var/run/mysqld/mysqld.sock) query_source=slowlog
mysql mfdb2 42002-42004 YES root:
@unix(/var/run/mysqld/mysqld.sock)

Prometheus endpoints are working on website:

[ATTACH=CONFIG]n46538[/ATTACH]

Curl against localhost outside container works

HELP go_gc_duration_seconds A summary of the GC invocation durations.

TYPE go_gc_duration_seconds summary

go_gc_duration_seconds{quantile=“0”} 0
go_gc_duration_seconds{quantile=“0.25”} 0
go_gc_duration_seconds{quantile=“0.5”} 0
go_gc_duration_seconds{quantile=“0.75”} 0
go_gc_duration_seconds{quantile=“1”} 0
go_gc_duration_seconds_sum 0
go_gc_duration_seconds_count 0

But not inside container

$ docker exec -ti pmm-server bash
root@963bf392dd16:/opt# curl [url]http://127.0.0.1:42002/metrics[/url]
curl: (7) Failed to connect to 127.0.0.1 port 42002: Connection refused
root@963bf392dd16:/opt#

network check shows problem

$ sudo pmm-admin check-network --no-emoji
PMM Network Status

Server | 127.0.0.1
Client | 127.0.0.1

  • Client > Server

SERVICE CONNECTIVITY


Consul API OK
QAN API OK
Prometheus API OK

Connection duration | 112.581µs
Request duration | 560.175µs
Full round trip | 672.756µs

  • Server > Client

METRIC NAME PROMETHEUS ENDPOINT REMOTE STATE


os mfdb2 127.0.0.1:42000 PROBLEM
mysql mfdb2 127.0.0.1:42002 PROBLEM
mysql mfdb2 127.0.0.1:42003 PROBLEM
mysql mfdb2 127.0.0.1:42004 PROBLEM

For endpoints in problem state, please check if the corresponding service is running (“pmm-admin list”).
If all endpoints are down here and “pmm-admin list” shows all services are up,
please check the firewall settings whether this system allows incoming connections by address:port in question.

dates are in sync

$ date
Thu Dec 1 00:21:03 UTC 2016

docker exec -ti pmm-server bash
root@963bf392dd16:/opt# date
Thu Dec 1 00:21:10 UTC 2016

prometheus.png

ˇ> cat /etc/redhat-release # CentOS release 6.8 (Final)

Actually, the latest Docker version for this CentOS is 1.7.2 and it is not supported, as well as kernel 2.6.
https://www.percona.com/doc/percona-…ements-for-pmm

pmm-admin 1.0.3

This is very old version and even beta.
Please try the latest 1.0.6 version and newer guide https://www.percona.com/doc/percona-monitoring-and-management/install.html

Client | 127.0.0.1

Client address can’t 127.0.0.1 because the process from inside the docker container needs to connect by that address to access metrics. 127.0.0.1 is container’s address itself. Please use a private IP of the underlying host as client address.

Thanks Weber, I’m still following this up. Sonia.