Reference documentation and code samples for the Cloud Monitoring V3 API class Google::Cloud::Monitoring::V3::AlertPolicy::Condition::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.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#filter
deffilter()->::String
Returns
(::String) — Required. A logs-based filter. See Advanced Logs
Queries
for how this filter should be constructed.
#filter=
deffilter=(value)->::String
Parameter
value (::String) — Required. A logs-based filter. See Advanced Logs
Queries
for how this filter should be constructed.
Returns
(::String) — Required. A logs-based filter. See Advanced Logs
Queries
for how this filter should be constructed.
(::Google::Protobuf::Map{::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.
value (::Google::Protobuf::Map{::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.
(::Google::Protobuf::Map{::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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Monitoring V3 API - Class Google::Cloud::Monitoring::V3::AlertPolicy::Condition::LogMatch (v1.6.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.6.1 (latest)](/ruby/docs/reference/google-cloud-monitoring-v3/latest/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-LogMatch)\n- [1.6.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.6.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-LogMatch)\n- [1.5.1](/ruby/docs/reference/google-cloud-monitoring-v3/1.5.1/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-LogMatch)\n- [1.4.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.4.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-LogMatch)\n- [1.3.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.3.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-LogMatch)\n- [1.2.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.2.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-LogMatch)\n- [1.1.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.1.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-LogMatch)\n- [1.0.1](/ruby/docs/reference/google-cloud-monitoring-v3/1.0.1/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-LogMatch)\n- [0.18.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.18.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-LogMatch)\n- [0.17.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.17.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-LogMatch)\n- [0.16.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.16.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-LogMatch)\n- [0.15.2](/ruby/docs/reference/google-cloud-monitoring-v3/0.15.2/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-LogMatch)\n- [0.14.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.14.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-LogMatch)\n- [0.13.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.13.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-LogMatch)\n- [0.12.1](/ruby/docs/reference/google-cloud-monitoring-v3/0.12.1/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-LogMatch)\n- [0.11.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.11.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-LogMatch)\n- [0.10.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.10.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-LogMatch)\n- [0.9.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.9.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-LogMatch)\n- [0.8.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.8.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-LogMatch)\n- [0.7.1](/ruby/docs/reference/google-cloud-monitoring-v3/0.7.1/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-LogMatch) \nReference documentation and code samples for the Cloud Monitoring V3 API class Google::Cloud::Monitoring::V3::AlertPolicy::Condition::LogMatch.\n\nA condition type that checks whether a log message in the [scoping\nproject](https://cloud.google.com/monitoring/api/v3#project_name)\nsatisfies the given filter. Logs from other projects in the metrics\nscope are not evaluated. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #filter\n\n def filter() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Required. A logs-based filter. See [Advanced Logs\n Queries](https://cloud.google.com/logging/docs/view/advanced-queries) for how this filter should be constructed.\n\n### #filter=\n\n def filter=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Required. A logs-based filter. See [Advanced Logs\nQueries](https://cloud.google.com/logging/docs/view/advanced-queries) for how this filter should be constructed. \n**Returns**\n\n- (::String) --- Required. A logs-based filter. See [Advanced Logs\n Queries](https://cloud.google.com/logging/docs/view/advanced-queries) for how this filter should be constructed.\n\n### #label_extractors\n\n def label_extractors() -\u003e ::Google::Protobuf::Map{::String =\u003e ::String}\n\n**Returns**\n\n- (::Google::Protobuf::Map{::String =\\\u003e ::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.\n\n\n Please see [the documentation on logs-based metric\n `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor)\n for syntax and examples.\n\n### #label_extractors=\n\n def label_extractors=(value) -\u003e ::Google::Protobuf::Map{::String =\u003e ::String}\n\n**Parameter**\n\n- **value** (::Google::Protobuf::Map{::String =\\\u003e ::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.\n\n\n Please see [the documentation on logs-based metric\n `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor)\nfor syntax and examples. \n**Returns**\n\n- (::Google::Protobuf::Map{::String =\\\u003e ::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.\n\n\n Please see [the documentation on logs-based metric\n `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor)\n for syntax and examples."]]