5.3 Test Transform Processor
This test verifies that the com.splunk/source and os.type metadata have been removed from the log resource attributes before being exported by the Agent. Additionally, the test ensures that:
- The log body is parsed to extract severity information.
SeverityTextandSeverityNumberare set on theLogRecord.
- JSON fields from the log body are promoted to log
attributes.
This ensures proper metadata filtering, severity mapping, and structured log enrichment before exporting.
Exercise
Check the debug output: For both the Agent and Gateway confirm that com.splunk/source and os.type have been removed:
For both the Agent and Gateway confirm that SeverityText and SeverityNumber in the LogRecord is now defined with the severity level from the log body. Confirm that the JSON fields from the body can be accessed as top-level log Attributes:
Check file output: In the new gateway-logs.out file verify the data has been transformed:
Important
Stop the Agent and the Gateway processes by pressing Ctrl-C in their respective terminals.