You should check whether the events that fail are being truncated or parsed differently before the transform runs. Even if the regex works, rex, index-time transforms only see the raw event at ingestion, so settings like TRUNCATE, LINE_BREAKER, or INDEXED_EXTRACTIONS can affect the result. Also enable parsing debug logs to confirm whether set_source_from_evt is actually matching those events or being skipped. If the same event sometimes works and sometimes doesn't, that points more toward the ingestion pipeline than the regex itself. If everything looks correct, it may be worth opening a Splunk support case, as inconsistent MetaData:Source transforms during HEC ingestion aren't expected.
... View more