We've logs coming to HEC as nested JSON in chunks; We're trying to break them down into individual events at the HEC level before indexing them in Splunk. I had some success to remove the header/footer with props.conf and breaking the events, but it doesn't work completely. Most of the logs are not broken into individual events. Sample events - {
"logs": [
{
"type": "https",
"timestamp": "2025-03-17T23:55:54.626915Z",
"elb": "someELB",
"client_ip": "10.xx.xx.xx",
"client_port": 123456,
"target_ip": "10.xx.xx.xx",
"target_port": 123456,
"request_processing_time": 0,
"target_processing_time": 0.003,
"response_processing_time": 0,
"elb_status_code": 200,
"target_status_code": 200,
"received_bytes": 69,
"sent_bytes": 3222,
"request": "GET https://xyz.com",
"user_agent": "-",
"ssl_cipher": "ECDHE-RSA-AE",
"ssl_protocol": "TLSv1.2",
"target_group_arn": "arn:aws:elasticloadbalancing:us-west-2:XXXXX:targetgroup/XXXXX",
"trace_id": "Root=XXXX"
},
{
"type": "https",
"timestamp": "2025-03-17T23:56:00.285547Z",
"elb": "someELB",
"client_ip": "10.xx.xx.xx",
"client_port": 123456,
"target_ip": "10.xx.xx.xx",
"target_port": 123456,
"request_processing_time": 0,
"target_processing_time": 0.003,
"response_processing_time": 0,
"elb_status_code": 200,
"target_status_code": 200,
"received_bytes": 69,
"sent_bytes": 3222,
"request": "GET https://xyz.com",
"user_agent": "-",
"ssl_cipher": "ECDHE-RSA-AE",
"ssl_protocol": "TLSv1.2",
"target_group_arn": "arn:aws:elasticloadbalancing:us-west-2:XXXXX:targetgroup/XXXXX",
"trace_id": "Root=XXXX"
},
{
"type": "https",
"timestamp": "2025-03-17T23:57:39.574741Z",
"elb": "someELB",
"client_ip": "10.xx.xx.xx",
"client_port": 123456,
"target_ip": "10.xx.xx.xx",
"target_port": 123456,
"request_processing_time": 0,
"target_processing_time": 0.003,
"response_processing_time": 0,
"elb_status_code": 200,
"target_status_code": 200,
"received_bytes": 69,
"sent_bytes": 3222,
"request": "GET https://xyz.com",
"user_agent": "-",
"ssl_cipher": "ECDHE-RSA-AE",
"ssl_protocol": "TLSv1.2",
"target_group_arn": "arn:aws:elasticloadbalancing:us-west-2:XXXXX:targetgroup/XXXXX",
"trace_id": "XXXX"
}
]
} I am trying to get {
"type": "https",
"timestamp": "2025-03-17T23:55:54.626915Z",
"elb": "someELB",
"client_ip": "10.xx.xx.xx",
"client_port": 123456,
"target_ip": "10.xx.xx.xx",
"target_port": 123456,
"request_processing_time": 0,
"target_processing_time": 0.003,
"response_processing_time": 0,
"elb_status_code": 200,
"target_status_code": 200,
"received_bytes": 69,
"sent_bytes": 3222,
"request": "GET https://xyz.com",
"user_agent": "-",
"ssl_cipher": "ECDHE-RSA-AE",
"ssl_protocol": "TLSv1.2",
"target_group_arn": "arn:aws:elasticloadbalancing:us-west-2:XXXXX:targetgroup/XXXXX",
"trace_id": "Root=XXXX"
}
{
"type": "https",
"timestamp": "2025-03-17T23:56:00.285547Z",
"elb": "someELB",
"client_ip": "10.xx.xx.xx",
"client_port": 123456,
"target_ip": "10.xx.xx.xx",
"target_port": 123456,
"request_processing_time": 0,
"target_processing_time": 0.003,
"response_processing_time": 0,
"elb_status_code": 200,
"target_status_code": 200,
"received_bytes": 69,
"sent_bytes": 3222,
"request": "GET https://xyz.com",
"user_agent": "-",
"ssl_cipher": "ECDHE-RSA-AE",
"ssl_protocol": "TLSv1.2",
"target_group_arn": "arn:aws:elasticloadbalancing:us-west-2:XXXXX:targetgroup/XXXXX",
"trace_id": "Root=XXXX"
}
{
"type": "https",
"timestamp": "2025-03-17T23:57:39.574741Z",
"elb": "someELB",
"client_ip": "10.xx.xx.xx",
"client_port": 123456,
"target_ip": "10.xx.xx.xx",
"target_port": 123456,
"request_processing_time": 0,
"target_processing_time": 0.003,
"response_processing_time": 0,
"elb_status_code": 200,
"target_status_code": 200,
"received_bytes": 69,
"sent_bytes": 3222,
"request": "GET https://xyz.com",
"user_agent": "-",
"ssl_cipher": "ECDHE-RSA-AE",
"ssl_protocol": "TLSv1.2",
"target_group_arn": "arn:aws:elasticloadbalancing:us-west-2:XXXXX:targetgroup/XXXXX",
"trace_id": "XXXX"
} props.conf [source::http:lblogs]
SHOULD_LINEMERGE = false
SEDCMD-remove_prefix = s/^\{\s*\"logs\"\:\s+\[//g
SEDCMD-remove_suffix = s/\]\}$//g
LINE_BREAKER = \}(,\s+)\{
NO_BINARY_CHECK = true
TIME_PREFIX = \"timestamp\":\s+\"
pulldown_type = true
MAX_TIMESTAMP_LOOKAHEAD = 100
TIME_FORMAT = %Y-%m-%dT%H:%M:%S.%6N
TRUNCATE = 1000000 Current Result in Splunk are below in the attached screenshot. The header ({ logs [) and footer are removed from events, but then split (line break) maybe just working for one event in the chunk and others are ignored.
... View more