All Apps and Add-ons

Splunk App for Jenkins: Can we access and search Jenkins master system log?

hyungchoi
New Member

We have successfully installed and configured Splunk App for Jenkins and Jenkins Splunk plugin. So far the basic features are working fine.

We need to save not only Jenkins job data, but complete Jenkins master system log as well.

Can we send Jenkins system master log to Splunk and access/search events in the system log on Splunk Jenkins App dashboard?

Jenkins system log can be found in https://JENKINS_MASTER_URL/log/.

0 Karma

txiao_splunk
Splunk Employee
Splunk Employee

It sends the log but with INFO as base level, you can search the log by

index=jenkins_console source="logger://*"

you can adjust the level by adding -Dcom.splunk.splunkjenkins.JdkSplunkLogHandler.level=FINE to Jenkins startup arguments, but use it on your own risk

0 Karma

hyungchoi
New Member

Adding jenkins startup option works for any logging event in the default “All Jenkins Logs”. However, Logging in the custom logger is not accessible.

Custom logs are located at JENKINS_HOME/logs/custom/*.log. I suspect these logs are not sent to Splunk as jenkins_console index.

My custom logger is "jenkins.security.SecurityListener"

Any idea?

Thanks,

0 Karma

hyungchoi
New Member

Adding -Dcom.splunk.splunkjenkins.JdkSplunkLogHandler.level=FINE startup option work for getting logging event in the default "All Jenkins Logs", but still not working for custom logger.

Custom logs are saved in as JENINKINS_HOME/logs/custom/*.log.

For example, I have created custom logger for jenkins.security.SecurityListener. Searching index=jenkins_console source="logger://jenkins.security.SecurityListener" doesn't return anything.

I do see deeper event login "All Jenkins Logs" now.

Any idea how to push custom logs to splunk as jenkins_console and access it?

Thanks,

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...