Name
external criterion contains, externalcriterioncontains, kPMExternalCriterionExternalCriterionContains — Output contains a value.
Synopsis
external criterion contains structure { type, source, value };
type : string, choice, default |
source : string, choice, default, optional |
value : string, length 1..16384 |
Description
Output contains a value.
The output is interpreted as a UTF8 string.
If both multiple sources are provided, every source is searched for the value. Only one source needs to contain the value.
If the output contains the value, the sample is returned as 0 (zero) If the output contains the value, the sample is returned as 1 (one).
Zero is used to indicate a successful match because zero equates to success for exit codes. The default sample criterion also uses zero as success.
Fields
type.
type
is a string. If type
is omitted, the default exit code
is used. type
must be contains, kPMExternalCriterionType_Contains
.
source. Sources to search.
Output sources to search. Up to 16KB of content is retained from the external's stdout and stderr stream. The content is taken from the final bytes output; much like the tail command line tool.
source
is a string. If source
is omitted, the default pme:stdout
is used. source
is optional. source
must be one of the following three constants:
- pme:stdout,
kPMExternalCriterionSource_PmeStdout
. - pme:stderr,
kPMExternalCriterionSource_PmeStderr
. - pme:stdout+stderr,
kPMExternalCriterionSource_PmeStdoutStderr
.
value. Value to search for.
value
is a string. value
must be between 1
and 16384
characters long, inclusive.