Hello,
I have been trying to monitor a simple backup job on a testserver via WinRPE.
I try to monitor if the file B:\WindowsImageBackup\NagiosBackup\Catalog\GlobalCatalog is older then 1 hour, with this command:
check_winfile --target B:\WindowsImageBackup\NagiosBackup\Catalog\GlobalCatalog --filter "age le -1 hours" --critical 0
It works perfectly when I do that local, on the Backup Server,
however when copy-paste that command in nrpe.cfg and try to monitor via NRPE,
the Nagios Server says: FILE UNKNOWN - Target does not exist.
Strange.
Even stranger: when I reduce the command in nrpe.cfg to
check_winfile --target B:\WindowsImageBackup --filter "age le -1 hours" --critical 0
it works, when I add the next folder to that path, it doesn't anymore.
I must be doing something wrong.
It seems that the service account SvcXinet has no permissions on directory B:\WindowsImageBackup\NagiosBackup...
Great idea! I checked and added SvcXinet immediatly to the folder (and subfolder) permissions, but nothing changed though.
Ah, the problem can then be related to backslashes. Plugins are run via a Cygwin layer. Try to escape them like
b:\\..... . You can also check if forward slash will work for you: b:/....
Spot on, tk, spot on!
I used double backslashes, added the next directory in the path, and it worked!
So I added the rest of the path, but I needed to re-apply the permissions like
you suggested in your previous reply.
So both of your answers solved my problem!
Thank you for your great Nagwin, and your great help!