Windows plugins not working anymore?

Hi Together,

i have the problem, that i cant use the windows plugins like ‘disk-windows’, ‘load-windows’ etc. It seems they are not included in the directory /lib/nagios/plugins, i tought so, because there are no files with those names.

First i got the error message on the Webinterface, that the directory /lib/nagios/plugins cant be found.
Now, after i changed all hostnames or host entrys to lower letters, i get the message:
Remote Icinga instance ‘server.domain.intern’ is not connected to ‘srvkmkmon’

serverhost.conf in /etc/icinga2/zones.d/
object Host “srvkmkmon” {
import “generic-host”
address = “127.0.0.1”
vars.os = “Linux”
vars.special_type = “monitorhost”

vars.notification["mail"] = {  
users = [ "icingaadmin" ]

}
}

object Host “server.domain.intern” {
import “generic-host”
address = “server.domain.intern”
vars.client_endpoint = name
vars.os = “Windows”
vars.client_type = “serverhost”

vars.notification["mail"] = {
	//groups = [ "icingaadmins" ]
	users = [ "icingaadmin" ]
}

}

services.conf in /etc/icinga2/zones.d/
apply Service “disk” {
import “generic-service”
check_command = “disk-windows”
vars.disk_wfree = “5%”
vars.disk_cfree = “1%”
command_endpoint = host.vars.client_endpoint
assign where host.vars.client_type == “serverhost” && host.vars.os == “Windows”
}

zones.conf in /etc/icinga2/

object Endpoint “srvkmkmon” {
}

object Zone “master” {
endpoints = [ “srvkmkmon” ]
}

object Zone “global-templates” {
global = true
}

object Zone “director-global” {
global = true
}

object Endpoint “server.domain.intern” {
host = “server.domain.intern”
}
object Zone “server.domain.intern” {
endpoints = [ “server.domain.intern” ]
parent = “master”
}

  • Version used
    icinga2 - The Icinga 2 network monitoring daemon (version: r2.12.3-1)

Copyright © 2012-2021 Icinga GmbH (https://icinga.com/)
License GPLv2+: GNU GPL version 2 or later http://gnu.org/licenses/gpl2.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

System information:
Platform: Ubuntu
Platform version: 20.10 (Groovy Gorilla)
Kernel: Linux
Kernel version: 5.8.0-44-generic
Architecture: x86_64

Build information:
Compiler: GNU 10.2.0
Build host: runner-hh8q3bz2-project-298-concurrent-0
OpenSSL version: OpenSSL 1.1.1j 16 Feb 2021

Application information:

General paths:
Config directory: /etc/icinga2
Data directory: /var/lib/icinga2
Log directory: /var/log/icinga2
Cache directory: /var/cache/icinga2
Spool directory: /var/spool/icinga2
Run directory: /run/icinga2

Old paths (deprecated):
Installation root: /usr
Sysconf directory: /etc
Run directory (base): /run
Local state directory: /var

Internal paths:
Package data directory: /usr/share/icinga2
State path: /var/lib/icinga2/icinga2.state
Modified attributes path: /var/lib/icinga2/modified-attributes.conf
Objects path: /var/cache/icinga2/icinga2.debug
Vars path: /var/cache/icinga2/icinga2.vars
PID path: /run/icinga2/icinga2.pid

  • Enabled features
    Disabled features: compatlog debuglog elasticsearch gelf graphite icingadb influxdb livestatus opentsdb perfdata statusdata syslog
    Enabled features: api checker command ido-mysql mainlog notification

  • Icinga Web 2 version and modules
    Icinga Web 2 Version
    2.8.2
    Git Commit
    8a89839af94a247ee2149b2336c73b8251b477c0
    PHP Version
    7.3.27-9+ubuntu20.10.1+deb.sury.org+1
    Git Commit Datum
    2020-08-17

  • Config validation
    [2021-02-26 13:51:15 +0000] information/cli: Icinga application loader (version: r2.12.3-1)
    [2021-02-26 13:51:15 +0000] information/cli: Loading configuration file(s).
    [2021-02-26 13:51:15 +0000] information/ConfigItem: Committing config item(s).
    [2021-02-26 13:51:15 +0000] information/ApiListener: My API identity: srvkmkmon
    [2021-02-26 13:51:15 +0000] information/ConfigItem: Instantiated 1 NotificationComponent.
    [2021-02-26 13:51:15 +0000] information/ConfigItem: Instantiated 2 Hosts.
    [2021-02-26 13:51:15 +0000] information/ConfigItem: Instantiated 2 NotificationCommands.
    [2021-02-26 13:51:15 +0000] information/ConfigItem: Instantiated 1 FileLogger.
    [2021-02-26 13:51:15 +0000] information/ConfigItem: Instantiated 17 Notifications.
    [2021-02-26 13:51:15 +0000] information/ConfigItem: Instantiated 1 IcingaApplication.
    [2021-02-26 13:51:15 +0000] information/ConfigItem: Instantiated 6 HostGroups.
    [2021-02-26 13:51:15 +0000] information/ConfigItem: Instantiated 1 CheckerComponent.
    [2021-02-26 13:51:15 +0000] information/ConfigItem: Instantiated 4 Zones.
    [2021-02-26 13:51:15 +0000] information/ConfigItem: Instantiated 2 Endpoints.
    [2021-02-26 13:51:15 +0000] information/ConfigItem: Instantiated 1 ExternalCommandListener.
    [2021-02-26 13:51:15 +0000] information/ConfigItem: Instantiated 1 IdoMysqlConnection.
    [2021-02-26 13:51:15 +0000] information/ConfigItem: Instantiated 1 ApiUser.
    [2021-02-26 13:51:15 +0000] information/ConfigItem: Instantiated 1 ApiListener.
    [2021-02-26 13:51:15 +0000] information/ConfigItem: Instantiated 235 CheckCommands.
    [2021-02-26 13:51:15 +0000] information/ConfigItem: Instantiated 1 User.
    [2021-02-26 13:51:15 +0000] information/ConfigItem: Instantiated 15 Services.
    [2021-02-26 13:51:15 +0000] information/ScriptGlobal: Dumping variables to file ‘/var/cache/icinga2/icinga2.vars’
    [2021-02-26 13:51:15 +0000] information/cli: Finished validating the configuration file(s).

  • If you run multiple Icinga 2 instances, the zones.conf file (or icinga2 object list --type Endpoint and icinga2 object list --type Zone) from all affected nodes

only one master with endpoints

Hi @sekoh

Could you please use code blocks to format your snippets.

That’s right because those are just the names of the command objects. The configuration of the check command can be found in /usr/share/icinga2/include/command-plugins-windows.conf, i. e.

object CheckCommand "disk-windows" {
  command = [ PluginDir + "/check_disk.exe" ]
  // ...

The actual plugins can be found on the windows host in c:\Program Files\ICINGA2\sbin.