Bug #41518 SELECT on master's mysql.inventory is not logged at message level
Submitted: 16 Dec 2008 21:07 Modified: 22 May 2009 10:29
Reporter: Mark Leith
Status: Closed
Category:Monitoring: Agent Severity:S3 (Non-critical)
Version:2.0.0.7111 OS:Any
Assigned to: MC Brown Target Version:2.0 maint release
Tags: mem_20_maint

[16 Dec 2008 21:07] Mark Leith
Description:
We do not log the SELECT against the master mysql.inventory on slave based agents, which
makes diagnostics for issues around topology discovery (making sure the SELECT is being
run properly) problematic. 

How to repeat:
o Set up a master/slave
o Set up agents for each one
o Set log-level=message for the slave agent
o grep for "inventory" in the log file

Suggested fix:
Print the SELECT ... FROM mysql.inventory like all other statements that are run.
[19 Dec 2008 18:08] Gary Whizin
fix in same batch with master_uuid bugs (makes it hard for Support to diagnose customer
problems)
[22 Jan 2009 17:05] Diego Medina
Tested MySQL Monitor Agent(agent): 2.0.3.7134 in replication, et it run for a few minutes
and grep -i inventory agent.log file does not show the query in there.

The master and the two slaves show up on the UI, so replication is working and being
monitored.
[22 Jan 2009 17:11] Diego Medina
log-level = message was used

And reading the log file I see the "other" queries going to the mysqld, but not the one
for the inventory table
[4 Mar 2009 20:08] Jan Kneschke
The error-msg has been improved and pushed to trunk and rel-2.0.

revno: 1218
committer: jan@mysql.com
branch nick: trunk
timestamp: Wed 2009-03-04 19:47:09 +0100
message:
  improved error-msg around the "get master's uuid" 

revno: 1227
committer: jan@mysql.com
branch nick: rel-2.0
timestamp: Wed 2009-03-04 20:04:31 +0100
message:
  improved error-msg around the "get master's uuid"
[12 Mar 2009 3:23] Keith Russell
Patch installed in version 2.0.5.7152.
[13 Mar 2009 19:05] Diego Medina
Verified fixed on 2.0.5.7153

On the logs we see

(message) job_collect_mysql.c:708: [web1->192.168.2.1:43309] (master-uuid)
mysql-query(SELECT value FROM mysql.inventory WHERE name='uuid')
(warning) job_collect_mysql.c:1006: [web1] master-uuid =
d5871dfa-7e5c-4ccc-af8e-1b0d3befaf1d
[22 May 2009 10:29] Tony Bedford
An entry was added to the 2.0.5 changelog:

Queries such as SELECT against the master mysql.inventory was not logged on slave-based
agents. This made diagnosing topology discovery issues difficult.