Hi,
I have configured on my MySql server Query analytics using
pmm-admin add mysql:queries mysql_swcolabmysql01_queries --query-source perfschema --user pmm_admin --password PASSWORD --host 192.168.142.138
Yet continue too get the message
"There is no query data for the selected host. Use the pmm-admin add command to add a monitoring service and try again. For the information, see PMM documentation."
I have followed all the recommendations in the documentation but still do not see any data on the PMM server.
On the lab server I see:
-bash-4.1$ sudo pmm-admin list
pmm-admin 1.5.3
PMM Server | 192.168.145.100 (password-protected)
Client Name | swcolabmysql01.wco.int
Client Address | 192.168.142.138
Service Manager | unix-systemv
SERVICE TYPE NAME LOCAL PORT RUNNING DATA SOURCE OPTIONS
mysql:queries mysql_swcolabmysql01_queries - YES pmm_admin:@tcp(192.168.142.138:3306) query_source=perfschema, query_examples=true
linux:metrics linux_swcolabmysql01 42000 YES -
mysql:metrics mysql_swcolabmysql01 42002 YES pmm_admin:@tcp(192.168.142.138:3306)
-bash-4.1$ sudo pmm-admin check-network –-no-emoji
PMM Network Status
Server Address | 192.168.145.100
Client Address | 192.168.142.138
-
System Time
PMM Server | 2018-01-16 13:35:37 +0000 GMT
PMM Client | 2018-01-16 08:35:42 -0500 EST
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 | 1.388602ms
Request duration | 1.152622ms
Full round trip | 2.541224ms
- Connection: Client ← Server
SERVICE TYPE NAME REMOTE ENDPOINT STATUS HTTPS/TLS PASSWORD
linux:metrics linux_swcolabmysql01 192.168.142.138:42000 OK YES YES
mysql:metrics mysql_swcolabmysql01 192.168.142.138:42002 OK YES YES
In the log file on the lab I see (Note at 08:04 I rebooted the PMM server to see if that helped).
-bash-4.1$ cd /var/log
-bash-4.1$ ls pmm*
pmm-linux-metrics-42000.log pmm-mysql-metrics-42002.log pmm-mysql-queries-0.log
-bash-4.1$ cat pmm-mysql-queries-0.log
Version: percona-qan-agent 1.5.3
Basedir: /usr/local/percona/qan-agent
PID: 24186
API: 192.168.145.100/qan-api
UUID: 9ae8c065d53742f26ef7d654dd241c59
2018/01/15 10:53:09.823274 main.go:163: Starting agent…
2018/01/15 10:53:09.844021 main.go:331: Agent is ready
2018/01/15 10:53:09.849434 main.go:204: API is ready
2018/01/15 11:36:05.313521 main.go:359: Caught terminated signal, shutting down
2018/01/15 11:36:05.318104 main.go:385: Stopping QAN…
2018/01/15 11:36:05.320828 main.go:392: Waiting 2 seconds to flush agent log to API…
2018/01/15 11:36:07.320957 main.go:167: Agent has stopped
Version: percona-qan-agent 1.5.3
Basedir: /usr/local/percona/qan-agent
PID: 27917
API: 192.168.145.100/qan-api
UUID: 9ae8c065d53742f26ef7d654dd241c59
2018/01/15 11:36:07.489520 main.go:163: Starting agent…
2018/01/15 11:36:07.513571 main.go:331: Agent is ready
2018/01/15 11:36:07.926160 main.go:204: API is ready
2018/01/15 14:51:31.123515 WARNING data-sender Waiting for API to ack qan_1516045860022067071: read tcp 192.168.142.138:55730->192.168.145.100:80: i/o timeout
2018/01/15 14:57:48.640289 WARNING data-sender Waiting for API to ack qan_1516046220021828738: read tcp 192.168.142.138:56460->192.168.145.100:80: i/o timeout
2018/01/15 16:20:45.654272 WARNING data-sender Waiting for API to ack qan_1516051200021886586: read tcp 192.168.142.138:40972->192.168.145.100:80: i/o timeout
2018/01/15 16:51:13.010019 WARNING data-sender Waiting for API to ack qan_1516053060022859103: read tcp 192.168.142.138:45352->192.168.145.100:80: i/o timeout
2018/01/15 19:06:40.079354 WARNING data-sender Waiting for API to ack qan_1516061160413424479: read tcp 192.168.142.138:38192->192.168.145.100:80: i/o timeout
2018/01/16 08:04:28.383776 WARNING agent ws error: EOF
2018/01/16 08:04:28.384398 WARNING agent Lost connection to API, reconnecting
2018/01/16 08:04:31.385220 WARNING agent-ws websocket.Dial ws://192.168.145.100:80/qan-api/agents/9ae8c065d53742f26ef7d654dd241c59/cmd: dial tcp 192.168.145.100:80: getsockopt: connection refused
2018/01/16 08:04:31.385348 WARNING log Lost connection to API
2018/01/16 08:04:34.386904 WARNING log-ws websocket.Dial ws://192.168.145.100:80/qan-api/agents/9ae8c065d53742f26ef7d654dd241c59/log: dial tcp 192.168.145.100:80: getsockopt: connection refused
2018/01/16 08:04:38.386815 WARNING agent-ws websocket.Dial ws://192.168.145.100:80/qan-api/agents/9ae8c065d53742f26ef7d654dd241c59/cmd: dial tcp 192.168.145.100:80: getsockopt: connection refused
2018/01/16 08:04:38.636352 WARNING data-sender Cannot connect to API: websocket.Dial ws://192.168.145.100:80/qan-api/agents/9ae8c065d53742f26ef7d654dd241c59/data: dial tcp 192.168.145.100:80: getsockopt: connection refused
2018/01/16 08:04:41.388419 WARNING log-ws websocket.Dial ws://192.168.145.100:80/qan-api/agents/9ae8c065d53742f26ef7d654dd241c59/log: dial tcp 192.168.145.100:80: getsockopt: connection refused
2018/01/16 08:04:41.638030 WARNING data-sender Cannot connect to API: websocket.Dial ws://192.168.145.100:80/qan-api/agents/9ae8c065d53742f26ef7d654dd241c59/data: dial tcp 192.168.145.100:80: getsockopt: connection refused
2018/01/16 08:04:44.639667 WARNING data-sender Cannot connect to API: websocket.Dial ws://192.168.145.100:80/qan-api/agents/9ae8c065d53742f26ef7d654dd241c59/data: dial tcp 192.168.145.100:80: getsockopt: connection refused
2018/01/16 08:05:03.389336 WARNING agent-ws websocket.Dial ws://192.168.145.100:80/qan-api/agents/9ae8c065d53742f26ef7d654dd241c59/cmd: dial tcp 192.168.145.100:80: i/o timeout
2018/01/16 08:05:06.388862 WARNING log-ws websocket.Dial ws://192.168.145.100:80/qan-api/agents/9ae8c065d53742f26ef7d654dd241c59/log: dial tcp 192.168.145.100:80: i/o timeout
2018/01/16 08:05:44.389662 WARNING agent-ws websocket.Dial ws://192.168.145.100:80/qan-api/agents/9ae8c065d53742f26ef7d654dd241c59/cmd: dial tcp 192.168.145.100:80: i/o timeout
2018/01/16 08:05:47.389268 WARNING log-ws websocket.Dial ws://192.168.145.100:80/qan-api/agents/9ae8c065d53742f26ef7d654dd241c59/log: dial tcp 192.168.145.100:80: i/o timeout
2018/01/16 08:05:51.635114 WARNING data-sender Cannot connect to API: websocket.Dial ws://192.168.145.100:80/qan-api/agents/9ae8c065d53742f26ef7d654dd241c59/data: dial tcp 192.168.145.100:80: i/o timeout
2018/01/16 08:05:54.638889 WARNING data-sender Cannot connect to API: websocket.Dial ws://192.168.145.100:80/qan-api/agents/9ae8c065d53742f26ef7d654dd241c59/data: dial tcp 192.168.145.100:80: getsockopt: connection refused
2018/01/16 08:05:57.792828 WARNING data-sender Cannot connect to API: bad status
2018/01/16 08:27:01.132122 WARNING qan-analyzer-mysql-b476a926-worker Interval out of sequence: got 1, expected 1251