splunk / docker-logging-plugin

Splunk Connect for Docker is a Docker logging plugin that allows docker containers to send their logs directly to Splunk Enterprise or a Splunk Cloud deployment.
Apache License 2.0
65 stars 25 forks source link

Add hec format #73

Open stephenwood4-nhs opened 2 years ago

stephenwood4-nhs commented 2 years ago

Proposed changes

Introduce a new splunk-format named "hec" which fixes issue https://github.com/splunk/docker-logging-plugin/issues/48

This allows containers to output logs in the JSON format as expected by the Splunk HEC endpoint (https://docs.splunk.com/Documentation/Splunk/9.0.0/Data/FormateventsforHTTPEventCollector) and the logging driver will parse these correctly. Applications running in containers will be able to control which index, source, sourcetype etc. log events should be set to within Splunk.

Also replaces the CircleCI integration for testing with Github Actions. Unfortunately this has not fixed issue https://github.com/splunk/docker-logging-plugin/issues/45 and functional tests still intermittently fail. A fully successful run has been completed with the current changes.

Minor changes; uplift Go version to 1.19.0 and switch to go modules instead of dep (which has been deprecated since 2020). Uplift Python version used for functional tests to 3.8 (needed due to updated Python dependencies), this also required a rebuild of the python protobuf file.

Types of changes

What types of changes does your code introduce? Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply.