[rsyslog-notify] Forum Thread: How to group MySQL Slow Query logs? - (Mode 'edit_topic')
noreply at adiscon.com
noreply at adiscon.com
Sun Aug 17 21:01:30 CEST 2014
User: eddieb
Forumlink: http://kb.monitorware.com/viewtopic.php?p=24831#p24831
Message:
----------
Using v8.2.2, I would like to group multi-line messages, such as those
output by the MySQL Slow Query log.
Each new message begins with three consecutive lines having '#' as the
first char of the line, though some messages have only two lines having a
'#' at the beginning of the message. Example:
[code:k5teqj0i]
# Time: 140817 0:59:22
# User at Host: root[root] @ localhost []
# Query_time: 5.864315 Lock_time: 0.000033 Rows_sent:
857715 Rows_examined: 857715
SET timestamp=1408237162;
SELECT /*!40001 SQL_NO_CACHE */ * FROM `sales_flat_quote_shipping_rate`;
# Time: 140817 1:00:06
# User at Host: user2[user2] @ localhost []
# Query_time: 4.070595 Lock_time: 0.000068 Rows_sent:
0 Rows_examined: 1536
use db2;
SET timestamp=1408237206;
DELETE FROM `catalog_product_index_price_idx`;
# User at Host: db3[db3] @ localhost []
# Query_time: 3.892674 Lock_time: 0.046493 Rows_sent:
0 Rows_examined: 659
use db3;
SET timestamp=1408237206;
UPDATE user SET cert = 'yes' WHERE site_id < 10;
# Time: 140817 1:00:06
# User at Host: user2[user2] @ localhost []
# Query_time: 4.070595 Lock_time: 0.000068 Rows_sent:
0 Rows_examined: 1536
use db2;
SET timestamp=1408237206;
DELETE FROM `catalog_product_index_price_idx`;
# User at Host: db3[db3] @ localhost []
# Query_time: 3.892674 Lock_time: 0.046493 Rows_sent:
0 Rows_examined: 659
use db3;
SET timestamp=1408237206;
UPDATE user SET cert = 'yes' WHERE site_id < 10;
[/code:k5teqj0i]
How do I configure rsyslog to send them over (TCP, BTW) as a single message
?
PS: This question is also available on
[url=http://serverfault.com/questions/622035/how-do-i-configure-rsyslog-to-deal-with-mysql-slow-query-log-multi-line-messages:k5teqj0i]ServerFault[/url:k5teqj0i].
More information about the rsyslog-notify
mailing list