Reference documentation and code samples for the Cloud Monitoring V3 API class Google::Cloud::Monitoring::V3::AlertPolicy::Condition::Trigger.
Specifies how many time series must fail a predicate to trigger a
condition. If not specified, then a {count: 1} trigger is used.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#count
defcount()->::Integer
Returns
(::Integer) — The absolute number of time series that must fail
the predicate for the condition to be triggered.
Note: The following fields are mutually exclusive: count, percent. If a field in that set is populated, all other fields in the set will automatically be cleared.
#count=
defcount=(value)->::Integer
Parameter
value (::Integer) — The absolute number of time series that must fail
the predicate for the condition to be triggered.
Note: The following fields are mutually exclusive: count, percent. If a field in that set is populated, all other fields in the set will automatically be cleared.
Returns
(::Integer) — The absolute number of time series that must fail
the predicate for the condition to be triggered.
Note: The following fields are mutually exclusive: count, percent. If a field in that set is populated, all other fields in the set will automatically be cleared.
#percent
defpercent()->::Float
Returns
(::Float) — The percentage of time series that must fail the
predicate for the condition to be triggered.
Note: The following fields are mutually exclusive: percent, count. If a field in that set is populated, all other fields in the set will automatically be cleared.
#percent=
defpercent=(value)->::Float
Parameter
value (::Float) — The percentage of time series that must fail the
predicate for the condition to be triggered.
Note: The following fields are mutually exclusive: percent, count. If a field in that set is populated, all other fields in the set will automatically be cleared.
Returns
(::Float) — The percentage of time series that must fail the
predicate for the condition to be triggered.
Note: The following fields are mutually exclusive: percent, count. If a field in that set is populated, all other fields in the set will automatically be cleared.
[[["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::Trigger (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-Trigger)\n- [1.6.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.6.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-Trigger)\n- [1.5.1](/ruby/docs/reference/google-cloud-monitoring-v3/1.5.1/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-Trigger)\n- [1.4.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.4.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-Trigger)\n- [1.3.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.3.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-Trigger)\n- [1.2.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.2.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-Trigger)\n- [1.1.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.1.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-Trigger)\n- [1.0.1](/ruby/docs/reference/google-cloud-monitoring-v3/1.0.1/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-Trigger)\n- [0.18.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.18.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-Trigger)\n- [0.17.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.17.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-Trigger)\n- [0.16.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.16.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-Trigger)\n- [0.15.2](/ruby/docs/reference/google-cloud-monitoring-v3/0.15.2/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-Trigger)\n- [0.14.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.14.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-Trigger)\n- [0.13.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.13.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-Trigger)\n- [0.12.1](/ruby/docs/reference/google-cloud-monitoring-v3/0.12.1/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-Trigger)\n- [0.11.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.11.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-Trigger)\n- [0.10.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.10.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-Trigger)\n- [0.9.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.9.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-Trigger)\n- [0.8.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.8.0/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-Trigger)\n- [0.7.1](/ruby/docs/reference/google-cloud-monitoring-v3/0.7.1/Google-Cloud-Monitoring-V3-AlertPolicy-Condition-Trigger) \nReference documentation and code samples for the Cloud Monitoring V3 API class Google::Cloud::Monitoring::V3::AlertPolicy::Condition::Trigger.\n\nSpecifies how many time series must fail a predicate to trigger a\ncondition. If not specified, then a `{count: 1}` trigger is used. \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### #count\n\n def count() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- The absolute number of time series that must fail the predicate for the condition to be triggered.\n\n Note: The following fields are mutually exclusive: `count`, `percent`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #count=\n\n def count=(value) -\u003e ::Integer\n\n**Parameter**\n\n- **value** (::Integer) --- The absolute number of time series that must fail the predicate for the condition to be triggered.\n\n\nNote: The following fields are mutually exclusive: `count`, `percent`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- (::Integer) --- The absolute number of time series that must fail the predicate for the condition to be triggered.\n\n Note: The following fields are mutually exclusive: `count`, `percent`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #percent\n\n def percent() -\u003e ::Float\n\n**Returns**\n\n- (::Float) --- The percentage of time series that must fail the predicate for the condition to be triggered.\n\n Note: The following fields are mutually exclusive: `percent`, `count`. If a field in that set is populated, all other fields in the set will automatically be cleared.\n\n### #percent=\n\n def percent=(value) -\u003e ::Float\n\n**Parameter**\n\n- **value** (::Float) --- The percentage of time series that must fail the predicate for the condition to be triggered.\n\n\nNote: The following fields are mutually exclusive: `percent`, `count`. If a field in that set is populated, all other fields in the set will automatically be cleared. \n**Returns**\n\n- (::Float) --- The percentage of time series that must fail the predicate for the condition to be triggered.\n\n Note: The following fields are mutually exclusive: `percent`, `count`. If a field in that set is populated, all other fields in the set will automatically be cleared."]]