Skip to content

Commit

Permalink
feat(monitoring): update the API
Browse files Browse the repository at this point in the history
#### monitoring:v3
The following keys were added:
- schemas.Condition.properties.conditionMonitoringQueryLanguage.$ref
- schemas.Condition.properties.conditionMonitoringQueryLanguage.description
- schemas.MonitoringQueryLanguageCondition.description
- schemas.MonitoringQueryLanguageCondition.id
- schemas.MonitoringQueryLanguageCondition.properties.duration.description
- schemas.MonitoringQueryLanguageCondition.properties.duration.format
- schemas.MonitoringQueryLanguageCondition.properties.duration.type
- schemas.MonitoringQueryLanguageCondition.properties.query.description
- schemas.MonitoringQueryLanguageCondition.properties.query.type
- schemas.MonitoringQueryLanguageCondition.properties.trigger.$ref
- schemas.MonitoringQueryLanguageCondition.properties.trigger.description
- schemas.MonitoringQueryLanguageCondition.type

The following keys were changed:
- schemas.MetricAbsence.properties.filter.description
- schemas.MetricThreshold.properties.filter.description
  • Loading branch information
yoshi-automation authored and sofisl committed Oct 20, 2020
1 parent a4968e3 commit a6f7a9a
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 5 deletions.
30 changes: 27 additions & 3 deletions discovery/monitoring-v3.json
Original file line number Diff line number Diff line change
Expand Up @@ -1899,7 +1899,7 @@
}
}
},
"revision": "20200927",
"revision": "20201014",
"rootUrl": "https://monitoring.googleapis.com/",
"schemas": {
"Aggregation": {
Expand Down Expand Up @@ -2323,6 +2323,10 @@
"$ref": "MetricAbsence",
"description": "A condition that checks that a time series continues to receive new data points."
},
"conditionMonitoringQueryLanguage": {
"$ref": "MonitoringQueryLanguageCondition",
"description": "A condition that uses the Monitoring Query Language to define alerts."
},
"conditionThreshold": {
"$ref": "MetricThreshold",
"description": "A condition that compares a time series against a threshold."
Expand Down Expand Up @@ -3300,7 +3304,7 @@
"type": "string"
},
"filter": {
"description": "A filter (https://cloud.google.com/monitoring/api/v3/filters) that identifies which time series should be compared with the threshold.The filter is similar to the one that is specified in the ListTimeSeries request (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (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.",
"description": "A filter (https://cloud.google.com/monitoring/api/v3/filters) that identifies which time series should be compared with the threshold.The filter is similar to the one that is specified in the ListTimeSeries request (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that call is useful to verify the time series that will be retrieved / processed). The filter must specify the metric type and the resource type. Optionally, it can specify resource labels and metric labels. This field must not exceed 2048 Unicode characters in length.",
"type": "string"
},
"trigger": {
Expand Down Expand Up @@ -3523,7 +3527,7 @@
"type": "string"
},
"filter": {
"description": "A filter (https://cloud.google.com/monitoring/api/v3/filters) that identifies which time series should be compared with the threshold.The filter is similar to the one that is specified in the ListTimeSeries request (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (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.",
"description": "A filter (https://cloud.google.com/monitoring/api/v3/filters) that identifies which time series should be compared with the threshold.The filter is similar to the one that is specified in the ListTimeSeries request (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that call is useful to verify the time series that will be retrieved / processed). The filter must specify the metric type and the resource type. Optionally, it can specify resource labels and metric labels. This field must not exceed 2048 Unicode characters in length.",
"type": "string"
},
"thresholdValue": {
Expand Down Expand Up @@ -3632,6 +3636,26 @@
},
"type": "object"
},
"MonitoringQueryLanguageCondition": {
"description": "A condition type that allows alert policies to be defined using Monitoring Query Language.",
"id": "MonitoringQueryLanguageCondition",
"properties": {
"duration": {
"description": "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.",
"format": "google-duration",
"type": "string"
},
"query": {
"description": "Monitoring Query Language query that outputs a boolean stream.",
"type": "string"
},
"trigger": {
"$ref": "Trigger",
"description": "The number/percent of time series for which the comparison must hold in order for the condition to trigger. If unspecified, then the condition will trigger if the comparison is true for any of the time series that have been identified by filter and aggregations, or by the ratio, if denominator_filter and denominator_aggregations are specified."
}
},
"type": "object"
},
"MutationRecord": {
"description": "Describes a change made to a configuration.",
"id": "MutationRecord",
Expand Down
25 changes: 23 additions & 2 deletions src/apis/monitoring/v3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,10 @@ export namespace monitoring_v3 {
* A condition that checks that a time series continues to receive new data points.
*/
conditionAbsent?: Schema$MetricAbsence;
/**
* A condition that uses the Monitoring Query Language to define alerts.
*/
conditionMonitoringQueryLanguage?: Schema$MonitoringQueryLanguageCondition;
/**
* A condition that compares a time series against a threshold.
*/
Expand Down Expand Up @@ -1067,7 +1071,7 @@ export namespace monitoring_v3 {
*/
duration?: string | null;
/**
* A filter (https://cloud.google.com/monitoring/api/v3/filters) that identifies which time series should be compared with the threshold.The filter is similar to the one that is specified in the ListTimeSeries request (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (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.
* A filter (https://cloud.google.com/monitoring/api/v3/filters) that identifies which time series should be compared with the threshold.The filter is similar to the one that is specified in the ListTimeSeries request (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that call is useful to verify the time series that will be retrieved / processed). The filter must specify the metric type and the resource type. Optionally, it can specify resource labels and metric labels. This field must not exceed 2048 Unicode characters in length.
*/
filter?: string | null;
/**
Expand Down Expand Up @@ -1179,7 +1183,7 @@ export namespace monitoring_v3 {
*/
duration?: string | null;
/**
* A filter (https://cloud.google.com/monitoring/api/v3/filters) that identifies which time series should be compared with the threshold.The filter is similar to the one that is specified in the ListTimeSeries request (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (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.
* A filter (https://cloud.google.com/monitoring/api/v3/filters) that identifies which time series should be compared with the threshold.The filter is similar to the one that is specified in the ListTimeSeries request (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that call is useful to verify the time series that will be retrieved / processed). The filter must specify the metric type and the resource type. Optionally, it can specify resource labels and metric labels. This field must not exceed 2048 Unicode characters in length.
*/
filter?: string | null;
/**
Expand Down Expand Up @@ -1246,6 +1250,23 @@ export namespace monitoring_v3 {
*/
userLabels?: {[key: string]: string} | null;
}
/**
* A condition type that allows alert policies to be defined using Monitoring Query Language.
*/
export interface Schema$MonitoringQueryLanguageCondition {
/**
* 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.
*/
duration?: string | null;
/**
* Monitoring Query Language query that outputs a boolean stream.
*/
query?: string | null;
/**
* The number/percent of time series for which the comparison must hold in order for the condition to trigger. If unspecified, then the condition will trigger if the comparison is true for any of the time series that have been identified by filter and aggregations, or by the ratio, if denominator_filter and denominator_aggregations are specified.
*/
trigger?: Schema$Trigger;
}
/**
* Describes a change made to a configuration.
*/
Expand Down

0 comments on commit a6f7a9a

Please sign in to comment.