Powershell scripts for windows-hosts on a network-drive?


I use Icinga2 on a Ubuntu 20.04 system.

To monitor a windows-host, I create a host.conf in my zone.d folder.


// Endpoints & Zones
object Endpoint "icinga2_mysql.test.local" {

object Zone "icinga2_mysql.nobis.local" {
 endpoints = [ "icinga2_mysql.test.local" ]
 parent = "master"

// Host Objects
object Host "icinga2_mysql.test.local" {
check_command = "hostalive"
address = ""
vars.os = "Linux"
vars.client_endpoint = name //follows the convention that host name == endpoint name

Works all fine! Now I use some powershell scripts to monitor some windows-stuff. I use the powershell kickstarter script, to setup the clients (is that the fastest way?). Now my problem:

Do I need on every hosts my 4-5 powershell scripts that I want to use for monitoring under “C:\Program Files\ICINGA2\sbin”? Can I also use maybe a network drive to manage and sync all scripts from where to all windows-clients? :slight_smile:

Best regards,

This will not work with V2.11 since every zone and endpoint object has to be defined in zones.conf only.

Haven’t ever been trying it, however, I’d assume that’s possible (but I’d never do this e.g. checks will fail when this server is down or the network has an issue). Icinga Windows agent is running as Network Service by default, hence, you need to check if it has sufficient permissions to execute your scripts. If not you need to create a dedicated user on every Windows machine and the server with the network share with identical credentials.Sounds complicated? Yes, it is.

I’d recommend to use DevOps tools e.g. Ansible, Chef, Puppet, Saltstack or even Powershell Remoting instead.


thanks for ur fast response.

Is the V2.11 a upcoming version? Because now it work perfectly.

So, I have to copy manual the powershell scripts to each windows-machine and have also to recopy it, then I make changes, right? Might be hard work to change all powershells scripts on more than 20 Windows-Clients… but okay. :slight_smile:



Are you using the director?