Using Connection Manager to run a remote script?
Using Connection Manager to run a remote script?
Hi,
I´d like to have Hostmon to run a Script test on a remote server, but I need to use different credentials for it to work.
But when I set up a new connection I don´t have the option to use it for scripts. The same connection works for CPU Usage, but not for my scripts.
Is this a bug or due to some other limitation? Or am I just doing it wrong?
//Andreas..
I´d like to have Hostmon to run a Script test on a remote server, but I need to use different credentials for it to work.
But when I set up a new connection I don´t have the option to use it for scripts. The same connection works for CPU Usage, but not for my scripts.
Is this a bug or due to some other limitation? Or am I just doing it wrong?
//Andreas..
Well, I don't know host HostMonitor can run script on remote server (unless you are using RMA installed on remote server).
HostMonitor starts scripts on local system only.
If your script using some code to establish connection with remote system, that does not have anything to do with Connection Manager.
Regards
Alex
HostMonitor starts scripts on local system only.
If your script using some code to establish connection with remote system, that does not have anything to do with Connection Manager.
Regards
Alex
Not sure I understand what you mean..
This script is a vbscript that uses some WMI. The script itself connects to the server with a supplied ipaddress as a parameter.
I´m using this script on lots of servers, some are using RMA and some are using the Hostmon server directly.
The difference with this server is that it´s not using the same account as the local administrator on the Hostmon server, or the account used by a RMA.
So I need to setup an account for this test somehow. A "Connect As" feature would have been nice when using a script test or some way to specify that this test is using this Connection account..
Is there a way that this can be accomplished?
//Andreas..
This script is a vbscript that uses some WMI. The script itself connects to the server with a supplied ipaddress as a parameter.
I´m using this script on lots of servers, some are using RMA and some are using the Hostmon server directly.
The difference with this server is that it´s not using the same account as the local administrator on the Hostmon server, or the account used by a RMA.
So I need to setup an account for this test somehow. A "Connect As" feature would have been nice when using a script test or some way to specify that this test is using this Connection account..
Is there a way that this can be accomplished?
//Andreas..
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Remote connection credentials should be specified in the script.
I assume you are using moniker string to establish WMI connection with remote system using current user account credentials, like the following:
However, if you need to specify different user account credentials, your script should use WbemScripting.SWbemLocator object.
Remote WMI connection should look like the following:
where strComputer, strUser and strPsw are variables that represent host, username and password for remote connection.
Please check the following MSDN article:
http://msdn.microsoft.com/en-us/library ... p/aa389290
I assume you are using moniker string to establish WMI connection with remote system using current user account credentials, like the following:
Code: Select all
Set objWMIService = GetObject("winmgmts:" & _
"{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Remote WMI connection should look like the following:
Code: Select all
Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objWMIService = objSWbemLocator.ConnectServer _
(strComputer, "root\cimv2", strUser, strPsw)
Please check the following MSDN article:
http://msdn.microsoft.com/en-us/library ... p/aa389290
Ok I will try that to see if it´s doable.
Although I would prefer to just tell Hostmon to run this script as a specified user. Like a RunAs cscript shell or similar.
Since I use the same script on lots of other servers I don´t want to modify it if I really don´t have to.
Better yet would ofcourse be so I don´t need the script at all. The script gets disk/memory usage in %. If Hostmon had a simpler builtin test for this using snmp I´d be very happy and I wouldn´t need this script at all.
//Andreas..
Although I would prefer to just tell Hostmon to run this script as a specified user. Like a RunAs cscript shell or similar.
Since I use the same script on lots of other servers I don´t want to modify it if I really don´t have to.
Better yet would ofcourse be so I don´t need the script at all. The script gets disk/memory usage in %. If Hostmon had a simpler builtin test for this using snmp I´d be very happy and I wouldn´t need this script at all.
//Andreas..
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Starting from HostMonitor 9.22, you may use Drive Free Space test to perform remote check for disk usage:
http://www.ks-soft.net/hostmon.eng/news.htm#v922
http://www.ks-soft.net/hostmon.eng/mfra ... #diskspace
Also, next release will include new Memory test that can use WMI or SNMP to check memory usage on Windows and Unix systems.
http://www.ks-soft.net/hostmon.eng/news.htm#v922
http://www.ks-soft.net/hostmon.eng/mfra ... #diskspace
Also, next release will include new Memory test that can use WMI or SNMP to check memory usage on Windows and Unix systems.
I can´t use the Drive Free Space test since I need to have the result in %.
I also want the result to be Used Space, not Free. I could probably convert that somehow if I atleast got the result in %.
Sounds great with the new memory test using snmp on Windows!!
Would this test be able to check drive partitions? And will we get the result in %?
//Andreas..
I also want the result to be Used Space, not Free. I could probably convert that somehow if I atleast got the result in %.
Sounds great with the new memory test using snmp on Windows!!
Would this test be able to check drive partitions? And will we get the result in %?
//Andreas..
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Just select threshold unit "%" (there are 5 possible threshold units: KB, MB, GB, TB, %)I can´t use the Drive Free Space test since I need to have the result in %.
I also want the result to be Used Space, not Free. I could probably convert that somehow if I atleast got the result in %
I don't think we will include drive partitions check in this test.Would this test be able to check drive partitions? And will we get the result in %?
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact: