Parameter Types: grep

Created on June 21, 2022

“grep” Parameter Properties

A grep parameter defines report data that comes from searching a log file for a particular string.

Example

{
   "type": "grep",
   "marker": "T2_btime_dsLock_split",
   "search": "Downstream Lock Success=", 
   "logFile": "BootTime.log",
   "use": "absolute"
}

Available Properties

Property

Type

Required

typestringRequired
markerstringRequired
searchstringRequired
logFilestringRequired
usestringOptional
reportEmptybooleanOptional

type


Defines a grep parameter

type

  • is required
  • Type: string

type Constraints

constant: the value of this property must be equal to:

"grep"

marker


The key name to be used for this data in the generated report.

marker

  • is required
  • Type: string


search


The string for which to search within the log file.

search

  • is required
  • Type: string


logFile


The name of the log file to be searched.

logFile

  • is required
  • Type: string


use


This property indicates how the data for this parameter should be gathered and reported.

use

  • is optional
  • Type: string
  • example:
  "use":"count"

use Constraints

enum: the value of this property must be equal to one of the following values:

Value

Explanation

"count"Indicates that the value to report for this parameter is the number of times it has occurred during the reporting interval.
"absolute"Indicates that the value to report for this parameter is the last actual value received, in the case of events, or found in the log file, in the case of greps.
"csv"Indicates that the value to report for this parameter is a comma separated list of all the actual values received, in the case of events, or found in the log file, in the case of greps. NOTE: “csv” is not currently supported in Telemetry 2.0.

use Default Value

The default value is:

"absolute"


reportEmpty


Should this marker name be included in the generated report even if the search string was not found in the log file?

reportEmpty

  • is optional
  • Type: boolean

reportEmpty Default Value

The default value is:

"false"
Go To Top