I am currently running a Jenkins instance on an Ubuntu 14.04 desktop machine. I have installed Jenkins via WAR distribution and am running Jenkins as a service on the host machine.
I am trying to access the jenkins.log file described here in the logging documentation on the Jenkins wiki. The purpose of accessing this file is to be sure we have a log to use in the event that Jenkins web UI is unavailable and there is an issue with Jenkins.
I've taken a look in /var/log/jenkins/ as the documentation suggests, however the only file in that folder is a config file.
Also, per the documentation, I have double checked the /etc/default/jenkins as well as the /etc/sysconfig/jenkins directories. Each one of these two directories does not exist on my machine.
I have also tried searching from command line using the 'find' command, as well as searching my system using the Ubuntu file explorer. Each of these approaches yielded no jenkins.log file.
Log files should be at /var/log/jenkins/jenkins.
Note: The default location for the Jenkins configuration file on Ubuntu and Debian is /etc/default/jenkins. If you are working with RedHat, CentOS, or Fedora, the Jenkins configuration file is located at /etc/sysconfig/jenkins.
If you want to want to monitor all the Jenkins instances, then you need to install filebeat in all the instances and ships the application log to logstash. Here, we will ship the application logs of one Jenkins instance only. Below is the filebeat. yml to monitor jenkins log file.
Go to your Jenkins home page -> Manage Jenkins -> Script Console. Run this script to clean and reset. Copy and paste this script to your Console Script text area and change the "copy_folder" to the project name that you need to clean the history. Then click the Run button.
Steps to find your jenkins log path
locate jenkins service file :
/etc/default/jenkins: location for most of the Linux distributions.
/etc/sysconfig/jenkins: location for RedHat/CentOS distribution.
Open it and probably you will see :
NAME=jenkins
JENKINS_LOG=/var/log/$NAME/$NAME.log
So your file /var/log/jenkins/jenkins.log must be exist. If not like you said, try to add this line
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With