How to configure Jenkins to send a notification email when a Slave goes offline? - jenkins

How to configure Jenkins to send a notification email when a Slave goes offline?
I have a Windows Server in the Cloud.
In there is a Jenkins Slave running that runs a nightly build, but sometimes the Slave goes offline and I need to know when it goes offline.
How can I configure to Jenkins send me a email notification in this case?

The setting that Lars mentions does not seem to come with a default Jenkins installation (v1.514). I see it with the Mail watcher plugin

In the slave configuration, there's an option "Notify when Node online status changes". If you check it, it will allow you to enter email addresses to be notified when the slave comes online/goes offline.

Related

How to automatically disconnect Jenkins Slave agent from Master controller server post build completion?

We have a requirement to automatically disconnect Jenkins Slave agent from Master controller server once the build has been completed irrespective of its status. We are using windows agents in our case.
Anybody is having any idea, how to do that ?
Thanks in advance..!!
In the slave configuration page, there is a field calles "availability".
Check "Take this slave on-line when in demand and off-line when idle" and it should disconnect after running the job.

Email no longer sent after jenkins job execution

On a Ubuntu, I have a Jenkins service setup with Email-EXT plugin, where I have setup jobs executed regularly, and emails are being sent after the job execution. But just recently, I no longer receive any emails after the job execution.
Details:
In each job execution "console output", it is said that Email has been triggered.
And I was able to use the "Test configuration by sending test e-mail"
on Jenkins/"configure system" page" to send out the testing email.
Based on my company rule, I had the password changed just recently.
And I did the some update on jenkins/configure page as well.
jenkins version 2.176.1
EMAIL-EXT plugin version: 2.69
So what could be wrong for not receiving emails ????
In my case, there is nothing wrong with the jenkins side settings. I have switched the smtp server to user the gmail one, and it works. It must be some policy change on my company smtp server side.
BTW, to turn on the debug mode of the trigger gives some direction to my case.

Is it possible to trigger a job from Jenkins by parsing/receiving an event from Git/Gerrit Replica/Slave server?

I would like to connect my Jenkins to the Git/Gerrit replica/slave server. I want my Jenkins server to start building job once a commit is merged in the replica server. It is possible with Git/Gerrit Main server, but not sure whether this can be achieved via Gerrit replica or slave server.
I don't see any problem, I think you just need to create an additional Gerrit server at:
Jenkins > Manage Jenkins > Gerrit Trigger > Add New Server
And point to the replica/slave server at "Hostname" and "Frontend URL" fields.

Jenkins 2.3.5 Build Notification (Emailext, bitbucket build status notifier) Not Working

We recently rebuilt our Jenkins server and we are using Jenkins 2.3.5/JDK8/ubuntu 14.04/bitbucket cloud/hipchat cloud.
After we got the newly built Jenkins server running, everything worked except for the build result notification.
We used to get the bitbucket account that we used with Jenkins to comment on the build result, so we can receive it in the hipchat room, even without using hipchat notification plugin. Now, we have tried the emailext plugin, Bitbucket Build Status Notifier Plugin, but none of them worked. It seems that the plugin is all out of date in terms of configurations.
For emailext, it complains "An attempt to send an e-mail to empty list of recipients, ignored." But we put a number of email in the "Default Recipients". And all the SMTP settings are correct since we can receive testing message.
For Bitbucket Build Status Notifier Plugin, I followed here, but I couldn't find the "Bitbucket notify build status" in the job configure.
Any suggestions would be appreciated.
Use Extended Email notification plugin, set SMTP server in Jenkins global configuration

retrospectively switch on emails for Jenkins jobs

We have a Jenkins instance with over 250 jobs installed in it. Until recently corporate rules prevented us from configuring Jenkins to send emails for build failures etc.
We have now been given permission to configure Jenkins to connect to the corporate SMTP server and I have configured one job to send emails and all is working fine. Is there an automated way to enable emails for all jobs or do I have to go into the configuration for each job and manually enable it?
If not are there any plugins or shell scripts?
Configuration Slicing plugin (https://wiki.jenkins-ci.org/display/JENKINS/Configuration+Slicing+Plugin) can help in this situation.
Install this plugin, then go to Manage Jenkins -> Configuration Slicing -> E-mail Notification
Put email into the left column, all job names to the right column, then press Save.
Please note that it will change each job configuration and add E-mail publisher to them.

Resources