Bug #57303 Add timestamp of query execution to the Aggregator
Submitted: 7 Oct 2010 9:37 Modified: 10 Feb 2011 23:24
Reporter: Mark Leith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Aggregator Severity:S3 (Non-critical)
Version:2.3.0.2030 OS:Any
Assigned to: Jan Kneschke CPU Architecture:Any
Tags: windmill

[7 Oct 2010 9:37] Mark Leith
Description:
Currently the aggregator does not collect the timestamp that a query was executed from its sources. When it sends its data to the Service Manager, the SM then just uses the timestamp that the data was sent to it. 

For sources of the aggregator that buffer their data before it is sent, this then means that any correlation between graphs and QUAN data could be broken. 

How to repeat:
o Send query data to the aggregator 10 minutes after executing the queries against the database
o Select the spike (like a 3 minute period) of when the queries executed on the "database activity" graph
o See that no query data is shown in QUAN, because QUAN thinks it executed ~7 minutes later.

Suggested fix:
Add timestamp tracking via the Aggregator API. 

Should probably be part of the "data" hash, and should be optional (with the caveat that we fall back on the broken assumption) - to allow the other connectors to catch up.
[7 Oct 2010 13:04] Enterprise Tools JIRA Robot
Mark Leith writes: 
Add in the API as "timestamp" in the "data" frame. Incoming format will be yyyy-MM-dd'T'HH:mm:ss.SSS'Z' - an iso standard UTC timestamp.
[18 Nov 2010 1:04] Enterprise Tools JIRA Robot
Andy Bang writes: 
In build 2.3.1.2039.
[2 Dec 2010 18:48] Enterprise Tools JIRA Robot
Diego Medina writes: 
Tested 2.3.1.2044 and the timestamp does not show on the aggregator debug log.

I'll attach the aggregator debug log as well as the json I am sending.
[2 Dec 2010 18:49] Enterprise Tools JIRA Robot


Attachment: 10530_mysql-monitor-agent.log (text/plain), 13.44 KiB.

[2 Dec 2010 18:50] Enterprise Tools JIRA Robot


Attachment: 10531_json1.txt (text/plain), 1.74 KiB.

[2 Dec 2010 18:50] Enterprise Tools JIRA Robot


Attachment: 10532_send_queries_aggr.sh (application/x-sh, text), 116 bytes.

[2 Dec 2010 19:02] Enterprise Tools JIRA Robot
Diego Medina writes: 
The timestamp is sent as a http header, which does appear on the log
[24 Jan 2011 19:44] John Russell
Added to 2.3.1 change log:

The timestamp sent from the Aggregator to the Service Manager
reflected the time that a query was sent to the Aggregator, not the
time that the query was actually run. This could result in inaccurate
graphs if the query data was buffered before being sent to the
Aggregator.