https://signoz.io logo
#general
Title
# general
s

Saroja Murthy

07/16/2023, 10:42 AM
Hi All, Am trying to send my Spring Boot Application's logs to Signoz. This is the format of the logs.
16:04:19.678  INFO --- [erListUpdater-0] c.c.a.config.SpringProfileConfig      :  Using local profile
I have referred https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/filelogreceiver/README.md and added the following to otel-collector-config.yaml
include: [ "/tmp/tomcat.log" ]
start_at:
include_file_path: true
include_file_name: false
operators:
- type: regex_parser
regex: '^(?P<time>\d{2}-[A-Za-z]{3}-\d{2} \d{2}:\d{2}:\d{2}.\d{3}) (?P<sev>[A-Z]*) (?P<msg>.*)$'
timestamp:
parse_from: attributes.time
layout: '%Y-%m-%d %H:%M:%S'
severity:
parse_from: attributes.sev
But it isnt working as expected. Can someone please help ?
p

Prashant Shahi

07/17/2023, 7:58 AM
cc @nitya-signoz
n

nitya-signoz

07/17/2023, 8:00 AM
Your regex seems to be wrong. https://regex101.com/r/ALm0tk/1
Incase you want to use the java otel agent which will automatically send parsed logs please follow this issue. https://github.com/SigNoz/signoz.io/issues/855 https://signoz.io/docs/userguide/collecting_application_logs_otel_sdk_java/
s

Saroja Murthy

07/23/2023, 8:55 AM
@nitya-signoz Ours is a web application which generates WAR. Do you have any docs for sending parsed logs from a web application ?
2 Views