Icinga2 Automation

Hi team,

Ours windows workshop & we started infrastructure monitoring through Icinga2.

We have powershell module for automated pki generation & to install Icinga2 agent, NSclient++ as well as all the configurations. This poweshell module we have been doing through group policies.

Currently we are adding the hostfile through jenkins that we can see on icinga2 master.

We would like to find the possibility where whenver any new VM spins Hostfile creation on iciinga master & running the powershell module through group policies so that we don’t make any manual changes on icinga2 master…

Can you please advise me the best possible ways to automate everything?

Hi Team,

can someone please advise on this?



just a short thought: You can trigger the Jenkins job via Remote Access API:


Extend the Powershell script which runs when the Group Policy gets applied, to trigger the Jenkins job.

Best regards

1 Like

Thanks for your response Michael… https://wiki.jenkins.io/display/JENKINS/Remote+access+API i have read this documentation & unfortunately this is for linux systems… We have trying to do the same this through powershell & following these tutorials https://octopus.com/blog/jenkins-rest-api & https://www.smartfile.com/blog/trigger-jenkins-builds-using-powershell/ still its not working… Can you advise & provide an example to do with powershell

Unfortunately I can’t provide a working example. I don’t have a Jenkins instance at hand.

But you can share the error, maybe we can work it out together.

Kind regards

1 Like


take a look at https://github.com/Icinga/icingaweb2-module-vspheredb if you are using VMWare. We are using this module to autoimport new VMs with the Directormodule.

1 Like