Bug #37026 agent does not log mysql disconnect/reconnects
Submitted: 28 May 2008 6:42 Modified: 29 May 2008 2:25
Reporter: Adam Dixon
Status: Verified
Category:Monitoring: Agent Severity:S4 (Feature request)
Version:1.3.0.8957 OS:Any
Assigned to: Jan Kneschke Target Version:
Triage: D5 (Feature request)

[28 May 2008 6:42] Adam Dixon
Description:
When agent in debug log-level, it does not log at all about the connection being lost to
the server it is monitoring. Aborted connections were occurring, but this was not being
logged by the agent, agent logs about trying to gain sync again only.

080528 13:59:15 [Warning] Aborted connection 23 to db: 'unconnected' user: 'root' host:
'localhost' (Got timeout reading communication packets)

See here the agent debug log, it appears everything is working fine, but the above
aborted connection occurred.

2008-05-28 13:59:05: (debug) <-- received: <?xml version="1.0"?><doc><tasks></ta
sks><agentId><![CDATA[1211948520104.8]]></agentId></doc>

2008-05-28 13:59:15: (message) --> sending heartbeat (shutdown = 0)
2008-05-28 13:59:15: (debug) --> sending: <doc><agentId>1211948520104.8</agentId
><agentUtc>2008-05-28T04:29:15.132Z</agentUtc><hostname>localhost</hostname><uui
d>157719c8-3a26-4cf1-acd7-2f9388402175</uuid><version>1.3.0.8957</version><shutd
own>false</shutdown><tasks/></doc>

2008-05-28 13:59:15: (debug) <-- received: <?xml
version="1.0"?><doc><tasks></tasks><agentId><![CDATA[1211948520104.8]]></agentId></doc>

2008-05-28 13:59:25: (message) --> sending heartbeat (shutdown = 0)
2008-05-28 13:59:25: (debug) --> sending:
<doc><agentId>1211948520104.8</agentId><agentUtc>2008-05-28T04:29:25.133Z</agentUtc><hostname>localhost</hostname><uuid>157719c8-3a26-4cf1-acd7-2f9388402175</uuid><version>1.3.0.8957</version><shutdown>false</shutdown><tasks/></doc>

How to repeat:
Above was repeated with low wait_timeout, causing connection to abort whilst in debug log
level.

Suggested fix:
Log that connection to monitored server disconnected/reconnected/failed attempts etc.