General Windows system information

Hi,
I would like to check with “Icinga for Windows” which is my operating system version as I checked with wmi-service.

Is it possible?

I don’t find any Icinga-Invoke* plugin to obtain the informations as in the above screenshot
How could I solve?

Thanks a lot
Mario

icinga2 - The Icinga 2 network monitoring daemon (version: r2.13.1-1)
Icinga Web 2 Version
2.9.3
Git commit
c757a17530c326c7d6daebd6171486cb8167a8a1
PHP Version
7.2.24-0ubuntu0.18.04.10
Git commit date
2021-08-10
businessprocess 2.3.1
director 1.8.1
fileshipper 1.1.0
incubator 0.8.1
monitoring 2.9.3

1 Like

do you want a check for that (system age?), or do you want to show this information?

Only show the information.

  1. create a command in icinga director using Powershell base as import
  2. add argument -c with and value::
$$cim = (Get-CimInstance Win32_OperatingSystem); $$datediff= (((Get-Date) - ($$cim.InstallDate)).Days); Write-Output "$$($$cim.Caption) $$($$cim.Version) ($$datediff days old)" ;
  1. create a service template for the check command with “run on agent” = yes
  2. add service to host
2 Likes

Great!
It works!

But I needed to append the command that I created from Director:

object CheckCommand "General Windows Powershell Check" {
    import "plugin-check-command"
    import "PowerShell Base"

    arguments += {
        "-C" = "$$cim = (Get-CimInstance Win32_OperatingSystem); $$datediff= (((Get-Date) - ($$cim.InstallDate)).Days); Write-Output \"$$($$cim.Caption) $$($$cim.Version) ($$datediff days old)\" ;"
    }
}

into C:\Program Files\ICINGA2\share\icinga2\include\mycommand.conf
and added into C:\Program Files\ICINGA2\share\icinga2\include\plugins

include “command-plugins.conf”
include “mycommand.conf”

else I obtained “Check command ‘General Windows Powershell Check’ does not exist.”

Great, so hit the solution button