Hi Team,
Please help me to set logstash config from nested json input file.
My json file look like below:
[
{
"billing_account_id": "loma",
"InvoiceMonth": "123456",
"credits": [
{
"name": "abc",
"amount": ,0.005
"full_name": null,
"id": "abc",
"type": "xyz"
}
],
"resource_name": null,
"resource_global_name": null
},
{
"billing_account_id": "jill",
"cost": 0.0,
"credits": ,
"resource_name": null,
"resource_global_name": null
},
{
"billing_account_id": "jack",
"cost": 0.0,
"service_id": "jack123",
"service_description": "description",
"sku_id": "143342",
"credits": ,
"resource_name": null,
"resource_global_name": null
}
]
and my config looks like below:
input {
file {
path => "/etc/logstash/conf.d/test.json"
start_position => "beginning"
sincedb_path => "/dev/null"
codec => multiline { pattern => "^Spalanzani" negate => true what => previous auto_flush_interval => 1 multiline_tag => "" max_lines => 1000025}
}
}
filter {
json{ source => "message" }
}
output { stdout { codec => rubydebug } }
while running I am getting error something like this : :exception=>#<LogStash::Json::ParserError: Unexpected end-of-input: expected close marker for Array (start marker at [Source: (byte)