check_winfile "FILE UNKNOWN - Target does not exist" problem through WinRPE

5 posts / 0 new
Last post
Harm
Offline
Last seen: 7 years 6 months ago
Joined: 12.02.2013 - 14:35
check_winfile "FILE UNKNOWN - Target does not exist" problem through WinRPE

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.

itefix
Offline
Last seen: 2 hours 11 min ago
Joined: 01.05.2008 - 21:33
It seems that the service

It seems that the service account SvcXinet has no permissions on directory B:\WindowsImageBackup\NagiosBackup...

Harm
Offline
Last seen: 7 years 6 months ago
Joined: 12.02.2013 - 14:35
Great idea! I checked and

Great idea! I checked and added SvcXinet immediatly to the folder (and subfolder) permissions, but nothing changed though.

itefix
Offline
Last seen: 2 hours 11 min ago
Joined: 01.05.2008 - 21:33
Ah, the problem can then be

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:/....

Harm
Offline
Last seen: 7 years 6 months ago
Joined: 12.02.2013 - 14:35
Spot on, tk, spot on! I used

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!