Change in macro expander ?

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
Kapz
Posts: 216
Joined: Mon Dec 06, 2004 2:33 pm
Location: Denmark

Change in macro expander ?

Post by Kapz »

Hi !

We have some tests containing a % in the test name which have always worked correctly. Upon upgrade from HM4.70 to HM4.86 these tests no longer expands correctly when the alert profile is beeing triggered and the command line executed.

Did something change in the way that the macros are expanded - or is % not a valid character in a test name anymore ?

Thanks !

Kasper :O)
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Version 4.86 resolves datetime variables in command line, no other changes...
Could you please provide info about test and action: test name, command line

Regards
Alex
Kapz
Posts: 216
Joined: Mon Dec 06, 2004 2:33 pm
Location: Denmark

Post by Kapz »

Hi Alex !

My test looks like this:

; ------- Test #01 -------

Method = CPU
;--- Common properties ---
;DestFolder = Root\DC Produktion\Web01\Performance\
RMAgent = Web01
Title = Web01 CPU > 95%
Comment =
RelatedURL =
ScheduleMode= Regular
Schedule = Mo-Su 0000-2359
Interval = 300
Alerts = Send SMS Mo-Fr 0800-1800 30/5
ReverseAlert= No
UnknownIsBad= No
UseCommonLog= Yes
PrivLogMode = Default
CommLogMode = Default
SyncCounters= Yes
SyncAlerts = No
DependsOn = list
MasterTest-Alive = Web01 Port 3456 (RMA)
;--- Test specific properties ---
Computer =
OS = NT
MaxCPUUsage = 95

- but when I receive the alert it looks like this:

Web01 CPU > 952318/2/200510:23:27PUU27a5232710:23a10:23u27:23UP2321

It seems like the time and date is merged into the output that furthermore is trashed.

Thanx !

Kasper :O)
Kapz
Posts: 216
Joined: Mon Dec 06, 2004 2:33 pm
Location: Denmark

Post by Kapz »

Sorry - forgot to add the command line executed from the alert profile:

f:\sms\sendsms.exe !watchguard "%TestName%\n%TestMethod%\nStatus:\n%SimpleStatus%\n%Reply%\n"

Kasper :O)
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

H'm.. HostMonitor resolves all variables and then it tries to resolve date variables. Both "test name" and "reply" fields contain "%", so HostMonitor assumes there are date variables in the command line... That's what happen when we try to implement all requests.
Ok, I will try to find solution. For now, remove % from test name.

Regards
Alex
Kapz
Posts: 216
Joined: Mon Dec 06, 2004 2:33 pm
Location: Denmark

Post by Kapz »

Alex,

> Ok, I will try to find solution. For now, remove % from test name.
Right, thanx a lot !

Kasper :O)
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Ok, if you really need % in the test name, download this update www.ks-soft.net/download/hm503b.zip and add additional % into command line:
f:\sms\sendsms.exe !watchguard "%TestName%%\n%TestMethod%\nStatus:\n%SimpleStatus%\n%Reply%\n"
If you use the same action for other test items (without % in name), do not add % into command line, add another % into name instead (e.g. name test "CPU > 95%%")

Regards
Alex
Kapz
Posts: 216
Joined: Mon Dec 06, 2004 2:33 pm
Location: Denmark

Post by Kapz »

Alex,

> Ok, if you really need % in the test name, download this update www.ks-soft.net/download/hm503b.zip
Thanks :)

Do you consider this beta build to be stable enough for production use ?

Kasper :O)
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Its stable, I don't think its less stable than version 4.86
I am not 100% sure it calculates all statistical counters properly. We made some changes and its hard to check this part. But we did not find anything wrong yet, may be everything is fine

Regards
Alex
Post Reply