Structured json logging from systemd service and agent

Hi @wilk ,

Welcome to the Google Cloud Community!

As a first step in troubleshooting, I recommend ensuring that the output of your systemd service is structured in the proper JSON format. This involves adjusting how your service writes its logs to ensure that each log entry is a valid JSON object.

Once you have your systemd service outputting structured JSON logs, consider using Fluentd to further process and forward these logs to the Ops Agent. Fluentd can be configured to collect logs directly from your systemd service, either by tailing log files or capturing stdout/stderr outputs.

I hope this helps. Thank you.