summaryrefslogtreecommitdiffstats
path: root/fluent-bit/tests/runtime/data/tail
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 02:57:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 02:57:58 +0000
commitbe1c7e50e1e8809ea56f2c9d472eccd8ffd73a97 (patch)
tree9754ff1ca740f6346cf8483ec915d4054bc5da2d /fluent-bit/tests/runtime/data/tail
parentInitial commit. (diff)
downloadnetdata-upstream.tar.xz
netdata-upstream.zip
Adding upstream version 1.44.3.upstream/1.44.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'fluent-bit/tests/runtime/data/tail')
-rw-r--r--fluent-bit/tests/runtime/data/tail/log/3943.log2
-rw-r--r--fluent-bit/tests/runtime/data/tail/log/dockermode.log3
-rw-r--r--fluent-bit/tests/runtime/data/tail/log/dockermode_firstline_detection.log9
-rw-r--r--fluent-bit/tests/runtime/data/tail/log/dockermode_multiple_lines.log6
-rw-r--r--fluent-bit/tests/runtime/data/tail/log/dockermode_splitted_line.log6
-rw-r--r--fluent-bit/tests/runtime/data/tail/log/dockermode_splitted_multiple_lines.log8
-rw-r--r--fluent-bit/tests/runtime/data/tail/log/multiline_001.log6
-rw-r--r--fluent-bit/tests/runtime/data/tail/out/3943.out2
-rw-r--r--fluent-bit/tests/runtime/data/tail/out/dockermode.out3
-rw-r--r--fluent-bit/tests/runtime/data/tail/out/dockermode_firstline_detection.out5
-rw-r--r--fluent-bit/tests/runtime/data/tail/out/dockermode_multiple_lines.out2
-rw-r--r--fluent-bit/tests/runtime/data/tail/out/dockermode_splitted_line.out2
-rw-r--r--fluent-bit/tests/runtime/data/tail/out/dockermode_splitted_multiple_lines.out2
-rw-r--r--fluent-bit/tests/runtime/data/tail/out/multiline_001.out1
-rw-r--r--fluent-bit/tests/runtime/data/tail/out/skip_long_lines.out2
-rw-r--r--fluent-bit/tests/runtime/data/tail/parsers.conf10
-rw-r--r--fluent-bit/tests/runtime/data/tail/parsers_multiline_json.conf24
17 files changed, 93 insertions, 0 deletions
diff --git a/fluent-bit/tests/runtime/data/tail/log/3943.log b/fluent-bit/tests/runtime/data/tail/log/3943.log
new file mode 100644
index 00000000..8f3d91d9
--- /dev/null
+++ b/fluent-bit/tests/runtime/data/tail/log/3943.log
@@ -0,0 +1,2 @@
+bbb
+
diff --git a/fluent-bit/tests/runtime/data/tail/log/dockermode.log b/fluent-bit/tests/runtime/data/tail/log/dockermode.log
new file mode 100644
index 00000000..a5a05ee4
--- /dev/null
+++ b/fluent-bit/tests/runtime/data/tail/log/dockermode.log
@@ -0,0 +1,3 @@
+{"log":"Single log\n"}
+{"log":"Second log\n"}
+{"log":"Third log\n"}
diff --git a/fluent-bit/tests/runtime/data/tail/log/dockermode_firstline_detection.log b/fluent-bit/tests/runtime/data/tail/log/dockermode_firstline_detection.log
new file mode 100644
index 00000000..56a2711a
--- /dev/null
+++ b/fluent-bit/tests/runtime/data/tail/log/dockermode_firstline_detection.log
@@ -0,0 +1,9 @@
+{"log":"Single log\n"}
+{"log":"Second log\n"}
+{"log":"Third log\n"}
+{"log":"2020-03-24 Multiple lines: \n"}
+{"log":"first bullet point\n"}
+{"log":"second bullet point\n"}
+{"log":"third bullet point\n"}
+{"log":"fourth bullet point\n"}
+{"log":"2020-03-24 Single line\n"}
diff --git a/fluent-bit/tests/runtime/data/tail/log/dockermode_multiple_lines.log b/fluent-bit/tests/runtime/data/tail/log/dockermode_multiple_lines.log
new file mode 100644
index 00000000..564dabbb
--- /dev/null
+++ b/fluent-bit/tests/runtime/data/tail/log/dockermode_multiple_lines.log
@@ -0,0 +1,6 @@
+{"log":"2020-03-24 Multiple lines: \n"}
+{"log":"first bullet point\n"}
+{"log":"second bullet point\n"}
+{"log":"third bullet point\n"}
+{"log":"fourth bullet point\n"}
+{"log":"2020-03-24 Single line\n"}
diff --git a/fluent-bit/tests/runtime/data/tail/log/dockermode_splitted_line.log b/fluent-bit/tests/runtime/data/tail/log/dockermode_splitted_line.log
new file mode 100644
index 00000000..8f80f1b3
--- /dev/null
+++ b/fluent-bit/tests/runtime/data/tail/log/dockermode_splitted_line.log
@@ -0,0 +1,6 @@
+{"log":"2020-03-24 Single "}
+{"log":"li"}
+{"log":"ne\n"}
+{"log":"2020-03-24 Another "}
+{"log":"single "}
+{"log":"line\n"}
diff --git a/fluent-bit/tests/runtime/data/tail/log/dockermode_splitted_multiple_lines.log b/fluent-bit/tests/runtime/data/tail/log/dockermode_splitted_multiple_lines.log
new file mode 100644
index 00000000..2c7d36dd
--- /dev/null
+++ b/fluent-bit/tests/runtime/data/tail/log/dockermode_splitted_multiple_lines.log
@@ -0,0 +1,8 @@
+{"log":"2020-03-24 Multiple lines: \n"}
+{"log":"first bullet point\n"}
+{"log":"second bullet point\n"}
+{"log":"third "}
+{"log":"bullet "}
+{"log":"point\n"}
+{"log":"fourth bullet point\n"}
+{"log":"2020-03-24 Single line\n"}
diff --git a/fluent-bit/tests/runtime/data/tail/log/multiline_001.log b/fluent-bit/tests/runtime/data/tail/log/multiline_001.log
new file mode 100644
index 00000000..986223d8
--- /dev/null
+++ b/fluent-bit/tests/runtime/data/tail/log/multiline_001.log
@@ -0,0 +1,6 @@
+{"key1": 12345, "key2": "abc", "time": "2006-07-28T13:22:04Z","message":"Dec 14 06:41:08 Exception in thread main java.lang.RuntimeException: Something has gone wrong, aborting!"}
+{"key1": 12345, "key2": "abc", "time": "2006-07-28T13:22:04Z","message":" at com.myproject.module.MyProject.badMethod(MyProject.java:22)"}
+{"key1": 12345, "key2": "abc", "time": "2006-07-28T13:22:04Z","message":" at com.myproject.module.MyProject.oneMoreMethod(MyProject.java:18)"}
+{"key1": 12345, "key2": "abc", "time": "2006-07-28T13:22:04Z","message":" at com.myproject.module.MyProject.anotherMethod(MyProject.java:14)"}
+{"key1": 12345, "key2": "abc", "time": "2006-07-28T13:22:04Z","message":" at com.myproject.module.MyProject.oneMoreMethod(MyProject.java:13)"}
+{"key1": 12345, "key2": "abc", "time": "2006-07-28T13:22:04Z","message":" at com.myproject.module.MyProject.oneMoreMethod(MyProject.java:12)"}
diff --git a/fluent-bit/tests/runtime/data/tail/out/3943.out b/fluent-bit/tests/runtime/data/tail/out/3943.out
new file mode 100644
index 00000000..52a0f10a
--- /dev/null
+++ b/fluent-bit/tests/runtime/data/tail/out/3943.out
@@ -0,0 +1,2 @@
+{"log":"bbb"}
+{"log":""} \ No newline at end of file
diff --git a/fluent-bit/tests/runtime/data/tail/out/dockermode.out b/fluent-bit/tests/runtime/data/tail/out/dockermode.out
new file mode 100644
index 00000000..a5a05ee4
--- /dev/null
+++ b/fluent-bit/tests/runtime/data/tail/out/dockermode.out
@@ -0,0 +1,3 @@
+{"log":"Single log\n"}
+{"log":"Second log\n"}
+{"log":"Third log\n"}
diff --git a/fluent-bit/tests/runtime/data/tail/out/dockermode_firstline_detection.out b/fluent-bit/tests/runtime/data/tail/out/dockermode_firstline_detection.out
new file mode 100644
index 00000000..00eecce9
--- /dev/null
+++ b/fluent-bit/tests/runtime/data/tail/out/dockermode_firstline_detection.out
@@ -0,0 +1,5 @@
+{"log":"Single log\n"}
+{"log":"Second log\n"}
+{"log":"Third log\n"}
+{"log":"2020-03-24 Multiple lines: \nfirst bullet point\nsecond bullet point\nthird bullet point\nfourth bullet point\n"}
+{"log":"2020-03-24 Single line\n"}
diff --git a/fluent-bit/tests/runtime/data/tail/out/dockermode_multiple_lines.out b/fluent-bit/tests/runtime/data/tail/out/dockermode_multiple_lines.out
new file mode 100644
index 00000000..27fba1b9
--- /dev/null
+++ b/fluent-bit/tests/runtime/data/tail/out/dockermode_multiple_lines.out
@@ -0,0 +1,2 @@
+{"log":"2020-03-24 Multiple lines: \nfirst bullet point\nsecond bullet point\nthird bullet point\nfourth bullet point\n"}
+{"log":"2020-03-24 Single line\n"}
diff --git a/fluent-bit/tests/runtime/data/tail/out/dockermode_splitted_line.out b/fluent-bit/tests/runtime/data/tail/out/dockermode_splitted_line.out
new file mode 100644
index 00000000..14d0aa8a
--- /dev/null
+++ b/fluent-bit/tests/runtime/data/tail/out/dockermode_splitted_line.out
@@ -0,0 +1,2 @@
+{"log":"2020-03-24 Single line\n"}
+{"log":"2020-03-24 Another single line\n"}
diff --git a/fluent-bit/tests/runtime/data/tail/out/dockermode_splitted_multiple_lines.out b/fluent-bit/tests/runtime/data/tail/out/dockermode_splitted_multiple_lines.out
new file mode 100644
index 00000000..27fba1b9
--- /dev/null
+++ b/fluent-bit/tests/runtime/data/tail/out/dockermode_splitted_multiple_lines.out
@@ -0,0 +1,2 @@
+{"log":"2020-03-24 Multiple lines: \nfirst bullet point\nsecond bullet point\nthird bullet point\nfourth bullet point\n"}
+{"log":"2020-03-24 Single line\n"}
diff --git a/fluent-bit/tests/runtime/data/tail/out/multiline_001.out b/fluent-bit/tests/runtime/data/tail/out/multiline_001.out
new file mode 100644
index 00000000..73f48580
--- /dev/null
+++ b/fluent-bit/tests/runtime/data/tail/out/multiline_001.out
@@ -0,0 +1 @@
+{"key1":12345,"key2":"abc","time":"2006-07-28T13:22:04Z","message":"Dec 14 06:41:08 Exception in thread main java.lang.RuntimeException: Something has gone wrong, aborting!\n at com.myproject.module.MyProject.badMethod(MyProject.java:22)\n at com.myproject.module.MyProject.oneMoreMethod(MyProject.java:18)\n at com.myproject.module.MyProject.anotherMethod(MyProject.java:14)\n at com.myproject.module.MyProject.oneMoreMethod(MyProject.java:13)\n at com.myproject.module.MyProject.oneMoreMethod(MyProject.java:12)"}
diff --git a/fluent-bit/tests/runtime/data/tail/out/skip_long_lines.out b/fluent-bit/tests/runtime/data/tail/out/skip_long_lines.out
new file mode 100644
index 00000000..c7c32913
--- /dev/null
+++ b/fluent-bit/tests/runtime/data/tail/out/skip_long_lines.out
@@ -0,0 +1,2 @@
+{"log":"before_long_line"}
+{"log":"after_long_line"} \ No newline at end of file
diff --git a/fluent-bit/tests/runtime/data/tail/parsers.conf b/fluent-bit/tests/runtime/data/tail/parsers.conf
new file mode 100644
index 00000000..28bde475
--- /dev/null
+++ b/fluent-bit/tests/runtime/data/tail/parsers.conf
@@ -0,0 +1,10 @@
+[PARSER]
+ Name docker
+ Format json
+ Time_Key time
+ Time_Format %Y-%m-%dT%H:%M:%S.%L%z
+
+[PARSER]
+ Name docker_multiline
+ Format regex
+ Regex (?<log>^{"log":"\d{4}-\d{2}-\d{2}.*)
diff --git a/fluent-bit/tests/runtime/data/tail/parsers_multiline_json.conf b/fluent-bit/tests/runtime/data/tail/parsers_multiline_json.conf
new file mode 100644
index 00000000..1ed1cfdf
--- /dev/null
+++ b/fluent-bit/tests/runtime/data/tail/parsers_multiline_json.conf
@@ -0,0 +1,24 @@
+[PARSER]
+ Name json
+ Format json
+
+[MULTILINE_PARSER]
+ name multiline-json-regex
+ key_content message
+ type regex
+ parser json
+ flush_timeout 2000
+
+ #
+ # Regex rules for multiline parsing
+ # ---------------------------------
+ #
+ # configuration hints:
+ #
+ # - first state always has the name: start_state
+ # - every field in the rule must be inside double quotes
+ #
+ # rules | state name | regex pattern | next state
+ # ------|---------------|--------------------------------------------
+ rule "start_state" "/(Dec \d+ \d+\:\d+\:\d+)(.*)/" "cont"
+ rule "cont" "/^\s+at.*/" "cont"