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).
I can't figure out what I am doing wrong. It appears that my date macros are not being translated on my URL-method test. I have a URL-method test where the URL I'm checking includes embedded date information (month and day - ie. somefile0522.gif )
The basic test can be described as:
wrote:"if an image file does not exist for a date '3 days in the future' then raise alert"
Thus I have checked "Translate date macro variables" in the Advanced section of the URL test and I am using this date expression:
wrote:%mmdd[+3d]%
Using Wireshark, I determined that the GET request is being passed to the web server with the date macros untranslated, i.e.
Sorry, URL test cannot resolve date expressions. Only file related tests can process expressions like [+3d].
Quote from the manual
=====================
When you setup "Folder/File Size", "File/Folder Availability", "Count Files", "Text Log" or "Compare Files" tests you can set "Translate macros" option and use special macro variables in the file name:
...
Expressions
...
=====================
We thought to change this behavior and allow the same expressions that allowed by file related tests but this will lead to problems for customers that already have many URL tests...
May be we can add some switch - use old macros or new expressions
Ahhh, the %mm%%dd% syntax does indeed work for URL-method! Being a long-time Host Monitor customer, I clearly understand the need to not break Host Monitor for current users.
It's not clear to me if any other customers would find date macro expressions useful for URL-method tests. If I'm the only one who ever requested it, then it's probably not worth the time it would take to implement. I understand that.
What might possibly be more useful to more users - and perhaps more applicable to a wider range of situations - to might be a hook to call an external script at the time of the test to provide a test parameter such as "file path". This is just a half-baked thought, not really a suggestion.
I'm going to go re-think my reqiuirements for this test a bit. With Host Monitor, I've found that if I can't "raise the bridge" then I can almost always "lower the river". Perhaps the easiest way to solve this would be to create a PHP script on the web site that performs this test - then Host Monitor simply calls that page.
We added "unofficial" option into new version so you will be able to use date expressions for URL tests (this switch will effect all URL tests you have).
If you need it right away and you can install official release 8.86, we can provide this "unofficial" update.