0

I'd like to add a check_logfiles command on a windows machine. Do I have to use the NSClient++ or is it possible to do this with the Icinga 2 Client wich is already installed? I configured the Service and the check_command on my satellite. But I get this error message:

Command D:\icinga2\/sbin/check_logfiles-3.9/plugin-scripts/check_logfiles --criticalpattern ERROR --logfile D:\logdirectory\error.log --tag aplication-Log failed to execute: 2, "The system cannot find the file specified."

I tried to change the path with correct windows path with "\" instead of "/", but got the same error message.

Any ideas? Thanks in advance!

flck
  • 1
  • 2
  • The check_logfiles shell script in windows wont work. Try creating an exe as described here and see: https://labs.consol.de/de/nagios/check_logfiles/check_logfiles-windows-exe/ – Diamond Jul 24 '18 at 14:38
  • I am using the perl script, not the shell Script. – flck Jul 24 '18 at 14:55
  • Ok, but perl scripts are not by default executable in windows. You will need to compile and install perl before. May be a better option for you is to use NSClient++ instead. – Diamond Jul 25 '18 at 07:46

1 Answers1

0

hello i could solve my problem. In the check command you need so seperate perl from the command like this:

check_command = "perl", "D:\icinga2\sbin\check_logfiles-3.9\plugin-scripts\check_logfiles" 

Didnt knew that. Now it is working fine. Thanks for the help @Diamant

flck
  • 1
  • 2