|
Objective
The aim of this tool is to enable you to fine-tune your monitoring by searching for and extracting actual values from a source of information (the output of a command, a web page, the result of a SQL query, or WBEM query etc.), and build graphs with these values.
Problems with an application are not always as simple as a sentence explaining that an "error has occurred." Sometimes, an application reports its health by providing critical numbers, like a queue length, a processing time, a utilization percentage, etc. These numbers may be reported by the application through its files, in the output of commands, in a database, in a Web page, etc. Monitoring Studio extracts these values and reports them as graphs in the Console. This feature is called "Numeric Value extraction" as its purpose is to extract numeric values from a text input (the output of a command, a web page, the result of a SQL query, or WBEM query etc.).
Method (summary)
All you need to do is indicate how to find the numeric value(s) within the information source. The basic mechanism is:
| 1. | Specify an information source |
| 2. | Specify with a regular expression the location of the numeric value within the searched lines |
| 3. | Indicate the numeric value’s position in these lines i.e. before/after the string; column number etc. |
| 4. | Indicate which numbers are to be considered if several lines contain the searched numeric value: first value, last value, calculate average; highest value; lowest value. |
The numeric value searching function works a bit differently on "running sources" (LOG files and never-ending command lines) than on flat sources (flat files, command lines, Web requests, etc.):
| • | On "running sources" (LOG files and never-ending command lines); the numeric values are searched only in new lines since the last polling. |
| • | On "flat sources" (flat files, command lines, Web requests, database queries), the numeric values are searched in the entire source (the whole file, the whole standard output, the whole HTTP response, the whole data-set). |
If several values are found, it is possible to select which value should be kept: the last value found, the average of all values, the minimum or maximum or a total of all values. A graph is then built with these values.
Create or edit a numeric value search
To create a new numeric value search, right-click the information source icon (file, Web request, etc.) in the PATROL Console and select KM Commands > New > Numeric Value Extraction...

Numeric Value Extraction Wizard — Welcome Page
To edit an existing numeric value search, right-click the Numeric Value Extraction icon in the PATROL Console and select KM Commands > Edit.
Step 1: Lines to be taken into account
Provide information about the line(s) in which the numeric value will be searched for:

Numeric Value Extraction Wizard — Lines Identification Page
| • | Lines to be taken into account: Specify which lines are to be searched for the numeric value. The information to enter subsequently depends on this first choice. There are three modes to choose from: |
| ▪ | All lines: All lines of the text will be scanned for the Numeric value search. There is no need to enter anything. |
| ▪ | Line numbers (fill in below): Only specific line numbers will be scanned. If this mode is selected, the line numbers must be specified in the text field below. |
| ▪ | Line numbers are specified as follows: |
x, y: line x and line y
x-y: all lines from x to y inclusive
x: all lines from 1 to x inclusive
x-: all lines from x to the end of the file inclusive
If the "Skip blank lines" option is selected, empty lines will be ignored in the line-count.
| • | Lines matching the regular expression below: The lines scanned will be lines matching the regular expression specified in the field. |
Step 2: Location of the numeric value within the selected lines
Indicate the position of the numeric value to be found:

Numeric Value Extraction Wizard — Location Page
| • | The numeric value is located: There are four different modes to choose from and the information to enter depends on this choice. |
| • | After/before the string…: Indicate if the numeric value is located after or before the string to be entered in the text field. |
| • | At the character offset…: The value should be at a specific character offset in the line. Enter the offset number in the box. Monitoring Studio will look for the numeric value at that exact character offset in the line. If no numeric data is found, no value will be collected. |
 | A character offset is nothing but the character "number", for example: you want to search for a value that starts from the 7th character in the line... so you will enter "7" as the character offset. |
| • | In the column number…: The previously selected lines contain several columns identified by a separator character. Enter the column number that should contain the value and click the "Column separators" button to specify how columns are separated. |

Numeric Value Extraction Wizard — Column Separator Definition
The panel shows the available default separators: Blank space, semicolon, tabulation, comma, pipe.
Check or uncheck separators as you need. You can also add a list of custom separators in the "Other" text box. Simply type the separators one after the other.
| • | Consecutive separators must be treated as a single one: Typically, it indicates that consecutive separators must be treated as a single separator. |
| • | Consecutive separators mean empty columns: Each separator is treated as an individual column separator and the column is considered empty. |
The above two options are especially useful for data separated by blanks.
| • | Expected format: Select how the numeric values are formatted. This option allows you to extract numeric values that use blank, comma or points as decimal and thousand separators. |
| • | The value can be negative: Specify if the numeric values that you are looking for can be negative. |
 | If Monitoring Studio does not find a number at the specified location, no numeric value will be extracted and the PATROL graph will not be refreshed (space characters are ignored). |
Step 3: Value selection from multiple matches

Numeric Value Extraction Wizard — Additional Options Page
If several values are found in the searched text, it is necessary to identify which one should be used to set the parameter value and build the graph in the PATROL Console.
| • | The possible choices are: |
| ▪ | Keep the first value found |
| ▪ | Keep the last value found (default) |
Step 4: Parameter Selection
| • | Select the parameters you wish to collect. |

Numeric Value Extraction Wizard — Parameters Selection Page
| ▪ | Value: Reports the actual value collected upon data polling |
| ▪ | Delta: Calculates the difference between values collected during two consecutive polling. |
| ▪ | DeltaPerSecond: Reports the value resulting of the division of the Delta by the number of seconds elapsed between the collection times |
| • | Select the option "Discard negative Delta values" if you do not want negative values to be reported on the graph. |
| • | Use the Rescaling option to configure Monitoring Studio to rescale the value that is being extracted in order to have a more readable graph in the PATROL Console. The available rescaling options are: |
| ▪ | Divide the value by a value that then gives you the reading in terms best suited to you |
| ▪ | Multiply the extracted value by a constant factor |
This can be useful if you extract numeric values in bytes but prefer to show a graph in megabytes. In such a case, you would divide the values by 1048576 (1024*1024).
Step 5: Monitoring Studio settings

Numeric Value Extraction Wizard — Settings Page
| • | Object display name: Label displayed in the PATROL Console. |
| • | Object internal identifier (ID): PATROL internal identifier of this monitored object. |
| • | What thresholds do you want to set for the newly created instance? A drop-down list allows you to select the mode of setting alert thresholds: |
| ▪ | Use default thresholds: Uses the default thresholds set by Monitoring Studio |
| ▪ | Set custom thresholds: Allows you to customize the thresholds for all parameters of the instance |
| ▪ | Use default thresholds and customize them: Sets the default Monitoring Studio thresholds on certain parameters (see list of parameters with default thresholds) and then allows you to customize any/all of them. This is mainly intended to help save time if you wish to customize the thresholds of just one of many parameters for the instance, and leave the default settings for the others. |
 | If you select Use default thresholds and customize them; on clicking Finish, the Set Thresholds panel will appear, and certain parameters for the instance may appear with an asterisk symbol - indicating that they already have thresholds. You can then customize (any/all) the thresholds of the parameters as per your specific needs. |
| ▪ | Do not set any thresholds for now: No thresholds will be set on any parameter of the instance, and as a result no alerts will be triggered. Monitoring Studio will poll the object and return the output of the polling, but will not raise any alerts until you set thresholds. |
 | Thresholds can be set or modified at anytime by right-clicking on the instance > KM commands > Set Thresholds. |
Numeric value search objects are instances of the SW_NUMBERS class.
See Also
File monitoring and analysis
String Search
SW_NUMBERS
|