Cannot use folder variable to target service check

When you post information about some problem, please include the following details: - OS version (e.g. Windows 2000 Professional SP3); HostMonitor version; problem description.
Post Reply
bmekler
Posts: 38
Joined: Tue Apr 17, 2012 4:51 am

Cannot use folder variable to target service check

Post by bmekler »

Windows Server 2008 R2 SP1, HostMonitor 9.16.

Target system is Windows Small Business Server 2011 SP1 (based on 2008 R2 SP1).

HostMonitor system is not joined to the target domain, so the test is using explicit credentials (domain\user, password).

RMA is not used, test is running directly from HostMonitor.

In the folder properties, the variable fvar_target is defined with IP address of the target system.

If the sensor is defined with the target address of the system configured directly (172.19.3.11, in this case), it works fine.

However, if I set the sensor to use %fvar_target% as its destination, the check returns "Unknown" status, with "Win32 error #1722" in reply field.

Note that other sensors in the same folder using fvar_target work fine. For example, a UNC sensor targeting \\%fvar_target%\d$\ properly returns free space, a performance counter sensor targeting \\%fvar_target%\\PhysicalDisk(_Total)\Disk Transfers/sec properly returns IOPS, etc.

The problem does not seem to occur when running service checks using an RMA with implicit credentials (RMA service running on domain admin account in the target network, "connect as" in sensor not checked, RMA 4.46).

The system where my instance of HostMonitor is running is not part of a domain, so I cannot test implicit credential checks against remote systems, but when I defined fvar_target on another folder, set it to HostMonitor's local IP (172.19.1.201), then created a service check targeting %fvar_target% with "connect as" unchecked, it worked fine.

Setting fvar_target to a DNS FQDN (which, in this case, resolves via the local hosts file) instead of an IP address does not make any difference - checks that worked with IP address continue to work, service checks continue returning Win32 error #1722.
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

We cannot reproduce the problem, yet.
May be we misunderstand something... could you please send exported test settings or screen shot to support@ks-soft.net?

Regards
Alex
bmekler
Posts: 38
Joined: Tue Apr 17, 2012 4:51 am

Post by bmekler »

I feel really stupid now - the root cause of the problem was completely different.

I initially defined the tests with hardcoded target names, then I found out about folder variables and decided to switch over to them to ease further deployment. However, when I was going through tests that I already defined, and pasting %fvar_target% in the target fields, I was adjusting other values on performance counter tests, but not on the service tests - I would double click the test, click into target field, Ctrl+V, Enter, proceed to next test. Apparently, when I did this, HostMonitor tried to check "%fvar_target%", by name, rather than its contents. If I paste %fvar_target%, then change to any other field in the form, and then click "OK", everything works fine.
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Change the field using variable and press Enter instead of click on [Ok] button?
Yes, we can reproduce this problem, will be fixed.

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

Post by KS-Soft »

Fixed in new version, should be available next Monday

Regards
Alex
Post Reply