Replies: 1 comment 4 replies
-
What do you mean by "doesn't work"? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Example log:
[
{
"hostname": "myhostname01",
"message": "10.218.15.12 - - [17/Jul/2024:03:40:44 +0800] "POST /udoorkeeper/report/heartbeat HTTP/1.1" 200 2 "-" "remote-zuche-java" "-" 0.009 udoorkeepertest04.xxx.com 10.218.22.11:8080 200 0.009 http - - - -",
"my_ip": "10.218.20.105",
"@timestamp": "2024-07-17T03:40:44+08:00"
},
{
"hostname": "myhostname02",
"message": "10.218.15.192 - - [17/Jul/2024:03:40:44 +0800] "GET /healthCheck HTTP/2.0" 200 19 "-" "Blackbox Exporter/0.23.0" "-" 0.001 zeusnewtest04.xxx.com 10.218.18.139:8080 200 0.003 https - - - -",
"my_ip": "10.218.20.105",
"@timestamp": "2024-07-17T03:40:44+08:00"
}
]
My conf:
data_dir = "/opt/vector/data"
[sources.access_log ]
type = "kafka"
bootstrap_servers = "xxxx”
group_id = "accesslog"
topics = [ "access_log" ]
auto_offset_reset = "largest"
session_timeout_ms = 10000
[transforms.access_parser]
inputs = ["access_log"]
type = "remap"
source = '''
. = parse_json!(.message)
#., err = merge(., parse_nginx_log!(.message, "combined")) ##It doesn't work here
'''
[sinks.print]
type = "console"
inputs = [ "access_parser" ]
encoding.codec = "json"
Beta Was this translation helpful? Give feedback.
All reactions