Hello,
my Icinga environment works very well and I am also very happy with it.
I would like to do an additional check for one of our license servers for the licenses that run under the lmstat daemon.
According to the documentation there is a prefabricated Icinga Template Library - Icinga 2 teamplate.
I have integrated the check as follows:
Unfortunately, the check does not work like this and I get the error message Command "C:\Program Files\ICINGA2\/sbin/check_flexlm" -F C:/tmp/test.lic failed to execute: 2, "The system cannot find the file specified."
Unfortunately, there is no check_flexlm.exe under the Windows agent in the path C:\Program Files\ICINGA2/sbin/
I am sure that the error message does not mean that it cannot find the .lic file, because it is certainly under C:\tmp I think it cannot find the check_flexlm file.
It is not a problem even if it is a .pl file and not an exe?
I will try to copy the file into the folder. I have just seen that the .pl file has to be adapted a bit because certain variables have to be set.
I’ll get back to you when I’ve tested it. Thanks
I struggled a bit but finally found a good solution that works in my environment.
I had problems converting the perl file to an exe, so I modified the C:\Program Files\ICINGA2\share\icinga2\include\command-plugins.conf file to run a perl instead of an exe.
The finished and customised command looked like this:
Perl is opened and the check_flexlm Perl script + licence path are specified using the arguments.
object CheckCommand "flexlm" {
command = [ "C:/Strawberry/perl/bin/perl.exe" ]
arguments = {
"C:/Program Files/ICINGA2/sbin/check_flexlm.pl" = ""
"-F" = {
value = "$flexlm_licensefile$"
description = "Name of license file (usually license.dat)"
required = true
}
"-t" = {
value = "$flexlm_timeout$"
description = "Plugin time out in seconds (default = 15)"
}
}
}
I hope I can help all those who are facing the same challenge.