Text Log - range of values
Text Log - range of values
Alex,
I have a log file that tracks temperature, I want to generate an error only when the temperature (the second word) is greater then 50 (centigrade).
It appears I cannot use ('%Reply%' >'50').
I tried to use Warning status as ('%Reply%' >'50') and treat warning status as bad, but that did not work.
Here is a sample of the log:
Seconds CPU CPU Rear Fan
58772 32.5 1110 1205
58775 31.5 1110 1205
58778 31.5 1081 1205
58781 34.5 1081 1205
Any suggestions?
I have a log file that tracks temperature, I want to generate an error only when the temperature (the second word) is greater then 50 (centigrade).
It appears I cannot use ('%Reply%' >'50').
I tried to use Warning status as ('%Reply%' >'50') and treat warning status as bad, but that did not work.
Here is a sample of the log:
Seconds CPU CPU Rear Fan
58772 32.5 1110 1205
58775 31.5 1110 1205
58778 31.5 1081 1205
58781 34.5 1081 1205
Any suggestions?
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
What other test settings do you use ?
E.g. Look for <space symbol> to detect every log record?
It's better to use "Use Notmal status if" option with expression like the following:
'%SuggestedReply%' < '50'
Note1: this expression should use "Suggested" variables (like %SuggestedReply%, %SuggestedRecurrences%, etc..)
Note2: if log file contains values with point [.] decimal separator, your system decimal separator should also be the point [.]
With these settings, you'll get Normal status when:
1. CPU Usage < 50
2. No new log records are found in the log
And Bad status when new log record contains CPU Usage >= 50
E.g. Look for <space symbol> to detect every log record?
It's better to use "Use Notmal status if" option with expression like the following:
'%SuggestedReply%' < '50'
Note1: this expression should use "Suggested" variables (like %SuggestedReply%, %SuggestedRecurrences%, etc..)
Note2: if log file contains values with point [.] decimal separator, your system decimal separator should also be the point [.]
With these settings, you'll get Normal status when:
1. CPU Usage < 50
2. No new log records are found in the log
And Bad status when new log record contains CPU Usage >= 50
Bad record:
Look for string: 100 (not sure what to put here)
Set OK when no new bad detected
Display:found text
Warn of:Last new event
Filter:display word #2
Per your suggestion I added:
Treat warning as bad
use normal status:( "%SuggestedReply%" < '50')
use warning status:( "%SuggestedReply%" >= '50')
Still not configured correctly, also it would be easier if I could use the > operator in the expression for bad
Look for string: 100 (not sure what to put here)
Set OK when no new bad detected
Display:found text
Warn of:Last new event
Filter:display word #2
Per your suggestion I added:
Treat warning as bad
use normal status:( "%SuggestedReply%" < '50')
use warning status:( "%SuggestedReply%" >= '50')
Still not configured correctly, also it would be easier if I could use the > operator in the expression for bad
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
I would suggest you to put space symbol into "Look for string:" option.Bad record:
Look for string: 100 (not sure what to put here)
With this option, each log record, containing space symbol will be detected.
You do not need to use "Use Warning status if" option.Treat warning as bad
use normal status:( "%SuggestedReply%" < '50')
use warning status:( "%SuggestedReply%" >= '50')
If log record is detected and %SuggestedReply% >= 50 , test will get Bad status.
What do you mean?Still not configured correctly
What is test Status and Reply? What new record was added?
What Status was expected?
Have you checked system decimal separator?
You may check system decimal seperator using HostMonitor:
Specify Tune up Reply value option for any test with expression like ['7.5'*2] and refresh the test. if Reply is 15 - system decimal separator is correct [.]
Alex
Tune up works correctly and returns 15
I am not seeing any reply value when I run the test using the space symbol, Yesterday when I was testing different combinations of bad values I was getting the correct replay value, but not getting failure or success values correctly.
For example:
If I set bad record to: expression NOT 0
and then set OK status by acknowledgement manually
Then I get a reply value of the second word so I know I am reading the log file ok.
Using the space symbol does not appear to work. The log is tab delimited, but I made a test log with spaces.
I think the problem with the test is the bad text and the Normal status is still not right
Tune up works correctly and returns 15
I am not seeing any reply value when I run the test using the space symbol, Yesterday when I was testing different combinations of bad values I was getting the correct replay value, but not getting failure or success values correctly.
For example:
If I set bad record to: expression NOT 0
and then set OK status by acknowledgement manually
Then I get a reply value of the second word so I know I am reading the log file ok.
Using the space symbol does not appear to work. The log is tab delimited, but I made a test log with spaces.
I think the problem with the test is the bad text and the Normal status is still not right
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Empty reply means Text log haven't detected new log records that meet Bad condition.I am not seeing any reply value when I run the test using the space symbol,
Yes, you may use this expression to detect any log record.If I set bad record to: expression NOT 0
If log record doesn't contain spece symbols, then you should use Bad text condition like specified above (expression NOT 0).I think the problem with the test is the bad text and the Normal status is still not right
Please note, Text log test detects only new log records.
Try the following steps:
1. bad record Look for expression: NOT 0
2. set Ok status when no new "bad" records detected
3. Filter display word# 2
4. Disable "Use Warning status if" option
5. Enable "Use Normal status if " option with expression: '%SuggestedReply%'<'50'
--
6. Refresh the test. Test Status should be Normal.
7. Add log record to the file: 58775 47.4 1110 1205
8. Refresh the test. Test Status should be Normal.
9. Add log record to the file: 58775 63.9 1110 1205
10. Refresh the test. Test Status should be Bad.
If this will not work, please send us (support@ks-soft.net) log file and "Text log" test settings (menu File -> Export to text file)
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Test History Graphs (History Charts)
Alex,
The Test History graphs (History Charts) do not work when there is a decimal point in the text log file.
I have another minor issue with this test. The log has values like this:
60 34.25 36.0 3125 3668 2813 313 313 313 313 313 4.08
72 34.25 37.0 3125 3835 2813 313 313 313 313 313 4.08
(these are speeds and temperatures and voltages)
I have tests that look at each word, so I look at 34.25 in one test and 36.0 in another test and 3668 in another etc...
All the tests function with correct "good' and 'bad' results,
But... the tests with decimal points do not display any data in History charts. The have all 0 values so graphs are not usable. And the test without decimal points display History charts correctly because they see the right reply values. All the tests are identical, they just look at a different word. In Hostmonitor the reply value is visable for all the tests both for the ones that graph correctly and those that do not. The private log also shows the correct value when I turn on full logging.
The Test History graphs (History Charts) do not work when there is a decimal point in the text log file.
I have another minor issue with this test. The log has values like this:
60 34.25 36.0 3125 3668 2813 313 313 313 313 313 4.08
72 34.25 37.0 3125 3835 2813 313 313 313 313 313 4.08
(these are speeds and temperatures and voltages)
I have tests that look at each word, so I look at 34.25 in one test and 36.0 in another test and 3668 in another etc...
All the tests function with correct "good' and 'bad' results,
But... the tests with decimal points do not display any data in History charts. The have all 0 values so graphs are not usable. And the test without decimal points display History charts correctly because they see the right reply values. All the tests are identical, they just look at a different word. In Hostmonitor the reply value is visable for all the tests both for the ones that graph correctly and those that do not. The private log also shows the correct value when I turn on full logging.