TestLog Test not working
TestLog Test not working
Hello,
I have created a TestLog - test, but for some reason it is not working correctly.
Regardless what I configure it always says, that the test is "OK", but it isn't.
I've created a .log - File on a server and putted the string "java.lang.NullPointerException" in it, then I configured the test as following:
'Bad' text = java.lang.NullPointerException
--> Look for "string" java.lang.NullPointerException
--> set "Ok" status when now new "bad" records detected
'Good' text = [Unused. Set Ok after next probe]
Warn of = last new event
Display = found line
HostMonitor version: 9.90
OS: Windows Server 2012 R2
Thanks for your help!
Kind Regards,
Sebastian
I have created a TestLog - test, but for some reason it is not working correctly.
Regardless what I configure it always says, that the test is "OK", but it isn't.
I've created a .log - File on a server and putted the string "java.lang.NullPointerException" in it, then I configured the test as following:
'Bad' text = java.lang.NullPointerException
--> Look for "string" java.lang.NullPointerException
--> set "Ok" status when now new "bad" records detected
'Good' text = [Unused. Set Ok after next probe]
Warn of = last new event
Display = found line
HostMonitor version: 9.90
OS: Windows Server 2012 R2
Thanks for your help!
Kind Regards,
Sebastian
It works as designed. "As designed" means test checks for NEW records.File on a server and putted the string "java.lang.NullPointerException" in it, then I configured the test as following:
Quote from the manual
You added record into the file then created test so test ignores old record.Unlike "Compare Files" test that warns you when any part of a file contains some specific string the Text Log test warns you only when the string is found in a NEW record. It means that if log file already has "bad' records when you started HostMonitor, you will not receive any alerts; but if any new "bad" record will be added to the log file while HostMonitor is running, you will receive a warning about the new problem. So the Text Log test works like NT Event Log test but it checks text files instead of NT Event Log Database.
If you does not care when record was added into file, then use Comprare Files test.
Regards
Alex
I see, thanks for the explanation.
What I have noticed it too only recognizes the entries in new lines, so for example if I create a string in line 1 and then delete it and recreate it in line one, the test will be ok.
Another question, is it possible to add multiple strings for each test per file, or do I have to create several tests each file?
Thank you!
Kind Regards,
Sebastian
What I have noticed it too only recognizes the entries in new lines, so for example if I create a string in line 1 and then delete it and recreate it in line one, the test will be ok.
Another question, is it possible to add multiple strings for each test per file, or do I have to create several tests each file?
Thank you!
Kind Regards,
Sebastian
Correct.What I have noticed it too only recognizes the entries in new lines, so for example if I create a string in line 1 and then delete it and recreate it in line one, the test will be ok.
This test designed to check log files. Normally records added into the log file one after another.
No sure I understand what exactly means "add multiple strings".Another question, is it possible to add multiple strings for each test per file, or do I have to create several tests each file?
If you want to set Bad test status when "error" or "warning" logged, then use "Look for expression" mode with ('error' or 'warning') expression
Regards
Alex
No sure I understand what exactly means "add multiple strings".
If you want to set Bad test status when "error" or "warning" logged, then use "Look for expression" mode with ('error' or 'warning') expression
Regards
Sebastian
If you want to set Bad test status when "error" or "warning" logged, then use "Look for expression" mode with ('error' or 'warning') expression
For example one string is "error" and the other one in another line is "bad", I guess I have to use an expression for that?
Regards
Sebastian
You tell me about strings but you did not say anything about your needs.
>For example one string is "error" and the other one in another line is "bad"
Ok, one string is "error", another is "bad". What's next? How do you want to process these strings?
E.g.
1) Set "Bad" test status when any of these strings appear in some line of text file?
2) Set "Bad" status when "error" appears in some line and "Bad" appears in the next line?
3) Something else?
Regards
Alex
>For example one string is "error" and the other one in another line is "bad"
Ok, one string is "error", another is "bad". What's next? How do you want to process these strings?
E.g.
1) Set "Bad" test status when any of these strings appear in some line of text file?
2) Set "Bad" status when "error" appears in some line and "Bad" appears in the next line?
3) Something else?
Regards
Alex