diff --git a/pytest_splunk_addon/standard_lib/sample_generation/sample_stanza.py b/pytest_splunk_addon/standard_lib/sample_generation/sample_stanza.py index 7232753a8..cb2e4706b 100644 --- a/pytest_splunk_addon/standard_lib/sample_generation/sample_stanza.py +++ b/pytest_splunk_addon/standard_lib/sample_generation/sample_stanza.py @@ -306,6 +306,9 @@ def _get_raw_sample(self): static_host = each_event["transport"].get("@host") if static_host: event_metadata.update(host=static_host) + static_source = each_event["transport"].get("@source") + if static_source: + event_metadata.update(source=static_source) yield SampleEvent( event, event_metadata, self.sample_name, requirement_test_data )