Hello,
date macros do not work correctly for me. I need to look for a file from yesterday, so I use "%dd[-1d]%" but it doesn't work. "%dd%" just works fine. We use Advanced Hostmonitor v7.22c. Any ideas?
Problem with Date Macros
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
I defined a "Folder/File Availibility" test by Hostmonitor (Enterprise) that should look for a daily image of a server "\\192.168.1.111\Backup\e010_pdc_%ddd[-1d]%.tib". Alert when file doesn't exist or older than 2880 min. Translate macros is enabled.
Since there seems to be no easy way to see how the macros are resolved, I've sent me a debug message with the filename in it, with and without [-1d]. The second filename (..%ddd%..) resolves as expected, first doesn't, this is what I get:
\\192.168.1.111\Backup\e010_pdc_%ddd[-1d]%.tib
\\192.168.1.111\Backup\e010_pdc_Mo.tib
Since there seems to be no easy way to see how the macros are resolved, I've sent me a debug message with the filename in it, with and without [-1d]. The second filename (..%ddd%..) resolves as expected, first doesn't, this is what I get:
\\192.168.1.111\Backup\e010_pdc_%ddd[-1d]%.tib
\\192.168.1.111\Backup\e010_pdc_Mo.tib
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
In fact, I cannot reproduce the problem. e010_pdc_%ddd[-1d]%.tib variable is properly resolved for e010_pdc_Sun.tib file name and e010_pdc_%ddd%.tib is properly resolved for e010_pdc_Mon.tib file name.
Have you enabled "Translate macros" opion in "Test Properties" window?
Could you disable "older than 2880 m" option and leave "Alert when file doesn't exist" option only? Just for testing?
On the another hand, as I can see, you are trying to check file on remote server. Is HostMontor started as a service or as an application? What account have you specified for HostMonitor's serice? You may use "Connection manager" to specify certain account to perform "Folder/File Availability" test on remote machine: http://www.ks-soft.net/hostmon.eng/mfra ... htm#conmgr
Regards,
Max
Have you enabled "Translate macros" opion in "Test Properties" window?
Could you disable "older than 2880 m" option and leave "Alert when file doesn't exist" option only? Just for testing?
On the another hand, as I can see, you are trying to check file on remote server. Is HostMontor started as a service or as an application? What account have you specified for HostMonitor's serice? You may use "Connection manager" to specify certain account to perform "Folder/File Availability" test on remote machine: http://www.ks-soft.net/hostmon.eng/mfra ... htm#conmgr
Regards,
Max
PS
http://www.ks-soft.net/hostmon.eng/mfra ... #timemacro
You may use the following variables as parameters of the action triggered by "File/Folder Availability" test method
%FileName%
%FileSize%
%FileTime%
Regards
Alex
Actions do not support such expressions (%ddd[-1d]%)I've sent me a debug message with the filename in it, with and without [-1d]. The second filename (..%ddd%..) resolves as expected, first doesn't, this is what I get:
\\192.168.1.111\Backup\e010_pdc_%ddd[-1d]%.tib
\\192.168.1.111\Backup\e010_pdc_Mo.tib
http://www.ks-soft.net/hostmon.eng/mfra ... #timemacro
You may use the following variables as parameters of the action triggered by "File/Folder Availability" test method
%FileName%
%FileSize%
%FileTime%
Regards
Alex