MySQL Query Analytics configuration not found

Hi, all.
I’ve started queries:
pmm-admin list
queries host 42001 YES root:@unix(/var/lib/mysql/mysql.sock) query_source=slowlog
mysql host 42002-42004 YES root:
@unix(/var/lib/mysql/mysql.sock)

But in QueryAnalytics I don’t see any queries, instead, I see message:

QAN API error: “MySQL Query Analytics configuration not found”.
Check the /var/log/qan-api.log file in docker container for more information.

But:
docker exec 1af5acecd98b cat /var/log/qan-api.log
Percona Query Analytics API is running…
2016/07/29 08:50:34 config.go:79: Loading /usr/local/percona/qan-api/src/github.com/percona/qan-api/conf/prod.conf
2016/07/29 08:50:34 config.go:119: API root dir /usr/local/percona/qan-api/src/github.com/percona/qan-api
INFO 2016/07/29 08:50:34 revel.go:206: Initialized Revel v0.12.0dev (2015-01-19) for >= go1.3
INFO 2016/07/29 08:50:34 main.go:31: Running revel server
Listening on 0.0.0.0:9001…
INFO 2016/07/29 09:30:28 ws.go:107: [Agent.Cmd] agent_id=2 0.0.9 http://host: connected

What did I wrong?

Check out /var/log/pmm-queries-exporter-42001.log on the client side. And try to remove queries from monitoring and re-add.

Hii,

I am also facing the same issue, and I checked the file “pmm-queries-exporter-42001.log” and it has following entries:

flag needs an argument: -pid-file
Usage of /usr/local/percona/qan-agent/bin/percona-qan-agent:
-basedir string
Agent basedir (default “/usr/local/percona/qan-agent”)
-listen string
Agent interface address (default “127.0.0.1:9000”)
-pid-file string
PID file (default “percona-agent.pid”)
-ping
Ping API
-version
Print version

I am not sure what to make out of these errors? I used the command “sudo pmm-admin add queries --user abc --password def” . Please help me solve this.

Thanks

There is a bug in 1.0.2 for “queries” when using unix-systemv service manager.

To fix:

  • run: pmm-admin remove queries NAME
  • grab https://www.percona.com/redir/downlo…-x86_64.tar.gz
  • copy new pmm-admin from that tarball: cp bin/pmm-admin /usr/local/percona/pmm-client/
  • pmm-admin add queries …