Test log file - last created of last modified file
Test log file - last created of last modified file
Hi,
I need to check a log file for specific words.
The problem is that every few hours a new log file is created.
I want to always check the last modified/last created file in a specific folder.
How can I do that?
Thanks
I need to check a log file for specific words.
The problem is that every few hours a new log file is created.
I want to always check the last modified/last created file in a specific folder.
How can I do that?
Thanks
Then use Text Log test and specify %NewestFile% variable instead of filename
http://www.ks-soft.net/hostmon.eng/mfra ... htm#macros
PS: may be you may use Compare Files test instead of Text Log, depending on how exactly you need to check the log
Regards
Alex
http://www.ks-soft.net/hostmon.eng/mfra ... htm#macros
PS: may be you may use Compare Files test instead of Text Log, depending on how exactly you need to check the log
Regards
Alex
This is how I used the variable:
C:\ProgramData\XYZ\Logs\%NewestFile%
HostMonitor: 8.64
RMA: 4.08
Edit1:
I upgraded to:
HostMonitor: 8.72
RMA: 4.10
Same issue
Edit2:
I checked the "use date macros" checkbox and now it works.
I still have problems with the test.
Reverse alert will give me good status for "Bad Text".
But I need it also to give Bad status when the Text isn't found.
How can I get it done?
Thanks
C:\ProgramData\XYZ\Logs\%NewestFile%
HostMonitor: 8.64
RMA: 4.08
Edit1:
I upgraded to:
HostMonitor: 8.72
RMA: 4.10
Same issue
Edit2:
I checked the "use date macros" checkbox and now it works.
I still have problems with the test.
Reverse alert will give me good status for "Bad Text".
But I need it also to give Bad status when the Text isn't found.
How can I get it done?
Thanks
Yes, you need this option for sure. Otherwise HostMonitor does not process variablesI checked the "use date macros" checkbox and now it works
That's how it works. What is the problem?I still have problems with the test.
Reverse alert will give me good status for "Bad Text".
But I need it also to give Bad status when the Text isn't found
What test method do you use? Text Log or Compare Files?
Regards
Alex
Of course test does not change its status to Ok (Bad after Reverse function applied) because you set "set Ok status by acknowledgement (manually)" option for the test.
You should use default "set Ok status when no new Bad records detected" option, located on Text Log properties dialog.
Please check the manual or visit our web site for more information at:
http://www.ks-soft.net/hostmon.eng/mfra ... tm#textlog
Regards
Alex
You should use default "set Ok status when no new Bad records detected" option, located on Text Log properties dialog.
Please check the manual or visit our web site for more information at:
http://www.ks-soft.net/hostmon.eng/mfra ... tm#textlog
Regards
Alex