Stackdriver Monitoring V3 Client - Class LogMatch (1.2.2)

Reference documentation and code samples for the Stackdriver Monitoring V3 Client class LogMatch.

A condition type that checks whether a log message in the scoping project satisfies the given filter. Logs from other projects in the metrics scope are not evaluated.

Generated from protobuf message google.monitoring.v3.AlertPolicy.Condition.LogMatch

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ filter string

Required. A logs-based filter. See Advanced Logs Queries for how this filter should be constructed.

↳ label_extractors array|Google\Protobuf\Internal\MapField

Optional. A map from a label key to an extractor expression, which is used to extract the value for this label key. Each entry in this map is a specification for how data should be extracted from log entries that match filter. Each combination of extracted values is treated as a separate rule for the purposes of triggering notifications. Label keys and corresponding values can be used in notifications generated by this condition. Please see the documentation on logs-based metric valueExtractors for syntax and examples.

getFilter

Required. A logs-based filter. See Advanced Logs Queries for how this filter should be constructed.

Generated from protobuf field string filter = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
string

setFilter

Required. A logs-based filter. See Advanced Logs Queries for how this filter should be constructed.

Generated from protobuf field string filter = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getLabelExtractors

Optional. A map from a label key to an extractor expression, which is used to extract the value for this label key. Each entry in this map is a specification for how data should be extracted from log entries that match filter. Each combination of extracted values is treated as a separate rule for the purposes of triggering notifications. Label keys and corresponding values can be used in notifications generated by this condition.

Please see the documentation on logs-based metric valueExtractors for syntax and examples.

Generated from protobuf field map<string, string> label_extractors = 2;

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setLabelExtractors

Optional. A map from a label key to an extractor expression, which is used to extract the value for this label key. Each entry in this map is a specification for how data should be extracted from log entries that match filter. Each combination of extracted values is treated as a separate rule for the purposes of triggering notifications. Label keys and corresponding values can be used in notifications generated by this condition.

Please see the documentation on logs-based metric valueExtractors for syntax and examples.

Generated from protobuf field map<string, string> label_extractors = 2;

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this