Specifying number of lines to search a match string
PATROL KM for Log Management enables you to specify the number of lines to search a match string. Depending on the value that you specify the KM displays the number of lines, when a match is found.
To specify the number of lines to search a match string
- Access the LOG application menu as described in Accessing KM menu commands.
- Select Add Instance.
- In the Add-Instance-dialog-box, configure a new search string. Enter the label for the new file and select Text Instance as the type of file instance.
- Click Accept.
- In the Add File for Label: instanceName dialog box, amongst the configuration properties to monitor a log file, specify a value in the Number of Lines in Log Entry text box.
The KM displays the specified number of lines when a match is found.
For example, if you want to determine when a disk is full and where the disk is mounted, enter Error: Disc Full as the Search String and 2 as the value for Number of Lines in Log Entry. When a disk is full, a message similar to the following one is displayed in Last-Strings-Matched-by-the-Template-Regular-Expression-LOGMatchString text parameter:
Id=id1
031605: Error: Disc Full
Id=;MatchedLines
/hd001 mounted as /opt
SUMMARY:id1=1;
Related topic
Configuring-the-search-criteria-for-a-text-instance
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*