Page 1 of 3

Folder Watch Wizard

Posted: Mon Feb 29, 2016 8:26 am
by Bone8Head
Hello.

I have a new problem with the "Folder Watch Wizard" of Nagios XI.
I'm trying to monitor a Folder on Server with SSH Active (Bitvise SSH, Windows Server 2008 R2), but when I finish the Wizard, no one Service appear on Nagios XI, always nothing. I don't understand why.
I even search in all Host - Service in Core Config Manager, but nothing, 0.

That's the Wizard (obviously I didn't put the xxx.):

Image

Image

Image

Re: Folder Watch Wizard

Posted: Mon Feb 29, 2016 2:37 pm
by hsmith
Can you run any other wizards with success?

Re: Folder Watch Wizard

Posted: Tue Mar 01, 2016 3:06 am
by Bone8Head
hsmith wrote:Can you run any other wizards with success?
Yes. Only this one is giving me problems.

Re: Folder Watch Wizard

Posted: Tue Mar 01, 2016 1:37 pm
by rkennedy
I tried to replicate this, and was able to when using windows paths (D:\folder\subfolder), however it did work fine using directory linux structure (/drives/d/folder/subfolder).

With that said, this wizard was originally intended for Linux. It may work for windows, I've asked the developers to look into it at this point.

Does Bitvise allow you to use linux like file structures?

Re: Folder Watch Wizard

Posted: Thu Mar 10, 2016 2:36 am
by Bone8Head
rkennedy wrote:I tried to replicate this, and was able to when using windows paths (D:\folder\subfolder), however it did work fine using directory linux structure (/drives/d/folder/subfolder).

With that said, this wizard was originally intended for Linux. It may work for windows, I've asked the developers to look into it at this point.

Does Bitvise allow you to use linux like file structures?
I resolve this problem and now I'm able to add Hosts with this Wizards.

I'm having a new problem with the Wizard - Folder Watch - SSH.
On the Service of MY Windows Server, i'm having this OUTPUT:

"UNKNOWN ERROR - execution of ssh 10.210.1.20 ls -lA Nagios -R resulted in an error 65280 -"

On the Server 10.210.1.20 I'm using Bitvise SSH Server.
I already added the Public and Private Key on the Server and on the Client (Nagios XI Server).
Is working properly, but that's the issue:

Code: Select all

[root@nagiosfe /]# ssh [email protected]
shell request failed on channel 0
I already writed on the Bitvise SSH Support, they told me that everything is okay (The passwordless Authentication etc), is like missing on the Client (Nagios XI Server) a bash shell environment (e.g. as provided by Cygwin), and configure "Shell access type" for this client to use the bash shell.

Is this really necessary to make this Plugin "Folder Watch" working? On the PDF SSH Guide on the Nagios XI Server, I didn't find anything like that.

Thank you in advance.

Re: Folder Watch Wizard

Posted: Thu Mar 10, 2016 11:50 am
by lgroschen
@Bone8Head:

Can you let us know how your resolved you original problem in detail so I can ensure to get a fix in or at least handle it with a proper error in the future?

Also, as rkennedy said I wrote this wizard specifically for Linux since the perl script that is being run is assuming a *nix directory structure. With that being said I was planning on expanding the wizard to work with windows later on so if this post helps get it there that would be great!

If you can figure out a way for the plugin (folder_watch.pl which is a lightly modified version of check_files.pl) to be able to run a command using the '-C, --cmd=STR' flag which is running the ssh call in this format:

Code: Select all

-C 'ssh <user>@<address> ls -l' -F '<file query>' -T '<files/dir>' [-r] -w <warning> -c <critical> -f
You can test this using the plugin which should be in /usr/local/nagios/libexec/folder_watch.pl. The goal of the passwordless ssh is to be able to run the command and parse the returning output.

Re: Folder Watch Wizard

Posted: Mon Mar 21, 2016 4:35 am
by Bone8Head
lgroschen wrote:@Bone8Head:

Can you let us know how your resolved you original problem in detail so I can ensure to get a fix in or at least handle it with a proper error in the future?

Also, as rkennedy said I wrote this wizard specifically for Linux since the perl script that is being run is assuming a *nix directory structure. With that being said I was planning on expanding the wizard to work with windows later on so if this post helps get it there that would be great!

If you can figure out a way for the plugin (folder_watch.pl which is a lightly modified version of check_files.pl) to be able to run a command using the '-C, --cmd=STR' flag which is running the ssh call in this format:

Code: Select all

-C 'ssh <user>@<address> ls -l' -F '<file query>' -T '<files/dir>' [-r] -w <warning> -c <critical> -f
You can test this using the plugin which should be in /usr/local/nagios/libexec/folder_watch.pl. The goal of the passwordless ssh is to be able to run the command and parse the returning output.
The resolution of the First problem was that I was typing in "Path", the Full Path of the Folder Instead of only the name of The Shared Folder (Example: instead of "Nagios" i was using "E:\Cond\Nagios").

I'm still trying to let this Plugin Work with Bitvise SSH on Windows but there is always this "requesting signature" problem on the Server.
Nagios and the Windows Server keys are okay, but I don't know why the Connection still fail.

Re: Folder Watch Wizard

Posted: Mon Mar 21, 2016 2:07 pm
by rkennedy
Is using NSClient++ an option to check this folder, rather then checking by ssh?

Can you show us the exact error relating to 'requesting signature'?

Re: Folder Watch Wizard

Posted: Wed Mar 23, 2016 3:47 am
by Bone8Head
rkennedy wrote:Is using NSClient++ an option to check this folder, rather then checking by ssh?

Can you show us the exact error relating to 'requesting signature'?
On Nagios XI:
Image

On the Server:
Image

The Bitvise SSH Support told me that I should need on the Client (Nagios XI) a bash shell environment (e.g. as provided by Cygwin), and configure "Shell access type" for this client to use the bash shell.

Re: Folder Watch Wizard

Posted: Wed Mar 23, 2016 10:51 am
by rkennedy
This sounds like a configuration issue on the Bitvise SSH side. You may need to create a shell access type for the nagios user on the Windows side.

As I asked in my previous response, Is using NSClient++ an option to check this folder, rather then checking by ssh?