Splunk Plugin regex help

14 views
Skip to first unread message

Cheryl Huntington

unread,
Feb 20, 2019, 6:31:32 PM2/20/19
to Jenkins Users

Hello,

I am configuring Jenkins to use the Splunk plugin. https://wiki.jenkins.io/display/JENKINS/Splunk+plugin+for+Jenkins.
I have the connection and logs being sent and now I want to restrict which jobs send logs to splunk.
There is a configuration setting to specify which jobs to not send logs from.  I want to send logs only from some specific QA jobs. I can't figure out how to set the regex to say 'don't send from any jobs except the jobs with "ProdQA" in them'.  Can anyone help?

Here is the help in the Jenkins plugin configuration


Check Regular Expression to select which jobs will be ignored for monitoring. Job names matches the pattern will be ignored, for example:
(?:backgroundJobName|adhocJobName|tempJobName)

will match backgroundJobName, backgroundJobNameBlah, blahbackgroundJobName
^(?:backgroundJobName|adhocJobName|tempJobName)$

will match backgroundJobName but neither backgroundJobNameBlah nor blahbackgroundJobName

(?:X)   X, as a non-capturing group
^   The beginning of a line
$   The end of a line
X|Y     Either X or Y
\w  A word character: [a-zA-Z_0-9]

Thanks!
  Cheryl


















chunt...@quotient.com

unread,
Feb 25, 2019, 10:14:09 PM2/25/19
to Jenkins Users
I found what I need.  The 'NOT' operator.
Reply all
Reply to author
Forward
0 new messages