Commit e8515a2a authored by Jérome Perrin's avatar Jérome Perrin

Grafana: fix multiline log ingestion

See merge request !1756
parents afbb83fd 99041626
......@@ -23,7 +23,7 @@ md5sum = 86e379ac6ba789d65369ca1e0d4dfa3f
[instance-agent]
filename = instance-agent.cfg.in
md5sum = eeb529b2b6a8e762a9072c520691c66c
md5sum = 11cd081c2196f73441cd677b0d74b16a
[influxdb-config-file]
......
......@@ -568,8 +568,8 @@ init =
"stages": [
{
"multiline": {
# TODO this does not seem to work well
"firstline": "^------",
"max_lines": 1024,
"max_wait_time": "5s"
}
},
......@@ -628,6 +628,7 @@ init =
{
"multiline": {
"firstline": "^\\d{4}-\\d{2}-\\d{2}\\s\\d{1,2}\\:\\d{2}\\:\\d{2}\\,\\d{3}",
"max_lines": 1024,
"max_wait_time": "5s"
}
},
......@@ -658,18 +659,24 @@ init =
"job_name": job_name,
"pipeline_stages": [
{
"match": {
"selector": get_job_selector(partition, job_name, application['name']),
"stages": [
{
"multiline": {
# between each slow query, slow query log has a first line like:
# # Time: 231008 16:29:01
# and then a second like:
# # User@Host: user[user] @ [10.0.71.207]
# but the first line is not repeated for subsequent queries that happens
# at the same second
"firstline": r"(^# Time: \d{2}.*\n^# User@Host:.*|^# User@Host:.*)",
# at the same second. Drop this "Time:" line
"drop": {
"expression": r"^# Time: \d+.*",
}
},
{
"match": {
"selector": get_job_selector(partition, job_name, application['name']),
"stages": [
{
"multiline": {
"firstline": "^# User@Host:.*",
"max_lines": 1024,
"max_wait_time": "5s"
}
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment