File/Folder Availability test - Question

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
sadek76
Posts: 71
Joined: Tue Apr 27, 2004 3:28 pm
Location: New Jersey

File/Folder Availability test - Question

Post by sadek76 »

Is there anyway to have this test check remote servers or mapped drives on the local system without writing a script? This is a easy process with the Process and Service test.

I'm trying to work with Connection Manager, but still don't see the drive appear in the drop down list.
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

You don't need any script. There are 2 options:
- type UNC path to the file (e.g. \\server\resource\filename)
- if you have mapped that resource to local drive, you may select file using file selection dialog
If you have mapped drive but dialog does not allow you to select that drive, probably you have started HostMonitor as service using account that does not have permissions to access remote system

Also you may use agent to monitor files on remote system.

Regards
Alex
sadek76
Posts: 71
Joined: Tue Apr 27, 2004 3:28 pm
Location: New Jersey

Post by sadek76 »

- type UNC path to the file (e.g. \\server\resource\filename)
Fails test - Returns Reply "The directory name is invalid".
Turns out there are two files that I have to check for by filename. Unfortunately the date and time are built into the filename. One changes hourly and the other daily.
- if you have mapped that resource to local drive, you may select file using file selection dialog
Tried this as well. Created a link on my C:\ drive to a file on the remote drive. When I try to have HM access it, receive info window: "The drive or network connection that the shortcut 'adp.2004.0629.txt.lnk' refers to is unavailable. Make sure that the disk is properly inserted or the network resource is available, and then try again" If I create a link to the drive and try it. The drive shows up with a Red question mark under it in the drive select dialog window.

The HM app. was started as a service, with "Log on as" set to Local system account. I don't have admin access to install anything on the server that the files reside on.

Looks like I will have to write a script. Also looks like HM doesn't know how to run a Perl script, only VBScript and JScript's correct?
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

The HM app. was started as a service, with "Log on as" set to Local system account.
Local system account does not have right to access network. That's why HostMonitor cannot check remote files.
Looks like I will have to write a script.
Script? And how script can help you if you (HostMonitor) are using account that does not have necessary rights?

Regards
Alex
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Also looks like HM doesn't know how to run a Perl script, only VBScript and JScript's correct?
HostMonitor does not execute scripts by itself. It uses scripting host that calls scripting engine... I means if you have installed Perl, you may call perl scripts from HostMonitor.
Please note: there are 2 different test methods that use scripts:
Active Script: http://www.ks-soft.net/hostmon.eng/mfra ... htm#script
Shell Script: http://www.ks-soft.net/hostmon.eng/mfra ... m#chkShell

However you don't need any script. You need to specify account that has rights to access remote resources.

Regards
Alex
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

PS: If you cannot use admin's account to start HostMonitor, you should install RMA on remote system.
http://www.ks-soft.net/hostmon.eng/rma-win/index.htm

Regards
Alex
sadek76
Posts: 71
Joined: Tue Apr 27, 2004 3:28 pm
Location: New Jersey

Post by sadek76 »

You were correct, I did not have to create a script. I used the Connection Manager tool and set up the login credentials. This way I didn't have to map a drive either. I also used the "Translate Macros" option to build a filename by using the current date minus one day. I also used the scheduler with different time intervals and created a user defined variable, which I had to use to send the same filename in my snmp trap that was translated using the translate macro option.

Building this test has really been a learning experience with your application, and I still say that this is an excellent application.

It would be nice if you added the "Connect as" features like you have in the UNC test, to the File/Availability test. I guess that should be posted on the wish list.

Thanks Again!
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

uilding this test has really been a learning experience with your application, and I still say that this is an excellent application.
Thank you
It would be nice if you added the "Connect as" features like you have in the UNC test, to the File/Availability test. I guess that should be posted on the wish list.
Actually we kept "Connect as" option for compatibility with older versions. I think "Connection Manager" is more convenient. Am I wrong?

Regards
Alex
sadek76
Posts: 71
Joined: Tue Apr 27, 2004 3:28 pm
Location: New Jersey

Post by sadek76 »

Connection manager is pretty nice. I'll have to play with it a little more to get used to it and really see it's benefits.
sadek76
Posts: 71
Joined: Tue Apr 27, 2004 3:28 pm
Location: New Jersey

Post by sadek76 »

Sorry for being a pain in the neck, but

On server 2000 when I specify a wild character '*' in the "File or Folder Name" field it works fine. On 2003 it doesn't. I don't get an error message or anything, just a "Bad" reply.

Here's the string that I'm using:
\\bsfiletr2\xferusers\ecomm\wsod.%yyyymmdd[-1d]%073*.txt
Actual filename: "wsod.20050413073056.txt"

Why they included the seconds in the filename is beyond me.
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Probably there are more than one file that fit "wsod.%yyyymmdd[-1d]%073*.txt" mask and you are checking age of the file?

When you are using wild character, HostMonitor checks 1st file that fits the mask. Which file is 1st, depends on location of the record in file system directory. So, if you have several files, you cannot predict which file will be checked...

Regards
Alex
Post Reply