How do I monitor log of the users who successfully logged into my Jenkins Server?
- Go to -> Manage Jenkins -> System Log
- Click on add new log recorder and name it anything you like for example ->user_access_details
- Then click on add loggers once prompted and add jenkins.security.SecurityListener and set it to Finest level
Should look like this -
Logs would look like this -
You can enable access log by adding these lines to /etc/default/jenkins above JENKINS_ARGS:
# Enable access logJENKINS_ACCESSLOG="--accessLoggerClassName=winstone.accesslog.SimpleAccessLogger --simpleAccessLogger.format=combined --simpleAccessLogger.file=/var/log/jenkins/access.log"
Enable log rotation: edit /etc/logrotate.d/jenkins and change /var/log/jenkins/jenkins.log to /var/log/jenkins/*.log
Copy from here.
Does it help?
If you want to see who is doing what, I would install the Audit Trail Plugin: https://wiki.jenkins-ci.org/display/JENKINS/Audit+Trail+Plugin and if you're really hardcore, I would install the Audit to Database Plugin: https://wiki.jenkins-ci.org/display/JENKINS/Audit+To+Database+Plugin