Windows Agent - Implement new Check Command

Hey everyone,

i would upgrade my Windows Monitoring Infrastructur, with some special Check Commands.
For this, I created a folder in the path where /etc and /var are, where I copied all the checks.

How do you solve this in your monitoring structure? Unfortunately, the checks are not recognised. Icinga report ,Check-name not exist"

I have added the following lines to Constans.conf:

const CustomPluginDir = PluginDir //PrefixDir + “/monitoring/checks”
const PluginContribDir = PluginDir //PrefixDir + “/monitoring/checks”

Maybe you have some good advice or tips for me.

const CustomPluginDir = PluginDir //PrefixDir + “/monitoring/checks”
const PluginContribDir = PluginDir //PrefixDir + “/monitoring/checks”

Maybe you have some good advice or tips for me. :slight_smile:


just a shoot in the dark: is PrefixDir defined? As well did you tried PluginDir + "/" + PrefixDir + “/monitoring/checks”

1 Like

You need to define check commands on the icinga machine as well as every Windows machine. The simplest way to do this is to put those objects into a global group that is defined at every machine.

Hi Roland,

I have already stored this in my service templates on my master. There, the plug-in directory is specified as /monitoring/checks. I think this is an error in my logic with the agent configuration on the windows host. How did you solve this in your infrastructure or do you happen to have an idea how I can check what is missing at best :slight_smile:

unfortunately no. I’m afraid I’ve forgotten something in the agent, but unfortunately I can’t find it. Or I cannot explain why the query does not take place.

We’ve created a global zone windows-commands and placed all Windows command objects in it.

You can check if a object is existing with icinga2 object list -n <name>

Don’t forget, that it’s not a “must” to use the constant PluginDir. You can also write full path names.

We are doing this for self written scripts. Especially if the the person who responsible for the server write his own special check script. He is telling us the path and we create the check command and service check in the director. If this person is doing this, he is also responsible to backup his check. Anway - in case of powershell checks - we offer the person every time, to put these checks into our own powershell module :wink:

Hi @stevie-sy, hi @rsx ,

Here’s what I found out about the zone. The _etc folder is empty in the agent. What do I have to do now? :slight_smile:


Check if the global zone is configured at your Windows machines and then do a restart of the icinga agent. Check icinga.log at the Windows machine(s) for any errors or other hints.

Here is my zone configuration. Unfortunately I have not found any logs. I restarted the agent service, it came back without problems.

object Endpoint "TEST" {

object Endpoint "" {

object Zone "master" {
    endpoints = [ "" ];

object Zone "TEST" {
    parent = "master";
    endpoints = [ "TEST" ];

object Zone "global-templates" {
    global = true;

object Zone "windows-templates" {
    global = true;

You have no connection information in this zones.conf, hence, the agent will not initate a connection to its master. If you have your master configured not to connect to agents, than you will have no connection at all. Hence, nothing to sync.

Thanks for your tip now it works. I have done the installation as follows:

With Powershell:

Start-IcingaAgentInstallWizard `
>> -DirectorUrl '' `
>> -SelfServiceAPIKey '6c638180883357eee112871f605cc41b8481452b'`
>> -UseDirectorSelfService 1 `
>> -OverrideDirectorVars 0 `
>> -Reconfigure `
>> -RunInstaller

I thought it configures the zone automatically?