We would like to customize some metadata and log it from certain jobs to their own Splunk index for security reasons.
https://wiki.jenkins.io/display/JENKINS/Splunk+Plugin+for+Jenkins please check section 3: Customize The Job Data Sent to Splunk Jenkins->Configure System->Splunk for Jenkins Configuration->Advanced ->Customize Event Processing Command
There is an example in FAQ about collect info of upstream/downstream, I think you can reference that one for usage