Thanks for replying. I found the issue.
My sh script outputs a structured (tab delimited) data and I defined the sourcetype accordingly.
The issue was I have not added the sourcetype definition in the inputs.conf of Universal forwarder.
After adding sourcetype definition on UF and restarting it, I can see the fields defined in sourcetype.
Still wondering though, why the sourcetype definition is required on UF since as per splunk documentation, Splunk UF do not parse the data while forwarding it.
sourcetype is set in the input portion of the pipleline, not the parsing portion.
... View more