Test "variable" logfile contains string

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
zubler
Posts: 13
Joined: Mon Sep 14, 2009 12:42 am

Test "variable" logfile contains string

Post by zubler »

hi there,
I'm trying to test a simple log file if a string is contained. The problem is, that the backup software creates a new file every day with a variable start timer. I tried to use the log file test, but this does not work steadily.
I also tried the compare files method. This would work but I'm unable to use wildcards to check the variable date filename.
The filename is like this "2009-09-05-21-00-04.log" and another day its "2009-09-06-21-01-04.log".

Is there a way to use wildcard in the compare files test or another solution to this issue?

regards

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

Post by KS-Soft »

You may use wildcard but I don't think this will help. In such case HostMonitor will take 1st matched file and check it.
If that software adds new files into the same directory, you should checks last (newest file) instead of 1st file. Am I right?
Then you should create Compare Files test item and use %NewestFile% macro variable, e.g. c:\application\logs\%NewestFile%
http://www.ks-soft.net/hostmon.eng/mfra ... htm#macros

Regards
Alex
zubler
Posts: 13
Joined: Mon Sep 14, 2009 12:42 am

Post by zubler »

Hi Alex,

I haven't seen this macro variable, this is just that what I was looking for. great job, thank you! My test works fine now...

But I have another issue with the test. I have a UNC path to a logfile, this one: \\server\c$\Dokumente und Einstellungen\User\.obm\log\1207320176325\%NewestFile%

But the result is always "RMA: 301 - File doesnt exist". But I have access to this file when I browse them in the test properties. Does someone have an idea?

regards
Zubler
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

What version of HostMonitor and RMA do you use? What exctly test method do you use? Compare Files?

Regards
Alex
zubler
Posts: 13
Joined: Mon Sep 14, 2009 12:42 am

Post by zubler »

I use version 3.47 of the RMA Monitor, and the Hostmonitor is 8.14.

My test details:

Type: Compare Files
Alert when: file contains string
File: \\server\c$\Dokumente und Einstellungen\Administrator\.obm\logs\%NewestFile%
string: Fehler
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Yes, looks like there was a problem in Active RMA 3.47. This problem was fixed and latest version works just fine (Active RMA 3.49 included into Advanced Host Monitor 8.24 Beta)
http://www.ks-soft.net/hostmon.eng/downpage.htm

Also, I think there is mistake in the UNC path .obm. filename cannot include dot...

Regards
Alex
zubler
Posts: 13
Joined: Mon Sep 14, 2009 12:42 am

Post by zubler »

I've upgraded the RMA and it works fine now.

Thank you for your help.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

No problem :)

Regards
Alex
Post Reply