Reference documentation and code samples for the Cloud Monitoring V3 API class Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition.
A condition that allows alerting policies to be defined using GoogleSQL. SQL conditions examine a sliding window of logs using GoogleSQL. Alert policies with SQL conditions may incur additional billing.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#boolean_test
def boolean_test() -> ::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition::BooleanTest
- (::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition::BooleanTest) — Test the boolean value in the indicated column.
#boolean_test=
def boolean_test=(value) -> ::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition::BooleanTest
- value (::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition::BooleanTest) — Test the boolean value in the indicated column.
- (::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition::BooleanTest) — Test the boolean value in the indicated column.
#daily
def daily() -> ::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition::Daily
- (::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition::Daily) — Schedule the query to execute every so many days.
#daily=
def daily=(value) -> ::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition::Daily
- value (::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition::Daily) — Schedule the query to execute every so many days.
- (::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition::Daily) — Schedule the query to execute every so many days.
#hourly
def hourly() -> ::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition::Hourly
- (::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition::Hourly) — Schedule the query to execute every so many hours.
#hourly=
def hourly=(value) -> ::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition::Hourly
- value (::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition::Hourly) — Schedule the query to execute every so many hours.
- (::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition::Hourly) — Schedule the query to execute every so many hours.
#minutes
def minutes() -> ::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition::Minutes
- (::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition::Minutes) — Schedule the query to execute every so many minutes.
#minutes=
def minutes=(value) -> ::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition::Minutes
- value (::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition::Minutes) — Schedule the query to execute every so many minutes.
- (::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition::Minutes) — Schedule the query to execute every so many minutes.
#query
def query() -> ::String
-
(::String) —
Required. The Log Analytics SQL query to run, as a string. The query must conform to the required shape. Specifically, the query must not try to filter the input by time. A filter will automatically be applied to filter the input so that the query receives all rows received since the last time the query was run.
For example, the following query extracts all log entries containing an HTTP request:
SELECT timestamp, log_name, severity, http_request, resource, labels FROM my-project.global._Default._AllLogs WHERE http_request IS NOT NULL
#query=
def query=(value) -> ::String
-
value (::String) —
Required. The Log Analytics SQL query to run, as a string. The query must conform to the required shape. Specifically, the query must not try to filter the input by time. A filter will automatically be applied to filter the input so that the query receives all rows received since the last time the query was run.
For example, the following query extracts all log entries containing an HTTP request:
SELECT timestamp, log_name, severity, http_request, resource, labels FROM my-project.global._Default._AllLogs WHERE http_request IS NOT NULL
-
(::String) —
Required. The Log Analytics SQL query to run, as a string. The query must conform to the required shape. Specifically, the query must not try to filter the input by time. A filter will automatically be applied to filter the input so that the query receives all rows received since the last time the query was run.
For example, the following query extracts all log entries containing an HTTP request:
SELECT timestamp, log_name, severity, http_request, resource, labels FROM my-project.global._Default._AllLogs WHERE http_request IS NOT NULL
#row_count_test
def row_count_test() -> ::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition::RowCountTest
- (::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition::RowCountTest) — Test the row count against a threshold.
#row_count_test=
def row_count_test=(value) -> ::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition::RowCountTest
- value (::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition::RowCountTest) — Test the row count against a threshold.
- (::Google::Cloud::Monitoring::V3::AlertPolicy::Condition::SqlCondition::RowCountTest) — Test the row count against a threshold.