Packetbeat missing some data

Asked by At

Is there a limit of 10 seconds for logging queries using packetbeat? For e.g. The first query in the following example got logged correctly as expected. But the second query does not show up in elastic.

MySQL [test]> select sleep(9.9);
+------------+
| sleep(9.9) |
+------------+
|          0 |
+------------+
1 row in set (9.91 sec)


MySQL [test]> select sleep(10);
+-----------+
| sleep(10) |
+-----------+
|         0 |
+-----------+
1 row in set (10.00 sec)

I guess it is related to refresh_topology_freq parameter that is set to 10 seconds by default. Is there any way to change this?

I need the second query above to be logged as well.

1 Answers

2
Kate Orlova On Best Solutions

You have to increase a transaction_timeout setting as it is set to 10s by default. Your second query runs 10 secs and considers as expired, but expired transactions are no longer correlated to incoming responses and sent to Elasticsearch immediately.