I want to Monitor name/E-mail/IP id of User's who Successfully logged in to my Jenkins's server. I am the system Administrator. Please help.
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.
Overview. This plugin provides audit logging for various Jenkins events. These include build lifecycles, node lifecycles, login/logout, item lifecycles, and some other events. These audit events use Apache Log4j Audit to define standardized event interfaces and logging through Apache Log4j2 plugins.
This plugin will write custom log recorders into $JENKINS_HOME/logs/custom/ on the Jenkins controller's filesystem. You can then tail the relevant file to see updates to it. (Jenkins 2.114 introduced a system property which allows you to specify a different location to store Jenkins logs.
Now open a new tab in your web browser and type the URL http://192.168.33.10/logs/jenkins. You will see all the content of the Jenkins server /var/log/jenkins folder, including the jenkins.
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 log
JENKINS_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 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