I remember as if it was yesterday. I participated at the OSMC 2014 and watched Bernd’s talk “Current state of Icinga”. In the live demo Bernd has showed some of the new things we’ve built. One of them he introduced somewhat hesitantly IMHO:
Now there is… not only this world. But there’s also another one… and I’m gonna show you it as well. There’s Windows. Stay in the room.* And for that [Icinga] is available as well. It looks like this: there’s an agent. I’ll just go through it. And what is an installation on Windows like? One simply clicks accept, sign, order, I want that as well. Runs.
*) Some of the audience laughed. But primarily as an indication that they exactly know what Bernd meant, not because Bernd made a mistake. E.g. some monitoring plugins didn’t even compile on Windows before we sent patches. No wonder, at least in our circles. Windows workstation users are still a minority in the IT departments of our (monitoring) companies (NETWAYS and Icinga). This website tells you via its response headers that it’s served by the Apache HTTPd. I.e. Linux. Just like 4 of 5 of the top websites. Of course. Why to pay for a slower OS you can’t fix if anything nor even verify how it works internally?
But things have changed. Windows 10 was free for Windows 7 users and nowadays I can (hypothetically speaking) install Windows 10 without even a product key not to mention activation. And we changed as well. Since Icinga 2.2 we ship the first generation of Windows-native monitoring plugins for the basic system functions, written in C++ like Icinga itself. But C++ is neither easy by itself, nor the first choice for doing something on Windows due to .NET lack. Luckily the Windows power users under us mentioned above are just a minority and not completely absent…
The #1 Windows power user of us is clearly Christian who wrote Icinga for Windows in 2020. A framework for and with Icinga plugins written in PowerShell, an easy script language (good for external contributors) with .NET with which you can basically do all the Windows things. Unfortunately a disadvantage of script languages is that the interpreter has to “compile” everything on every call. And the more plugins, the more to “compile” on every plugin invocation. But this problem has been solved with IfW 1.6 via a server which loads everything once and executes plugins on API requests.
Now in an ideal setup we had, hypothetically speaking, a Linux server with an Icinga master and a Windows box with an Icinga agent which executes PowerShell plugins. These actually made an API call to the IfW daemon on localhost which actually runs the checks. Now admins had to take care of two daemons per Windows machine. But Markus solved this “problem” as well with check_by_powershell which enabled monitoring Windows hosts without any agent. The Icinga master executes check_by_powershell, that connects to Windows, basically like check_by_ssh for Linux, and executes the plugin which speaks with the local PowerShell daemon.
Still quite a few steps/layers from the Icinga master to the actual check being run. Which leads us to the latest progress in our little Icinga and Windows evolution. A generic check command targeting a remote PowerShell daemon compiled into Icinga. This means the following. Icinga 2.14 will be able to directly speak to the PowerShell daemon REST API without even fork(2) or exec(3) for a subprocess “bypassing” the Windows login and execution of the small PS script. In fact this could make the IfW daemon the new “Icinga agent” for Windows. An Icinga agent without an Icinga agent, so to say. Schrödinger’s agent. We will see…
Anyway. Whether you prefer the “good” old C++ plugins or the shiny new PowerShell ones, whether your employer wants an Icinga 2 agent on the Windows machines or not and whether your company is in Europe or the USA – we and our partners can help you to setup your Windows monitoring as you wish. Don’t hesitate to ask!