Text Pre-Processing

The Text Pre-Processing Monitor allows you to transform a multi-line, XML, JSON, or HTML content into a simpler format (single line, CSV, flat map, etc.) that can be parsed with the String Search, Numeric Value Extraction, Value Map, and Dynamic Object Monitors. To achieve this, Monitoring Studio X only needs to know the lines to be pre-processed and the transformation to be performed.

Once the Text Pre-Processing Monitor is properly configured, Monitoring Studio X will pre-process the content and display the new format in the Results parameter.

Refer to the table below to know how to configure the Text Pre-Processing Monitor.

Property Description
Pre-Process the Results From (Optional) If you need to filter the Monitor output to remove unwanted text before parsing it, select which lines of the result should be scanned:
  • All Lines (default): All lines of the text will be pre-processed. There is no need to provide further information.
  • Line Numbers: Indicate the specific line numbers to be pre-processed. Expected formats:
    • x, y: line x and line y
    • x-y: all lines from x to y inclusive
    • x: only line x
    • x-: all lines from x to the end of the file inclusive.

Process Only Lines That (Optional) Enter the string or regular expression to look for, and specify whether or not it should be contained in the selected lines.
Display Name Name to identify the Text Pre-Processing instance in TrueSight Operations Management.
Internal ID ID to be used to store the Text Pre-Processing Monitor configuration in the PATROL Agent configuration. This Internal ID is automatically generated based on the Display Name provided but can be edited if needed.
Transformation Click Add Transformation and select the transformation to be performed:
  • Convert Multi-Line Records Into A Single Line: Enter the regular expression or string that marks the beginning and/or the end of the record. If the regular expression can match with any part of the first and/or the last line of each paragraph, include the first and/or the last line in the result. Use ^$ to match an empty line.
  • Convert XML to CSV (Comma-Separated Values):
    • Enter the XML tag that defines the record. A sub-object tag can be defined by separating the tags with a backslash (/).
    • List the required properties defined for the XML object. Separate each property with a semi-colon (;). A sub-object property can be selected by separating the sub-object and the property by a greater than sign (>).
    • Specify which separator to use to isolate each property in the output, default semi-colon (;).
  • Convert JSON to CSV (Comma-Separated Values):
    • Enter the JSON entry key that defines the record
    • List the properties defined for the provided JSON entry. Separate each property with a semi-colon (;).
    • Specify which separator to use to isolate each property in the output file, such as dot (.), dash (-), double semi-colon (;), comma (,), pipe, plus sign (+), etc.
  • Convert JSON to Flat Map (Property=Value Pairs). There is no need to provide further information.
  • Extract Text From HTML. There is no need to provide further information.
  • Pre-process Through an External Command: Select this option to process the content through a custom script or utility. You will then have to:
    • Enter the command to be executed on the localhost where your PATROL Agent is installed. The %{INPUTFILE} and %{OUTPUTFILE} macros must be used in the command to pass the selected content to the command and to read the processed output respectively.
    • Enter the regular expression to be found in the output to consider the command successful.


You can now perform string searches, extract numeric values, map values or build dynamic objects from the Results parameter output.

For more information about the parameters available, refer to Studio Text Transform.

No results.