Hi,
I'm using the Linux RMA on a SUSE 10 box with HostMonitor 7.10. I have one item to check /var/log/messages for the word "error" and another item to check it for the word "root".
Unfortunately, I have a process that runs every few hours that does log in remotely as root, does a few things, and then logs out. This generates alerts when I don't want it to.
I haven't found a way to exclude certain lines of text when parsing a text file. The alerts I'm getting are exactly the same each time--if I could say "Alert on anything except these strings" that would be perfect.
Is that possible? Thanks for any info...
-m
Text file parsing question
What test method do you use? Text Log? Then you may use "Look for expression" option of the test.
Quote from the manual
Alex
Quote from the manual
RegardsLook for
string: with this option selected HostMonitor will check records in a log file for a specified string. If new record contains specified data, HostMonitor will change status of the test to "Bad"
expression: with this option selected HostMonitor will check log records using a boolean (logical) expression. Status of the test will be set to "Bad" when the text in the record satisfies the required conditions. In the expression you may use strings (must be concluded in quotes (') or double quotes (")); round brackets; logical operators "and", "or", "not".
For example: if you define expression like ('error' or 'warning') and not '16536', then HostMonitor will mark test as "Bad" when line in the log contains string 'error' or 'warning' and does not contain string '16536'
Alex
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Re: Text file parsing question
In addition to Alex, I want to say that if you are using "Text Log" test method, you may use "Optional Status processing" feature: http://www.ks-soft.net/hostmon.eng/mfra ... processinginvisik wrote:I haven't found a way to exclude certain lines of text when parsing a text file. The alerts I'm getting are exactly the same each time--if I could say "Alert on anything except these strings" that would be perfect.
For instance, you may enable "Use Normal status if" option with the following expression:
Code: Select all
('%SuggestedSimpleStatus%'=='DOWN') and ('Some string you want to exclude' in '%Reply%')
Max