I answer my own question:
By using splunkins.send(msg) I am able to pass on my application,build and release details as key value pair to splunk and in splunk I can see each parameter I send from jenkins as a field in splunk and I can build my dashboards.
Here is my pipeline script to send my application,build and release details to splunk
jobtype = "build"
branch = "dev"
application = "My Application"
component = "My Component"
release = "My Release"
jstatus = "Started"
jresult = "Building"
msg = "BNum="+BUILD_NUMBER+",JName="+JOB_NAME+",AppName="+application+",CompName="+component+",BranchName="+branch+",RelNumber="+release+",JobStatus="+jstatus+",JobResult="+jresult+",JType="+jobtype
In the above code ensure that you append all your build, application and release details in the same way to variable msg(in my case). Otherwise splunk is not recognizing them as fields.
on the splunk side here is the query to see the data that you sent.
sourcetype="text:jenkins" BNum=10 AppName="My Application" RelNumber="My Release"
... View more