KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

RMA and external applications

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
dmgaddy



Joined: 25 Jun 2004
Posts: 1
Location: Asheville, NC

PostPosted: Fri Jun 25, 2004 9:26 am    Post subject: RMA and external applications Reply with quote

Have installed HM on my application server and want to monitor and restart a program on another server.

DETAILS: Svr1: HM Svr2: RMA
Test Name: Outlook on Svr2
Test By: Agent:Svr2
Test Method Check Process: OUTLOOK
Alert Profile: Restart Outlook
Action Properties: Execute External Program
Command Line: outlook.exe

Syslog.htm
Error: cannot execute command "outlook.exe". The system cannot find the file specified.

Why will this not work? Is HM trying to run outlook.exe from Svr1 or Svr2? I have tried a simple batch file (NSOutlook.bat) but get the same error. Help?
Back to top
View user's profile Send private message Visit poster's website
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Fri Jun 25, 2004 10:19 am    Post subject: Reply with quote

Agent performs the tests but it cannot execute actions. This option will be implemented in future.

Workaround - use additional "External" test that will be executed by RMA and restart program
E.g.
- if you have TestA that checks process on remote system, create another "External" test (TestB) for the same RMA. TestB will start your BAT file;
- by default TestB should be disabled!
- test interval for TestB should be longer than test interval for TestA.
- now you just need to add 2 actions (1 "bad" action, and 1 "good" action) into action profile that is assigned to TestA
1st "bad" action should execute HMScript with single command "EnableTest TestB"
2nd "good" action should execute HMScript with single command "DisableTest TestB"
That's it.
Now if TestA fails, it will enable TestB that in turn will execute BAT file on the remote system. When TestA detects that process is working, it will disable TestB (to avoid unnecessary restart).

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
mattb



Joined: 28 May 2004
Posts: 8

PostPosted: Fri Sep 24, 2004 1:12 pm    Post subject: Reply with quote

Was running a program on a remote server ever implimented?

If there is a test that is running through the RMA client and the test returns "Bad" then can you have Host Monitor "command" the remote server to run a program locally?

Thanks
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Fri Sep 24, 2004 1:18 pm    Post subject: Reply with quote

Quote:
Was running a program on a remote server ever implimented?


Yes, this option implemented...
http://www.ks-soft.net/hostmon.eng/news.htm#v470

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
mpriess



Joined: 02 Jul 2002
Posts: 112
Location: Arizona, USA

PostPosted: Mon Oct 25, 2004 1:14 pm    Post subject: " " getting put around put around external command Reply with quote

I'm testing the execute external program from RMA using the following command line script:

xcopy "c:\Program Files\CA\eTrust Intrusion Detection\Engine\%CommentLine1%\*.*" \\dacsnap01\LAN\Logs\idslogs\DAC-IDS\%CommentLine1% /E /F /R

The script above works fine when run manually on the server where RMA is installed.

However, according to the hostmonitor logs the script being generated \executed within Hostmonitor has quotes ("s)around it. Here is the external command as posted in the system log:

[10/25/2004 11:39:50 AM] Sys Command "xcopy c:\Program Files\CA\eTrust Intrusion Detection\Engine\Day19 \\dacsnap01\LAN\Logs\idslogs\DAC-IDS\Day19 /E /F /R" executed

The quotes generate a parse error. Are the quotes I have placed in the script getting it confused?
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Mon Oct 25, 2004 2:48 pm    Post subject: Reply with quote

I assume you are using "Execute external program" action?

Quote:
However, according to the hostmonitor logs the script being generated \executed within Hostmonitor has quotes ("s)around it. Here is the external command as posted in the system log:
[10/25/2004 11:39:50 AM] Sys Command "xcopy c:\Program Files\CA\eTrust Intrusion Detection\Engine\Day19 \\dacsnap01\LAN\Logs\idslogs\DAC-IDS\Day19 /E /F /R" executed


No, script does not have quotes (I mean HostMonitor does not add quotes to the command line). HostMonitor uses quotes for the log only, this way you can see what is the command and what is HostMonitor's comment.

Script doesn't work correctly when it started by RMA? Probably RMA uses account that does not have enough permissions?

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
mpriess



Joined: 02 Jul 2002
Posts: 112
Location: Arizona, USA

PostPosted: Mon Oct 25, 2004 3:48 pm    Post subject: Created share so I could remove quotes around path - works Reply with quote

I created a share so the script would not need quotes around the source path and now the execute external program action works correctly for the xcopy command.

I can use this workaround but would prefer not to have to create a share if a foldername contains spaces.

Can you duplicate this issue?

Thx,
Mark
Back to top
View user's profile Send private message
Marcus



Joined: 18 Nov 2002
Posts: 367

PostPosted: Tue Oct 26, 2004 1:38 am    Post subject: Reply with quote

What xcopy is trying to do is the following:

xcopy c:\Program

with: Files\CA\eTrust Intrusion Detection\Engine\Day19 \\dacsnap01
as parameters (3 in this case).

That's the reason why you have to use quotes. A space is seen as a delimiter on the command line.
Back to top
View user's profile Send private message
mpriess



Joined: 02 Jul 2002
Posts: 112
Location: Arizona, USA

PostPosted: Tue Oct 26, 2004 9:43 am    Post subject: Works with quotes outside of hostmonitor... Reply with quote

Correct Marcus. The script works with quotes when I run it outside of hostmonitor...from the command line on the server. But, when it is triggered via the external program execution within hostmonitor it does not work.

So, to get around having to use quotes I just created a share (without spaces in the name) so I wouldn't have to use quotes.
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Tue Oct 26, 2004 1:35 pm    Post subject: Reply with quote

mpriess,

What exactly I should use? I just tested HostMonitor 4.74 & RMA 2.0 on Windows 2000 SP4. Everything works fine (I used directory with spaces, used quotation marks...

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index