Hi !
Running HM7.52 on Win2003:
I run a few simple URL Checks to get the status code and reply time for various websites.
The results are beeing sent to the customer through a HTTP request in an alert profile.
The request is here:
GET http://xxxxxxxxxx.xxxxxxxxx.xx/monitor/ ... askComment% HTTP/1.0
As there are a few properties that are test specific and thus cannot be placed in the general action profile I just place these in the Comment field for the individual test.
A comment can look like this:
monitorurlid=4&serverid=12.34.56.78
Now I'd expect that the HTTP request would end up looking like this when received at the customers system:
MonitorURLRequest.aspx?statuscode=200&value=250%20ms&monitorurlid=4&serverid=12.34.56.78
However it ends up looking like this:
MonitorURLRequest.aspx?statuscode=200&value=250%20ms&monitorurlid%3D6%26serverid%3D12.34.56.78
As you can see the equals signs from the %TaskComment% macro has turned into %3D6%26 and %3D and the value 4 from monitorurlid is gone (or turned into 6%26 given that both equals signs turned to %3D).
If I move my parameters from the Comment field and place them directly in the HTTP request in the alert profile like this ...
GET http://xxxxxxxxxx.xxxxxxxxx.xx/monitor/ ... 2.34.56.78
HTTP/1.0
... everything looks fine to the customers system (sorry, I don't have a sample of the exact string received at the customers end when it works, but I can get it tommorrow if needed).
So it seems like the %TaskComment% macro is not beeing expanded the same way as the %HttpCode% and %SuggestedReply% are - or is it something completely different that triggers this behaviour ?
I tried with %CommentLine1% as well instead of %TaskComment% but with same result.
Thanks in advance !
Kasper
Problem with expansion of %TaskComment% macro
Yes, HostMonitor encodes variable. This is necessary when you are using variable as parameter of the URL. Yes, this leads to problem when you want to use single variable for several parameters.
I think you should use several comment lines as "parameter name - parameter value" pair. E.g. set comment to
monitorurlid
4
serverid
12.34.56.78
then specify request as
GET http://xxxxxxxxxx.xxxxxxxxx.xx/monitor/ ... mmentLine4% HTTP/1.0
Regards
Alex
I think you should use several comment lines as "parameter name - parameter value" pair. E.g. set comment to
monitorurlid
4
serverid
12.34.56.78
then specify request as
GET http://xxxxxxxxxx.xxxxxxxxx.xx/monitor/ ... mmentLine4% HTTP/1.0
Regards
Alex
Alex,
Thanks - using mulitple %CommentLineX%'s did the trick
I was able to use only two comment lines making the HTTP request look like this:
GET http://xxxxxxxxxx.xxxxxxxxx.xx/monitor/ ... mmentLine2% HTTP/1.0
/Kasper
Thanks - using mulitple %CommentLineX%'s did the trick

I was able to use only two comment lines making the HTTP request look like this:
GET http://xxxxxxxxxx.xxxxxxxxx.xx/monitor/ ... mmentLine2% HTTP/1.0
/Kasper