Bug #41673 Agent suggests to TRUNCATE mysql.inventory but not SET SQL_LOG_BIN = 0
Submitted: 22 Dec 2008 14:00 Modified: 13 Jan 2009 10:36
Reporter: Mark Leith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Agent Severity:S2 (Serious)
Version:2.0.1.7125 OS:Any
Assigned to: Tony Bedford CPU Architecture:Any

[22 Dec 2008 14:00] Mark Leith
Description:
If the host-id's do not match from the monitored instance and the current agent host-id, the agent suggests the following in an error message:

"Please TRUNCATE TABLE mysql.inventory on this mysql-instance and restart the agent."

However, it does not suggest using sql_log_bin = 0, which is used for all other actions against this table so that they are not replicated to slaves, which should have their own copy of this table specifically. 

How to repeat:
N/A

Suggested fix:
Add a note to the error message to use SET SQL_LOG_BIN = 0.
[9 Jan 2009 16:30] Diego Medina
Verified fixed on 2.0.2.7128

The message now says

2009-01-09 11:28:22: (critical) agent_mysqld.c:533: [mysql] the hostid from mysql.inventory doesn't match our agent's host-id (ssh:{38:38:e0:7e:90:c3:92:92:a2:64:eb:43:b6:7b:68:11} != ssh:{38:38:e0:7e:90:c3:92:92:a2:64:eb:43:b6:7b:68:00})
We assume that this is a cloned host and shutdown now.
Please TRUNCATE TABLE mysql.inventory on this mysql-instance and restart the agent.
If this is a master for replication, please also run SET SQL_LOG_BIN = 0; first.
[13 Jan 2009 10:36] Tony Bedford
An entry has been added to the 2.0 changelog:

If the host-id of the monitored instance and the host-id of the current agent did not match, the agent generated the following error message:

Please TRUNCATE TABLE mysql.inventory on this mysql-instance and restart the agent.

However, it did not suggest using sql_log_bin = 0. This is used for all other actions against this table so that they are not replicated to slaves, each of which has their own copy of this table.