Class: Google::Apis::MonitoringV3::LogMatch
- Inherits:
-
Object
- Object
- Google::Apis::MonitoringV3::LogMatch
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/monitoring_v3/classes.rb,
lib/google/apis/monitoring_v3/representations.rb,
lib/google/apis/monitoring_v3/representations.rb
Overview
A condition type that checks whether a log message from any project monitored by the alert policy’s workspace satisfies the given filter.
Instance Attribute Summary collapse
-
#filter ⇒ String
Required.
-
#label_extractors ⇒ Hash<String,String>
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ LogMatch
constructor
A new instance of LogMatch.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ LogMatch
Returns a new instance of LogMatch.
2187 2188 2189 |
# File 'lib/google/apis/monitoring_v3/classes.rb', line 2187 def initialize(**args) update!(**args) end |
Instance Attribute Details
#filter ⇒ String
Required. A logs-based filter. See Advanced Logs Queries for how this filter
should be constructed.
Corresponds to the JSON property filter
2174 2175 2176 |
# File 'lib/google/apis/monitoring_v3/classes.rb', line 2174 def filter @filter end |
#label_extractors ⇒ Hash<String,String>
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.
Corresponds to the JSON property labelExtractors
2185 2186 2187 |
# File 'lib/google/apis/monitoring_v3/classes.rb', line 2185 def label_extractors @label_extractors end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2192 2193 2194 2195 |
# File 'lib/google/apis/monitoring_v3/classes.rb', line 2192 def update!(**args) @filter = args[:filter] if args.key?(:filter) @label_extractors = args[:label_extractors] if args.key?(:label_extractors) end |