Added required epoc time field for Splunk HEC Event Receiver #14246
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
This change adds an epoch time field to the json that will be sent when logging to Splunk. This time field is required as when sending to the Splunk HEC using the /services/collector/event receiver (which is why the "event" wrapper was added originally) no scanning of the event will occur to find the timestamp of the event. If a time for the event is required then either the time field needs to be set in the metadata or the parameter "auto_extract_timestamp=true" needs to be passed with the http request. Adding the itme field is the more efficient option. If neither of these options are set then Splunk uses the time that the event was received as the alert time, on busy HEC receivers when there is queuing this can distort the event times.
https://docs.splunk.com/Documentation/Splunk/9.1.0/Data/FormateventsforHTTPEventCollector
See event metadata section
ISSUE TYPE
COMPONENT NAME
logging formatters
AWX VERSION
ADDITIONAL INFORMATION