Bug #30442 Error getting SHOW INNODB STATUS for instance which is down
Submitted: 15 Aug 2007 16:00 Modified: 30 Nov 2007 16:02
Reporter: Mark Leith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Agent Severity:S3 (Non-critical)
Version:1.2.0.7057 OS:Any
Assigned to: Jan Kneschke CPU Architecture:Any

[15 Aug 2007 16:00] Mark Leith
Description:
When monitoring an instance, and the instance goes down, the agent logs the following:
2007-08-14 17:46:00: (critical) executing query 'SHOW INNODB STATUS' failed: MySQL server has gone away
2007-08-14 17:46:00: (critical) agent/src/agent_result_cache.c.333: I have no SHOW INNODB STATUS output ... strange
...
2007-08-14 17:48:00: (critical) executing query 'SHOW INNODB STATUS' failed: MySQL server has gone away
2007-08-14 17:48:00: (critical) agent/src/agent_result_cache.c.333: I have no SHOW INNODB STATUS output ... strange

There are two issues with this:

1) We should probably not try to collect this whilst the instance is down, move this 'within the reconnect loop'

2) The error message really is useless, and should not be in 'Enterprise Software'

How to repeat:
o Set up the agent to monitor an instance
o Make it collect some InnoDB variables (platinum graphs will do this automatically)
o Shut down the monitored instance

Suggested fix:
1) move the SHOW INNODB STATUS collection in to the connect retry logic so that it does not try to execute if the connection is known to be down

2) Make the error message more useful (the statement requires SUPER privilege for instance)
[15 Aug 2007 19:37] Andy Bang
Item #2 under 'Suggested fix' was fixed in r7128.  Jan or Eric still need to address item #1.
[22 Aug 2007 14:59] Jan Kneschke
fixed in [7229] in trunk/
[22 Aug 2007 22:03] Jan Kneschke
merged into 1.2.0 in [7237]
[30 Nov 2007 16:00] Peter Lavin
Added to the changelog for version 1.2.
Copy as follows:

 When a monitored server went down, the agent continued to
 log unhelpful messages such as ... executing query
 'SHOW INNODB STATUS' failed: MySQL server has gone
 away. The SHOW INNODB STATUS
 statement no longer executes if the instance is known to
 be down. The message for a failure of the SHOW
 INNODB STATUS statement has been changed to SHOW
 INNODB STATUS output is not available because InnoDB is
 disabled or because this account does not have the SUPER
 privilege.