SqlCondition(mapping=None, *, ignore_unknown_fields=False, **kwargs)
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.
This message has oneof
_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes |
|
---|---|
Name | Description |
query |
str
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 |
minutes |
google.cloud.monitoring_v3.types.AlertPolicy.Condition.SqlCondition.Minutes
Schedule the query to execute every so many minutes. This field is a member of oneof _ schedule .
|
hourly |
google.cloud.monitoring_v3.types.AlertPolicy.Condition.SqlCondition.Hourly
Schedule the query to execute every so many hours. This field is a member of oneof _ schedule .
|
daily |
google.cloud.monitoring_v3.types.AlertPolicy.Condition.SqlCondition.Daily
Schedule the query to execute every so many days. This field is a member of oneof _ schedule .
|
row_count_test |
google.cloud.monitoring_v3.types.AlertPolicy.Condition.SqlCondition.RowCountTest
Test the row count against a threshold. This field is a member of oneof _ evaluate .
|
boolean_test |
google.cloud.monitoring_v3.types.AlertPolicy.Condition.SqlCondition.BooleanTest
Test the boolean value in the indicated column. This field is a member of oneof _ evaluate .
|
Classes
BooleanTest
BooleanTest(mapping=None, *, ignore_unknown_fields=False, **kwargs)
A test that uses an alerting result in a boolean column produced by the SQL query.
Daily
Daily(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Used to schedule the query to run every so many days.
Hourly
Hourly(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Used to schedule the query to run every so many hours.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Minutes
Minutes(mapping=None, *, ignore_unknown_fields=False, **kwargs)
Used to schedule the query to run every so many minutes.
RowCountTest
RowCountTest(mapping=None, *, ignore_unknown_fields=False, **kwargs)
A test that checks if the number of rows in the result set violates some threshold.