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