Monitor Raid on Windows using check_lsi_raid

Hi,
sorry if this is dumb but i am new to Icinga for Windows.
I installed “Icinga for Windows” as described in the docs. It works as expected; i can use the “built-in” plugins like i.e. Invoke-IcingaCheckCPU. Just fine.
But now I want to check the raid controller (LSI), on Linux we use check_lsi_raid for that purpose. It is a perl script, so i thougt it should run under windows as well. Found out there is no perl in windows out of the box, so installed Strawberry Perl. Great, now i can run the check in a cmd windows.

But how do I integrate this in Icinga on the windows box? Absolutely clueless…Guess I read the wrong docs.

Any hint appreciated, and again, sorry if this is a dumb question…
Christian

do you use icinga director?

No. Just “plain” Icinga.

I now simply added a new CheckCommand which executes the check_lsi_raid.pl (without powershell executed in any way).

This indeed seems to work, but it calls the perl script as a binary (at least I think so):

Command “C:\Program Files\ICINGA2\sbin\check_lsi_raid.pl” failed to execute: 193, “%1 is not a valid Win32 application.”

So maybe using a simple CheckCommand is the way to go?

Thanks
Christian

object CheckCommand “lsi-raid-windows” {
import “plugin-check-command”
command = [
“C:\Program Files\ICINGA2\sbin\check_lsi_raid.pl”
]

arguments = {......}

}

what’s the location of your perl interpreter?

because your command should look like this:

That was it.
Adjusted the CommandCheck and now it works. See below.
The confusion started (at my point) with the understanding of Icinga for Windows as an Agent.
The (as now) working check:
object CheckCommand “lsi-raid-windows” {
import “plugin-check-command”
command = [
“C:\Strawberry\perl\bin\perl.exe”
]

arguments = {
            "C:\\Program Files\\ICINGA2\\sbin\\check_lsi_raid.pl" = ""
            "-C" = {
                    value = "$lsi_controller_number$"
                    description = "Insert the controller number to be checked."
            }


}

1 Like