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.AlertPolicy.properties.alertStrategy.$ref
- schemas.AlertPolicy.properties.alertStrategy.description
- schemas.AlertStrategy.description
- schemas.AlertStrategy.id
- schemas.AlertStrategy.properties.notificationRateLimit.$ref
- schemas.AlertStrategy.properties.notificationRateLimit.description
- schemas.AlertStrategy.type
- schemas.Condition.properties.conditionMatchedLog.$ref
- schemas.Condition.properties.conditionMatchedLog.description
- schemas.LogMatch.description
- schemas.LogMatch.id
- schemas.LogMatch.properties.filter.description
- schemas.LogMatch.properties.filter.type
- schemas.LogMatch.properties.labelExtractors.additionalProperties.type
- schemas.LogMatch.properties.labelExtractors.description
- schemas.LogMatch.properties.labelExtractors.type
- schemas.LogMatch.type
- schemas.NotificationRateLimit.description
- schemas.NotificationRateLimit.id
- schemas.NotificationRateLimit.properties.period.description
- schemas.NotificationRateLimit.properties.period.format
- schemas.NotificationRateLimit.properties.period.type
- schemas.NotificationRateLimit.type
  • Loading branch information
yoshi-automation authored and JustinBeckwith committed Jul 8, 2021
1 parent a33430a commit 5eef4fd
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 1 deletion.
51 changes: 50 additions & 1 deletion discovery/monitoring-v3.json
Expand Up @@ -2541,7 +2541,7 @@
}
}
},
"revision": "20210625",
"revision": "20210702",
"rootUrl": "https://monitoring.googleapis.com/",
"schemas": {
"Aggregation": {
Expand Down Expand Up @@ -2649,6 +2649,10 @@
"description": "A description of the conditions under which some aspect of your system is considered to be \"unhealthy\" and the ways to notify people or services about this state. For an overview of alert policies, see Introduction to Alerting (https://cloud.google.com/monitoring/alerts/).",
"id": "AlertPolicy",
"properties": {
"alertStrategy": {
"$ref": "AlertStrategy",
"description": "Control over how this alert policy's notification channels are notified."
},
"combiner": {
"description": "How to combine the results of multiple conditions to determine if an incident should be opened. If condition_time_series_query_language is present, this must be COMBINE_UNSPECIFIED.",
"enum": [
Expand Down Expand Up @@ -2717,6 +2721,17 @@
},
"type": "object"
},
"AlertStrategy": {
"description": "Control over how the notification channels in notification_channels are notified when this alert fires.",
"id": "AlertStrategy",
"properties": {
"notificationRateLimit": {
"$ref": "NotificationRateLimit",
"description": "Required for alert policies with a LogMatch condition.Providing this for alert policies that are not log-based is unimplemented."
}
},
"type": "object"
},
"AppEngine": {
"description": "App Engine service. Learn more at https://cloud.google.com/appengine.",
"id": "AppEngine",
Expand Down Expand Up @@ -2965,6 +2980,10 @@
"$ref": "MetricAbsence",
"description": "A condition that checks that a time series continues to receive new data points."
},
"conditionMatchedLog": {
"$ref": "LogMatch",
"description": "A condition that checks for log messages matching given constraints. If set, no other conditions can be present."
},
"conditionMonitoringQueryLanguage": {
"$ref": "MonitoringQueryLanguageCondition",
"description": "A condition that uses the Monitoring Query Language to define alerts."
Expand Down Expand Up @@ -3911,6 +3930,24 @@
},
"type": "object"
},
"LogMatch": {
"description": "A condition type that checks whether a log message from any project monitored by the alert policy’s workspace satisfies the given filter.",
"id": "LogMatch",
"properties": {
"filter": {
"description": "Required. A logs-based filter. See Advanced Logs Queries for how this filter should be constructed.",
"type": "string"
},
"labelExtractors": {
"additionalProperties": {
"type": "string"
},
"description": "Optional. A map from a label key to an extractor expression, which is used to extract the value for this label key. Each entry in this map is a specification for how data should be extracted from log entries that match filter. Each combination of extracted values is treated as a separate rule for the purposes of triggering notifications. Label keys and corresponding values can be used in notifications generated by this condition.Please see the documentation on logs-based metric valueExtractors for syntax and examples.",
"type": "object"
}
},
"type": "object"
},
"MeshIstio": {
"description": "Istio service scoped to an Istio mesh. Anthos clusters running ASM < 1.6.8 will have their services ingested as this type.",
"id": "MeshIstio",
Expand Down Expand Up @@ -4453,6 +4490,18 @@
},
"type": "object"
},
"NotificationRateLimit": {
"description": "Control over the rate of notifications sent to this alert policy's notification channels.",
"id": "NotificationRateLimit",
"properties": {
"period": {
"description": "Not more than one notification per period.",
"format": "google-duration",
"type": "string"
}
},
"type": "object"
},
"OperationMetadata": {
"description": "Contains metadata for longrunning operation for the edit Metrics Scope endpoints.",
"id": "OperationMetadata",
Expand Down
44 changes: 44 additions & 0 deletions src/apis/monitoring/v3.ts
Expand Up @@ -158,6 +158,10 @@ export namespace monitoring_v3 {
* A description of the conditions under which some aspect of your system is considered to be "unhealthy" and the ways to notify people or services about this state. For an overview of alert policies, see Introduction to Alerting (https://cloud.google.com/monitoring/alerts/).
*/
export interface Schema$AlertPolicy {
/**
* Control over how this alert policy's notification channels are notified.
*/
alertStrategy?: Schema$AlertStrategy;
/**
* How to combine the results of multiple conditions to determine if an incident should be opened. If condition_time_series_query_language is present, this must be COMBINE_UNSPECIFIED.
*/
Expand Down Expand Up @@ -203,6 +207,15 @@ export namespace monitoring_v3 {
*/
validity?: Schema$Status;
}
/**
* Control over how the notification channels in notification_channels are notified when this alert fires.
*/
export interface Schema$AlertStrategy {
/**
* Required for alert policies with a LogMatch condition.Providing this for alert policies that are not log-based is unimplemented.
*/
notificationRateLimit?: Schema$NotificationRateLimit;
}
/**
* App Engine service. Learn more at https://cloud.google.com/appengine.
*/
Expand Down Expand Up @@ -393,6 +406,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 checks for log messages matching given constraints. If set, no other conditions can be present.
*/
conditionMatchedLog?: Schema$LogMatch;
/**
* A condition that uses the Monitoring Query Language to define alerts.
*/
Expand Down Expand Up @@ -1047,6 +1064,19 @@ export namespace monitoring_v3 {
*/
uptimeCheckIps?: Schema$UptimeCheckIp[];
}
/**
* A condition type that checks whether a log message from any project monitored by the alert policy’s workspace satisfies the given filter.
*/
export interface Schema$LogMatch {
/**
* Required. A logs-based filter. See Advanced Logs Queries for how this filter should be constructed.
*/
filter?: string | null;
/**
* Optional. A map from a label key to an extractor expression, which is used to extract the value for this label key. Each entry in this map is a specification for how data should be extracted from log entries that match filter. Each combination of extracted values is treated as a separate rule for the purposes of triggering notifications. Label keys and corresponding values can be used in notifications generated by this condition.Please see the documentation on logs-based metric valueExtractors for syntax and examples.
*/
labelExtractors?: {[key: string]: string} | null;
}
/**
* Istio service scoped to an Istio mesh. Anthos clusters running ASM < 1.6.8 will have their services ingested as this type.
*/
Expand Down Expand Up @@ -1373,6 +1403,15 @@ export namespace monitoring_v3 {
*/
type?: string | null;
}
/**
* Control over the rate of notifications sent to this alert policy's notification channels.
*/
export interface Schema$NotificationRateLimit {
/**
* Not more than one notification per period.
*/
period?: string | null;
}
/**
* Contains metadata for longrunning operation for the edit Metrics Scope endpoints.
*/
Expand Down Expand Up @@ -2545,6 +2584,7 @@ export namespace monitoring_v3 {
* requestBody: {
* // request body parameters
* // {
* // "alertStrategy": {},
* // "combiner": "my_combiner",
* // "conditions": [],
* // "creationRecord": {},
Expand All @@ -2563,6 +2603,7 @@ export namespace monitoring_v3 {
*
* // Example response
* // {
* // "alertStrategy": {},
* // "combiner": "my_combiner",
* // "conditions": [],
* // "creationRecord": {},
Expand Down Expand Up @@ -2833,6 +2874,7 @@ export namespace monitoring_v3 {
*
* // Example response
* // {
* // "alertStrategy": {},
* // "combiner": "my_combiner",
* // "conditions": [],
* // "creationRecord": {},
Expand Down Expand Up @@ -3124,6 +3166,7 @@ export namespace monitoring_v3 {
* requestBody: {
* // request body parameters
* // {
* // "alertStrategy": {},
* // "combiner": "my_combiner",
* // "conditions": [],
* // "creationRecord": {},
Expand All @@ -3142,6 +3185,7 @@ export namespace monitoring_v3 {
*
* // Example response
* // {
* // "alertStrategy": {},
* // "combiner": "my_combiner",
* // "conditions": [],
* // "creationRecord": {},
Expand Down

0 comments on commit 5eef4fd

Please sign in to comment.