Folder Watch Wizard

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Bone8Head
Posts: 106
Joined: Tue Nov 10, 2015 2:39 am

Folder Watch Wizard

Post 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
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Folder Watch Wizard

Post by hsmith »

Can you run any other wizards with success?
Former Nagios Employee.
me.
Bone8Head
Posts: 106
Joined: Tue Nov 10, 2015 2:39 am

Re: Folder Watch Wizard

Post by Bone8Head »

hsmith wrote:Can you run any other wizards with success?
Yes. Only this one is giving me problems.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Folder Watch Wizard

Post 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?
Former Nagios Employee
Bone8Head
Posts: 106
Joined: Tue Nov 10, 2015 2:39 am

Re: Folder Watch Wizard

Post 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.
User avatar
lgroschen
Posts: 384
Joined: Wed Nov 27, 2013 1:17 pm

Re: Folder Watch Wizard

Post 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.
/Luke
Bone8Head
Posts: 106
Joined: Tue Nov 10, 2015 2:39 am

Re: Folder Watch Wizard

Post 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.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Folder Watch Wizard

Post 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'?
Former Nagios Employee
Bone8Head
Posts: 106
Joined: Tue Nov 10, 2015 2:39 am

Re: Folder Watch Wizard

Post 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.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Folder Watch Wizard

Post 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?
Former Nagios Employee
Locked