Active Script authentication problem

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
argis
Posts: 31
Joined: Mon May 06, 2019 8:30 pm

Active Script authentication problem

Post by argis »

I'm having problems running a VBscript ActiveScript on a 2019 server on our domain. The script runs fine on all of our other 38 servers, including some other 2019 ones.
All other standard tests on this server, such as disk space, CPU, top process, free memory etc all run fine. The AHM server user is a domain admin.
I checked the Security event logs on the problem server, and whenever I run this test there is an audit failure "An account failed to log on". In the details it shows the failed user as local to the AHM server, not the domain (this is the "TargetDomainName" attribute in XML view).
I added an entry in Connection Manager for the problem server, and tried some different domain admin users, and I get the same result, an audit failure shows the user as a local user on the AHM server, not the domain.
I checked this on other servers and when I run the same test it succeeds and the event logs shows the user as a domain user, as it should.
I deleted the problem servers folder from AHM and re-created it, but it gave the same result.
Since all our other servers are fine, I'm guessing there is a problem on this particular server rather at the AHM end, but I don't know what would cause a credential to lose its domain and revert to the AHM server name.
Any ideas?
KS-Soft
Posts: 12887
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

1) HostMonitor version?

2) We recommend to use Shell Script method instead of Active Script. Active Script does not work in x64 mode (e.g. when test performed by 64bit version of RMA agent)

3) HostMonitor impersonates user account for Active Script tests but everything else depends on Windows COM object and script code.
What exactly commands, objects do you use in the script?
Do you use GetObject("winmgmts:{impersonationLevel=impersonate}..) or GetObject("winmgmts:{impersonationLevel=impersonate," & "authenticationLevel=pktPrivacy}..) commands?

Regards
Alex
argis
Posts: 31
Joined: Mon May 06, 2019 8:30 pm

Post by argis »

HostMonitor version 1s 11.98.

In this instance the test is running directly from AHM, but we also run it on other sites with an RMA, and it works OK there.

I wasn't aware of the difference between Active Script and Shell Script, but I'd like to move all the VBScript to PowerShell for future compatibility.
The script uses Wscript.Shell and scripting.filesystemobject, and calls WMIC.exe to get disk, RAM & CPU information. It doesn't use winmgmts.
I've made a PowerShell Active Script to return the same info using inbuilt PS functions and tested it, and I get the same result on this server, it fails with the same auth error in the event log. It works OK on other servers though.
KS-Soft
Posts: 12887
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Pretty old version. As I see you ordered update and may upgrade to latest version, right?

However 11.98 should work properly as well. We checked old code, it impersonates user account for Active Script tests.
That's very strange - correct authentication on other servers, wrong authentication on one server. Sorry, we cannot explain this.
I would seggest to try Shell Script test, you need to change script output - it should write result like scriptres:Bad:90 %
https://www.ks-soft.net/hostmon.eng/mfr ... m#shellres
There are Script Manager with various samples..
The script uses Wscript.Shell and scripting.filesystemobject, and calls WMIC.exe to get disk, RAM & CPU information.
All checks in one script? May be you can use standard built-in tests?

Regards
Alex
argis
Posts: 31
Joined: Mon May 06, 2019 8:30 pm

Post by argis »

We did order a new version for a client site, but we haven't upgraded our own install yet. I should get onto that.

The PowerShell test I created does use that output format, but it can't get any information to return.
The test returns the disk sizes, installed RAM, number of CPUs & cores, and whether or not the machine is a VM. It's useful information to have on hand when diagnosing problems. It just runs once a day.

I've since discovered 3 more servers with the same problem. It looks like another Microsoft mystery...
KS-Soft
Posts: 12887
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

The test returns the disk sizes, installed RAM, number of CPUs & cores, and whether or not the machine is a VM. It's useful information to have on hand when diagnosing problems. It just runs once a day.
There is System Info tool (you may select test related to some host and use popup menu System Info)
https://www.ks-soft.net/hostmon.eng/mfr ... 10_sysinfo

Need more data? Just number of CPU cores and whether or not the machine is a VM?

Regards
Alex
argis
Posts: 31
Joined: Mon May 06, 2019 8:30 pm

Post by argis »

System Info is good for a deeper dig, but I don't use it much. It doesn't work on our RMAs (all active) though I see in the help that it's supposed to. Is that a config setting I've got wrong?
This test just gives a quick overview at a glance on the main screen. Typically it will look something like this:
C: 40GB - D: 100GB - RAM: 32GB - CPU: 1/4/4 - VM:Y
(CPU is Physical CPUs/Logical CPUs/Cores, VM is Y or N)

That's all I can think of that might be useful.
KS-Soft
Posts: 12887
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

It doesn't work on our RMAs (all active) though I see in the help that it's supposed to.
There were couple bugs related to RMA in version 11. Fixed couple years ago.

Regards
Alex
Post Reply