Get
|
|||||
|
|
Gets a single alerting policy
Authorization
To use this building block you will have to grant access to at least one of the following scopes:
- View and manage your data across Google Cloud Platform services
- View and write monitoring data for all of your Google and third-party Cloud and API projects
- View monitoring data for all of your Google Cloud and third-party projects
Input
This building block consumes 1 input parameters
Name | Format | Description |
---|---|---|
name Required |
STRING |
The alerting policy to retrieve. The format is projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] |
= Parameter name
= Format
name STRING Required The alerting policy to retrieve. The format is projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] |
Output
This building block provides 37 output parameters
Name | Format | Description |
---|---|---|
name |
STRING |
Required if the policy exists. The resource name for this policy. The syntax is: projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] [ALERT_POLICY_ID] is assigned by Stackdriver Monitoring when the policy is created. When calling the alertPolicies.create method, do not include the name field in the alerting policy passed as part of the request |
userLabels |
OBJECT |
User-supplied key/value data to be used for organizing and identifying the AlertPolicy objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter |
userLabels.customKey.value |
STRING |
User-supplied key/value data to be used for organizing and identifying the AlertPolicy objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter |
displayName |
STRING |
A short name or phrase used to identify the policy in dashboards, notifications, and incidents. To avoid confusion, don't use the same display name for multiple policies in the same project. The name is limited to 512 Unicode characters |
combiner |
ENUMERATION |
How to combine the results of multiple conditions to determine if an incident should be opened |
enabled |
BOOLEAN |
Whether or not the policy is enabled. On write, the default interpretation if unset is that the policy is enabled. On read, clients should not make any assumption about the state if it has not been populated. The field should always be populated on List and Get operations, unless a field projection has been specified that strips it out |
conditions[] |
OBJECT |
A condition is a true/false test that determines when an alerting policy should open an incident. If a condition evaluates to true, it signifies that something is wrong |
conditions[].conditionThreshold |
OBJECT |
A condition type that compares a collection of time series against a threshold |
conditions[].conditionThreshold.duration |
ANY |
The amount of time that a time series must violate the threshold to be considered failing. Currently, only values that are a multiple of a minute--e.g., 0, 60, 120, or 300 seconds--are supported. If an invalid value is given, an error will be returned. When choosing a duration, it is useful to keep in mind the frequency of the underlying time series data (which may also be affected by any alignments specified in the aggregations field); a good duration is long enough so that a single outlier does not generate spurious alerts, but short enough that unhealthy states are detected and alerted on quickly |
conditions[].conditionThreshold.filter |
STRING |
A filter that identifies which time series should be compared with the threshold.The filter is similar to the one that is specified in the MetricService.ListTimeSeries request (that call is useful to verify the time series that will be retrieved / processed) and must specify the metric type and optionally may contain restrictions on resource type, resource labels, and metric labels. This field may not exceed 2048 Unicode characters in length |
conditions[].conditionThreshold.denominatorAggregations[] |
OBJECT |
Describes how to combine multiple time series to provide different views of the data. Aggregation consists of an alignment step on individual time series (alignment_period and per_series_aligner) followed by an optional reduction step of the data across the aligned time series (cross_series_reducer and group_by_fields). For more details, see Aggregation |
conditions[].conditionThreshold.denominatorFilter |
STRING |
A filter that identifies a time series that should be used as the denominator of a ratio that will be compared with the threshold. If a denominator_filter is specified, the time series specified by the filter field will be used as the numerator.The filter is similar to the one that is specified in the MetricService.ListTimeSeries request (that call is useful to verify the time series that will be retrieved / processed) and must specify the metric type and optionally may contain restrictions on resource type, resource labels, and metric labels. This field may not exceed 2048 Unicode characters in length |
conditions[].conditionThreshold.aggregations[] |
OBJECT |
Describes how to combine multiple time series to provide different views of the data. Aggregation consists of an alignment step on individual time series (alignment_period and per_series_aligner) followed by an optional reduction step of the data across the aligned time series (cross_series_reducer and group_by_fields). For more details, see Aggregation |
conditions[].conditionThreshold.trigger |
OBJECT |
Specifies how many time series must fail a predicate to trigger a condition. If not specified, then a {count: 1} trigger is used |
conditions[].conditionThreshold.trigger.count |
INTEGER |
The absolute number of time series that must fail the predicate for the condition to be triggered |
conditions[].conditionThreshold.trigger.percent |
NUMBER |
The percentage of time series that must fail the predicate for the condition to be triggered |
conditions[].conditionThreshold.comparison |
ENUMERATION |
The comparison to apply between the time series (indicated by filter and aggregation) and the threshold (indicated by threshold_value). The comparison is applied on each time series, with the time series on the left-hand side and the threshold on the right-hand side.Only COMPARISON_LT and COMPARISON_GT are supported currently |
conditions[].conditionThreshold.thresholdValue |
NUMBER |
A value against which to compare the time series |
conditions[].conditionAbsent |
OBJECT |
A condition type that checks that monitored resources are reporting data. The configuration defines a metric and a set of monitored resources. The predicate is considered in violation when a time series for the specified metric of a monitored resource does not include any data in the specified duration |
conditions[].conditionAbsent.trigger |
OBJECT |
Specifies how many time series must fail a predicate to trigger a condition. If not specified, then a {count: 1} trigger is used |
conditions[].conditionAbsent.trigger.count |
INTEGER |
The absolute number of time series that must fail the predicate for the condition to be triggered |
conditions[].conditionAbsent.trigger.percent |
NUMBER |
The percentage of time series that must fail the predicate for the condition to be triggered |
conditions[].conditionAbsent.filter |
STRING |
A filter that identifies which time series should be compared with the threshold.The filter is similar to the one that is specified in the MetricService.ListTimeSeries request (that call is useful to verify the time series that will be retrieved / processed) and must specify the metric type and optionally may contain restrictions on resource type, resource labels, and metric labels. This field may not exceed 2048 Unicode characters in length |
conditions[].conditionAbsent.duration |
ANY |
The amount of time that a time series must fail to report new data to be considered failing. Currently, only values that are a multiple of a minute--e.g. 60, 120, or 300 seconds--are supported. If an invalid value is given, an error will be returned. The Duration.nanos field is ignored |
conditions[].conditionAbsent.aggregations[] |
OBJECT |
Describes how to combine multiple time series to provide different views of the data. Aggregation consists of an alignment step on individual time series (alignment_period and per_series_aligner) followed by an optional reduction step of the data across the aligned time series (cross_series_reducer and group_by_fields). For more details, see Aggregation |
conditions[].name |
STRING |
Required if the condition exists. The unique resource name for this condition. Its syntax is: projects/[PROJECT_ID]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] [CONDITION_ID] is assigned by Stackdriver Monitoring when the condition is created as part of a new or updated alerting policy.When calling the alertPolicies.create method, do not include the name field in the conditions of the requested alerting policy. Stackdriver Monitoring creates the condition identifiers and includes them in the new policy.When calling the alertPolicies.update method to update a policy, including a condition name causes the existing condition to be updated. Conditions without names are added to the updated policy. Existing conditions are deleted if they are not updated.Best practice is to preserve [CONDITION_ID] if you make only small changes, such as those to condition thresholds, durations, or trigger values. Otherwise, treat the change as a new condition and let the existing condition be deleted |
conditions[].displayName |
STRING |
A short name or phrase used to identify the condition in dashboards, notifications, and incidents. To avoid confusion, don't use the same display name for multiple conditions in the same policy |
creationRecord |
OBJECT |
Describes a change made to a configuration |
creationRecord.mutateTime |
ANY |
When the change occurred |
creationRecord.mutatedBy |
STRING |
The email address of the user making the change |
documentation |
OBJECT |
A content string and a MIME type that describes the content string's format |
documentation.content |
STRING |
The text of the documentation, interpreted according to mime_type. The content may not exceed 8,192 Unicode characters and may not exceed more than 10,240 bytes when encoded in UTF-8 format, whichever is smaller |
documentation.mimeType |
STRING |
The format of the content field. Presently, only the value "text/markdown" is supported. See Markdown (https://en.wikipedia.org/wiki/Markdown) for more information |
mutationRecord |
OBJECT |
Describes a change made to a configuration |
mutationRecord.mutateTime |
ANY |
When the change occurred |
mutationRecord.mutatedBy |
STRING |
The email address of the user making the change |
notificationChannels[] |
STRING |
= Parameter name
= Format
name STRING Required if the policy exists. The resource name for this policy. The syntax is: projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID] [ALERT_POLICY_ID] is assigned by Stackdriver Monitoring when the policy is created. When calling the alertPolicies.create method, do not include the name field in the alerting policy passed as part of the request |
userLabels OBJECT User-supplied key/value data to be used for organizing and identifying the AlertPolicy objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter |
userLabels.customKey.value STRING User-supplied key/value data to be used for organizing and identifying the AlertPolicy objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter |
displayName STRING A short name or phrase used to identify the policy in dashboards, notifications, and incidents. To avoid confusion, don't use the same display name for multiple policies in the same project. The name is limited to 512 Unicode characters |
combiner ENUMERATION How to combine the results of multiple conditions to determine if an incident should be opened |
enabled BOOLEAN Whether or not the policy is enabled. On write, the default interpretation if unset is that the policy is enabled. On read, clients should not make any assumption about the state if it has not been populated. The field should always be populated on List and Get operations, unless a field projection has been specified that strips it out |
conditions[] OBJECT A condition is a true/false test that determines when an alerting policy should open an incident. If a condition evaluates to true, it signifies that something is wrong |
conditions[].conditionThreshold OBJECT A condition type that compares a collection of time series against a threshold |
conditions[].conditionThreshold.duration ANY The amount of time that a time series must violate the threshold to be considered failing. Currently, only values that are a multiple of a minute--e.g., 0, 60, 120, or 300 seconds--are supported. If an invalid value is given, an error will be returned. When choosing a duration, it is useful to keep in mind the frequency of the underlying time series data (which may also be affected by any alignments specified in the aggregations field); a good duration is long enough so that a single outlier does not generate spurious alerts, but short enough that unhealthy states are detected and alerted on quickly |
conditions[].conditionThreshold.filter STRING A filter that identifies which time series should be compared with the threshold.The filter is similar to the one that is specified in the MetricService.ListTimeSeries request (that call is useful to verify the time series that will be retrieved / processed) and must specify the metric type and optionally may contain restrictions on resource type, resource labels, and metric labels. This field may not exceed 2048 Unicode characters in length |
conditions[].conditionThreshold.denominatorAggregations[] OBJECT Describes how to combine multiple time series to provide different views of the data. Aggregation consists of an alignment step on individual time series (alignment_period and per_series_aligner) followed by an optional reduction step of the data across the aligned time series (cross_series_reducer and group_by_fields). For more details, see Aggregation |
conditions[].conditionThreshold.denominatorFilter STRING A filter that identifies a time series that should be used as the denominator of a ratio that will be compared with the threshold. If a denominator_filter is specified, the time series specified by the filter field will be used as the numerator.The filter is similar to the one that is specified in the MetricService.ListTimeSeries request (that call is useful to verify the time series that will be retrieved / processed) and must specify the metric type and optionally may contain restrictions on resource type, resource labels, and metric labels. This field may not exceed 2048 Unicode characters in length |
conditions[].conditionThreshold.aggregations[] OBJECT Describes how to combine multiple time series to provide different views of the data. Aggregation consists of an alignment step on individual time series (alignment_period and per_series_aligner) followed by an optional reduction step of the data across the aligned time series (cross_series_reducer and group_by_fields). For more details, see Aggregation |
conditions[].conditionThreshold.trigger OBJECT Specifies how many time series must fail a predicate to trigger a condition. If not specified, then a {count: 1} trigger is used |
conditions[].conditionThreshold.trigger.count INTEGER The absolute number of time series that must fail the predicate for the condition to be triggered |
conditions[].conditionThreshold.trigger.percent NUMBER The percentage of time series that must fail the predicate for the condition to be triggered |
conditions[].conditionThreshold.comparison ENUMERATION The comparison to apply between the time series (indicated by filter and aggregation) and the threshold (indicated by threshold_value). The comparison is applied on each time series, with the time series on the left-hand side and the threshold on the right-hand side.Only COMPARISON_LT and COMPARISON_GT are supported currently |
conditions[].conditionThreshold.thresholdValue NUMBER A value against which to compare the time series |
conditions[].conditionAbsent OBJECT A condition type that checks that monitored resources are reporting data. The configuration defines a metric and a set of monitored resources. The predicate is considered in violation when a time series for the specified metric of a monitored resource does not include any data in the specified duration |
conditions[].conditionAbsent.trigger OBJECT Specifies how many time series must fail a predicate to trigger a condition. If not specified, then a {count: 1} trigger is used |
conditions[].conditionAbsent.trigger.count INTEGER The absolute number of time series that must fail the predicate for the condition to be triggered |
conditions[].conditionAbsent.trigger.percent NUMBER The percentage of time series that must fail the predicate for the condition to be triggered |
conditions[].conditionAbsent.filter STRING A filter that identifies which time series should be compared with the threshold.The filter is similar to the one that is specified in the MetricService.ListTimeSeries request (that call is useful to verify the time series that will be retrieved / processed) and must specify the metric type and optionally may contain restrictions on resource type, resource labels, and metric labels. This field may not exceed 2048 Unicode characters in length |
conditions[].conditionAbsent.duration ANY The amount of time that a time series must fail to report new data to be considered failing. Currently, only values that are a multiple of a minute--e.g. 60, 120, or 300 seconds--are supported. If an invalid value is given, an error will be returned. The Duration.nanos field is ignored |
conditions[].conditionAbsent.aggregations[] OBJECT Describes how to combine multiple time series to provide different views of the data. Aggregation consists of an alignment step on individual time series (alignment_period and per_series_aligner) followed by an optional reduction step of the data across the aligned time series (cross_series_reducer and group_by_fields). For more details, see Aggregation |
conditions[].name STRING Required if the condition exists. The unique resource name for this condition. Its syntax is: projects/[PROJECT_ID]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] [CONDITION_ID] is assigned by Stackdriver Monitoring when the condition is created as part of a new or updated alerting policy.When calling the alertPolicies.create method, do not include the name field in the conditions of the requested alerting policy. Stackdriver Monitoring creates the condition identifiers and includes them in the new policy.When calling the alertPolicies.update method to update a policy, including a condition name causes the existing condition to be updated. Conditions without names are added to the updated policy. Existing conditions are deleted if they are not updated.Best practice is to preserve [CONDITION_ID] if you make only small changes, such as those to condition thresholds, durations, or trigger values. Otherwise, treat the change as a new condition and let the existing condition be deleted |
conditions[].displayName STRING A short name or phrase used to identify the condition in dashboards, notifications, and incidents. To avoid confusion, don't use the same display name for multiple conditions in the same policy |
creationRecord OBJECT Describes a change made to a configuration |
creationRecord.mutateTime ANY When the change occurred |
creationRecord.mutatedBy STRING The email address of the user making the change |
documentation OBJECT A content string and a MIME type that describes the content string's format |
documentation.content STRING The text of the documentation, interpreted according to mime_type. The content may not exceed 8,192 Unicode characters and may not exceed more than 10,240 bytes when encoded in UTF-8 format, whichever is smaller |
documentation.mimeType STRING The format of the content field. Presently, only the value "text/markdown" is supported. See Markdown (https://en.wikipedia.org/wiki/Markdown) for more information |
mutationRecord OBJECT Describes a change made to a configuration |
mutationRecord.mutateTime ANY When the change occurred |
mutationRecord.mutatedBy STRING The email address of the user making the change |
notificationChannels[] STRING |