Skip to content

Commit

Permalink
update documentation field on resource monitoring_alert_policy (#4364) (
Browse files Browse the repository at this point in the history
#8114)

* update documentation field on resource monitoring_alert_policy

* update documentation field on resource monitoring_alert_policy

Co-authored-by: Joe Marty <[email protected]>
Signed-off-by: Modular Magician <[email protected]>

Co-authored-by: Joe Marty <[email protected]>
  • Loading branch information
modular-magician and Joe Marty authored Jan 5, 2021
1 parent 35d1bf7 commit 4bded62
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 39 deletions.
3 changes: 3 additions & 0 deletions .changelog/4364.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
9 changes: 5 additions & 4 deletions google/resource_monitoring_alert_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -682,10 +682,11 @@ name is limited to 512 Unicode characters.`,
"documentation": {
Type: schema.TypeList,
Optional: true,
Description: `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.`,
Description: `Documentation that is included with notifications and incidents related
to this policy. Best practice is for the documentation to include information
to help responders understand, mitigate, escalate, and correct the underlying
problems detected by the alerting policy. Notification channels that have
limited capacity might not show this documentation.`,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
Expand Down
34 changes: 17 additions & 17 deletions google/resource_monitoring_metric_descriptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,24 +116,24 @@ func resourceMonitoringMetricDescriptor() *schema.Resource {
Optional: true,
ForceNew: true,
Description: `The units in which the metric value is reported. It is only applicable if the
valueType is INT64, DOUBLE, or DISTRIBUTION. The unit defines the representation of
the stored metric values.
Different systems may scale the values to be more easily displayed (so a value of
0.02KBy might be displayed as 20By, and a value of 3523KBy might be displayed as
3.5MBy). However, if the unit is KBy, then the value of the metric is always in
thousands of bytes, no matter how it may be displayed.
If you want a custom metric to record the exact number of CPU-seconds used by a job,
you can create an INT64 CUMULATIVE metric whose unit is s{CPU} (or equivalently
1s{CPU} or just s). If the job uses 12,005 CPU-seconds, then the value is written as
12005.
Alternatively, if you want a custom metric to record data in a more granular way, you
can create a DOUBLE CUMULATIVE metric whose unit is ks{CPU}, and then write the value
12.005 (which is 12005/1000), or use Kis{CPU} and write 11.723 (which is 12005/1024).
valueType is INT64, DOUBLE, or DISTRIBUTION. The unit defines the representation of
the stored metric values.
Different systems may scale the values to be more easily displayed (so a value of
0.02KBy might be displayed as 20By, and a value of 3523KBy might be displayed as
3.5MBy). However, if the unit is KBy, then the value of the metric is always in
thousands of bytes, no matter how it may be displayed.
If you want a custom metric to record the exact number of CPU-seconds used by a job,
you can create an INT64 CUMULATIVE metric whose unit is s{CPU} (or equivalently
1s{CPU} or just s). If the job uses 12,005 CPU-seconds, then the value is written as
12005.
Alternatively, if you want a custom metric to record data in a more granular way, you
can create a DOUBLE CUMULATIVE metric whose unit is ks{CPU}, and then write the value
12.005 (which is 12005/1000), or use Kis{CPU} and write 11.723 (which is 12005/1024).
The supported units are a subset of The Unified Code for Units of Measure standard.
More info can be found in the API documentation
More info can be found in the API documentation
(https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors).`,
},
"monitored_resource_types": {
Expand Down
9 changes: 5 additions & 4 deletions website/docs/r/monitoring_alert_policy.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -666,10 +666,11 @@ The `aggregations` block supports:

* `documentation` -
(Optional)
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.
Documentation that is included with notifications and incidents related
to this policy. Best practice is for the documentation to include information
to help responders understand, mitigate, escalate, and correct the underlying
problems detected by the alerting policy. Notification channels that have
limited capacity might not show this documentation.
Structure is documented below.

* `project` - (Optional) The ID of the project in which the resource belongs.
Expand Down
28 changes: 14 additions & 14 deletions website/docs/r/monitoring_metric_descriptor.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,21 @@ The following arguments are supported:
* `unit` -
(Optional)
The units in which the metric value is reported. It is only applicable if the
valueType is INT64, DOUBLE, or DISTRIBUTION. The unit defines the representation of
the stored metric values.
Different systems may scale the values to be more easily displayed (so a value of
0.02KBy might be displayed as 20By, and a value of 3523KBy might be displayed as
3.5MBy). However, if the unit is KBy, then the value of the metric is always in
thousands of bytes, no matter how it may be displayed.
If you want a custom metric to record the exact number of CPU-seconds used by a job,
you can create an INT64 CUMULATIVE metric whose unit is s{CPU} (or equivalently
1s{CPU} or just s). If the job uses 12,005 CPU-seconds, then the value is written as
12005.
Alternatively, if you want a custom metric to record data in a more granular way, you
can create a DOUBLE CUMULATIVE metric whose unit is ks{CPU}, and then write the value
12.005 (which is 12005/1000), or use Kis{CPU} and write 11.723 (which is 12005/1024).
valueType is INT64, DOUBLE, or DISTRIBUTION. The unit defines the representation of
the stored metric values.
Different systems may scale the values to be more easily displayed (so a value of
0.02KBy might be displayed as 20By, and a value of 3523KBy might be displayed as
3.5MBy). However, if the unit is KBy, then the value of the metric is always in
thousands of bytes, no matter how it may be displayed.
If you want a custom metric to record the exact number of CPU-seconds used by a job,
you can create an INT64 CUMULATIVE metric whose unit is s{CPU} (or equivalently
1s{CPU} or just s). If the job uses 12,005 CPU-seconds, then the value is written as
12005.
Alternatively, if you want a custom metric to record data in a more granular way, you
can create a DOUBLE CUMULATIVE metric whose unit is ks{CPU}, and then write the value
12.005 (which is 12005/1000), or use Kis{CPU} and write 11.723 (which is 12005/1024).
The supported units are a subset of The Unified Code for Units of Measure standard.
More info can be found in the API documentation
More info can be found in the API documentation
(https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors).

* `metadata` -
Expand Down

0 comments on commit 4bded62

Please sign in to comment.