package monitoring

Import Path
	cloud.google.com/go/monitoring/apiv3 (on go.dev)

Dependency Relation
	imports 19 packages, and imported by one package

Involved Source Files alert_policy_client.go Package monitoring is an auto-generated package for the Cloud Monitoring API. Manages your Cloud Monitoring data and configurations. Most projects must be associated with a Workspace, with a few exceptions as noted on the individual method pages. The table entries below are presented in alphabetical order, not in order of common use. For explanations of the concepts found in the table entries, read the [Cloud Monitoring documentation](https://cloud.google.com/monitoring/docs). Use of Context The ctx passed to NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them. To close the open connection, use the Close() method. For information about setting deadlines, reusing contexts, and more please visit godoc.org/cloud.google.com/go. Deprecated: Please use cloud.google.com/go/monitoring/apiv3/v2. group_client.go metric_client.go notification_channel_client.go path_funcs.go service_monitoring_client.go uptime_check_client.go
Package-Level Type Names (total 26, in which 24 are exported)
/* sort exporteds by: | */
AlertPolicyCallOptions contains the retry settings for each method of AlertPolicyClient. CreateAlertPolicy []gax.CallOption DeleteAlertPolicy []gax.CallOption GetAlertPolicy []gax.CallOption ListAlertPolicies []gax.CallOption UpdateAlertPolicy []gax.CallOption
AlertPolicyClient is a client for interacting with Cloud Monitoring API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. The call options for this service. Close closes the connection to the API service. The user should invoke this when the client is no longer required. Connection returns a connection to the API service. Deprecated. CreateAlertPolicy creates a new alerting policy. DeleteAlertPolicy deletes an alerting policy. GetAlertPolicy gets a single alerting policy. ListAlertPolicies lists the existing alerting policies for the project. UpdateAlertPolicy updates an alerting policy. You can either replace the entire policy with a new one or replace only certain fields in the current alerting policy by specifying the fields to be updated via updateMask. Returns the updated alerting policy. *T : io.Closer func NewAlertPolicyClient(ctx context.Context, opts ...option.ClientOption) (*AlertPolicyClient, error)
AlertPolicyIterator manages a stream of *monitoringpb.AlertPolicy. InternalFetch is for use by the Google Cloud Libraries only. It is not part of the stable interface of this package. InternalFetch returns results from a single call to the underlying RPC. The number of results is no greater than pageSize. If there are no more results, nextPageToken is empty and err is nil. Response is the raw response for the current page. It must be cast to the RPC response type. Calling Next() or InternalFetch() updates this value. Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done. PageInfo supports pagination. See the google.golang.org/api/iterator package for details. *T : google.golang.org/api/iterator.Pageable func (*AlertPolicyClient).ListAlertPolicies(ctx context.Context, req *monitoringpb.ListAlertPoliciesRequest, opts ...gax.CallOption) *AlertPolicyIterator
GroupCallOptions contains the retry settings for each method of GroupClient. CreateGroup []gax.CallOption DeleteGroup []gax.CallOption GetGroup []gax.CallOption ListGroupMembers []gax.CallOption ListGroups []gax.CallOption UpdateGroup []gax.CallOption
GroupClient is a client for interacting with Cloud Monitoring API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. The call options for this service. Close closes the connection to the API service. The user should invoke this when the client is no longer required. Connection returns a connection to the API service. Deprecated. CreateGroup creates a new group. DeleteGroup deletes an existing group. GetGroup gets a single group. ListGroupMembers lists the monitored resources that are members of a group. ListGroups lists the existing groups. UpdateGroup updates an existing group. You can change any group attributes except name. *T : io.Closer func NewGroupClient(ctx context.Context, opts ...option.ClientOption) (*GroupClient, error)
GroupIterator manages a stream of *monitoringpb.Group. InternalFetch is for use by the Google Cloud Libraries only. It is not part of the stable interface of this package. InternalFetch returns results from a single call to the underlying RPC. The number of results is no greater than pageSize. If there are no more results, nextPageToken is empty and err is nil. Response is the raw response for the current page. It must be cast to the RPC response type. Calling Next() or InternalFetch() updates this value. Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done. PageInfo supports pagination. See the google.golang.org/api/iterator package for details. *T : google.golang.org/api/iterator.Pageable func (*GroupClient).ListGroups(ctx context.Context, req *monitoringpb.ListGroupsRequest, opts ...gax.CallOption) *GroupIterator
MetricCallOptions contains the retry settings for each method of MetricClient. CreateMetricDescriptor []gax.CallOption CreateTimeSeries []gax.CallOption DeleteMetricDescriptor []gax.CallOption GetMetricDescriptor []gax.CallOption GetMonitoredResourceDescriptor []gax.CallOption ListMetricDescriptors []gax.CallOption ListMonitoredResourceDescriptors []gax.CallOption ListTimeSeries []gax.CallOption
MetricClient is a client for interacting with Cloud Monitoring API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. The call options for this service. Close closes the connection to the API service. The user should invoke this when the client is no longer required. Connection returns a connection to the API service. Deprecated. CreateMetricDescriptor creates a new metric descriptor. User-created metric descriptors define custom metrics (at https://cloud.google.com/monitoring/custom-metrics). CreateTimeSeries creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response. DeleteMetricDescriptor deletes a metric descriptor. Only user-created custom metrics (at https://cloud.google.com/monitoring/custom-metrics) can be deleted. GetMetricDescriptor gets a single metric descriptor. This method does not require a Workspace. GetMonitoredResourceDescriptor gets a single monitored resource descriptor. This method does not require a Workspace. ListMetricDescriptors lists metric descriptors that match a filter. This method does not require a Workspace. ListMonitoredResourceDescriptors lists monitored resource descriptors that match a filter. This method does not require a Workspace. ListTimeSeries lists time series that match a filter. This method does not require a Workspace. *T : io.Closer func NewMetricClient(ctx context.Context, opts ...option.ClientOption) (*MetricClient, error)
MetricDescriptorIterator manages a stream of *metricpb.MetricDescriptor. InternalFetch is for use by the Google Cloud Libraries only. It is not part of the stable interface of this package. InternalFetch returns results from a single call to the underlying RPC. The number of results is no greater than pageSize. If there are no more results, nextPageToken is empty and err is nil. Response is the raw response for the current page. It must be cast to the RPC response type. Calling Next() or InternalFetch() updates this value. Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done. PageInfo supports pagination. See the google.golang.org/api/iterator package for details. *T : google.golang.org/api/iterator.Pageable func (*MetricClient).ListMetricDescriptors(ctx context.Context, req *monitoringpb.ListMetricDescriptorsRequest, opts ...gax.CallOption) *MetricDescriptorIterator
MonitoredResourceDescriptorIterator manages a stream of *monitoredrespb.MonitoredResourceDescriptor. InternalFetch is for use by the Google Cloud Libraries only. It is not part of the stable interface of this package. InternalFetch returns results from a single call to the underlying RPC. The number of results is no greater than pageSize. If there are no more results, nextPageToken is empty and err is nil. Response is the raw response for the current page. It must be cast to the RPC response type. Calling Next() or InternalFetch() updates this value. Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done. PageInfo supports pagination. See the google.golang.org/api/iterator package for details. *T : google.golang.org/api/iterator.Pageable func (*MetricClient).ListMonitoredResourceDescriptors(ctx context.Context, req *monitoringpb.ListMonitoredResourceDescriptorsRequest, opts ...gax.CallOption) *MonitoredResourceDescriptorIterator
MonitoredResourceIterator manages a stream of *monitoredrespb.MonitoredResource. InternalFetch is for use by the Google Cloud Libraries only. It is not part of the stable interface of this package. InternalFetch returns results from a single call to the underlying RPC. The number of results is no greater than pageSize. If there are no more results, nextPageToken is empty and err is nil. Response is the raw response for the current page. It must be cast to the RPC response type. Calling Next() or InternalFetch() updates this value. Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done. PageInfo supports pagination. See the google.golang.org/api/iterator package for details. *T : google.golang.org/api/iterator.Pageable func (*GroupClient).ListGroupMembers(ctx context.Context, req *monitoringpb.ListGroupMembersRequest, opts ...gax.CallOption) *MonitoredResourceIterator
NotificationChannelCallOptions contains the retry settings for each method of NotificationChannelClient. CreateNotificationChannel []gax.CallOption DeleteNotificationChannel []gax.CallOption GetNotificationChannel []gax.CallOption GetNotificationChannelDescriptor []gax.CallOption GetNotificationChannelVerificationCode []gax.CallOption ListNotificationChannelDescriptors []gax.CallOption ListNotificationChannels []gax.CallOption SendNotificationChannelVerificationCode []gax.CallOption UpdateNotificationChannel []gax.CallOption VerifyNotificationChannel []gax.CallOption
NotificationChannelClient is a client for interacting with Cloud Monitoring API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. The call options for this service. Close closes the connection to the API service. The user should invoke this when the client is no longer required. Connection returns a connection to the API service. Deprecated. CreateNotificationChannel creates a new notification channel, representing a single notification endpoint such as an email address, SMS number, or PagerDuty service. DeleteNotificationChannel deletes a notification channel. GetNotificationChannel gets a single notification channel. The channel includes the relevant configuration details with which the channel was created. However, the response may truncate or omit passwords, API keys, or other private key matter and thus the response may not be 100% identical to the information that was supplied in the call to the create method. GetNotificationChannelDescriptor gets a single channel descriptor. The descriptor indicates which fields are expected / permitted for a notification channel of the given type. GetNotificationChannelVerificationCode requests a verification code for an already verified channel that can then be used in a call to VerifyNotificationChannel() on a different channel with an equivalent identity in the same or in a different project. This makes it possible to copy a channel between projects without requiring manual reverification of the channel. If the channel is not in the verified state, this method will fail (in other words, this may only be used if the SendNotificationChannelVerificationCode and VerifyNotificationChannel paths have already been used to put the given channel into the verified state). There is no guarantee that the verification codes returned by this method will be of a similar structure or form as the ones that are delivered to the channel via SendNotificationChannelVerificationCode; while VerifyNotificationChannel() will recognize both the codes delivered via SendNotificationChannelVerificationCode() and returned from GetNotificationChannelVerificationCode(), it is typically the case that the verification codes delivered via SendNotificationChannelVerificationCode() will be shorter and also have a shorter expiration (e.g. codes such as “G-123456”) whereas GetVerificationCode() will typically return a much longer, websafe base 64 encoded string that has a longer expiration time. ListNotificationChannelDescriptors lists the descriptors for supported channel types. The use of descriptors makes it possible for new channel types to be dynamically added. ListNotificationChannels lists the notification channels that have been created for the project. SendNotificationChannelVerificationCode causes a verification code to be delivered to the channel. The code can then be supplied in VerifyNotificationChannel to verify the channel. UpdateNotificationChannel updates a notification channel. Fields not specified in the field mask remain unchanged. VerifyNotificationChannel verifies a NotificationChannel by proving receipt of the code delivered to the channel as a result of calling SendNotificationChannelVerificationCode. *T : io.Closer func NewNotificationChannelClient(ctx context.Context, opts ...option.ClientOption) (*NotificationChannelClient, error)
NotificationChannelDescriptorIterator manages a stream of *monitoringpb.NotificationChannelDescriptor. InternalFetch is for use by the Google Cloud Libraries only. It is not part of the stable interface of this package. InternalFetch returns results from a single call to the underlying RPC. The number of results is no greater than pageSize. If there are no more results, nextPageToken is empty and err is nil. Response is the raw response for the current page. It must be cast to the RPC response type. Calling Next() or InternalFetch() updates this value. Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done. PageInfo supports pagination. See the google.golang.org/api/iterator package for details. *T : google.golang.org/api/iterator.Pageable func (*NotificationChannelClient).ListNotificationChannelDescriptors(ctx context.Context, req *monitoringpb.ListNotificationChannelDescriptorsRequest, opts ...gax.CallOption) *NotificationChannelDescriptorIterator
NotificationChannelIterator manages a stream of *monitoringpb.NotificationChannel. InternalFetch is for use by the Google Cloud Libraries only. It is not part of the stable interface of this package. InternalFetch returns results from a single call to the underlying RPC. The number of results is no greater than pageSize. If there are no more results, nextPageToken is empty and err is nil. Response is the raw response for the current page. It must be cast to the RPC response type. Calling Next() or InternalFetch() updates this value. Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done. PageInfo supports pagination. See the google.golang.org/api/iterator package for details. *T : google.golang.org/api/iterator.Pageable func (*NotificationChannelClient).ListNotificationChannels(ctx context.Context, req *monitoringpb.ListNotificationChannelsRequest, opts ...gax.CallOption) *NotificationChannelIterator
ServiceIterator manages a stream of *monitoringpb.Service. InternalFetch is for use by the Google Cloud Libraries only. It is not part of the stable interface of this package. InternalFetch returns results from a single call to the underlying RPC. The number of results is no greater than pageSize. If there are no more results, nextPageToken is empty and err is nil. Response is the raw response for the current page. It must be cast to the RPC response type. Calling Next() or InternalFetch() updates this value. Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done. PageInfo supports pagination. See the google.golang.org/api/iterator package for details. *T : google.golang.org/api/iterator.Pageable func (*ServiceMonitoringClient).ListServices(ctx context.Context, req *monitoringpb.ListServicesRequest, opts ...gax.CallOption) *ServiceIterator
ServiceLevelObjectiveIterator manages a stream of *monitoringpb.ServiceLevelObjective. InternalFetch is for use by the Google Cloud Libraries only. It is not part of the stable interface of this package. InternalFetch returns results from a single call to the underlying RPC. The number of results is no greater than pageSize. If there are no more results, nextPageToken is empty and err is nil. Response is the raw response for the current page. It must be cast to the RPC response type. Calling Next() or InternalFetch() updates this value. Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done. PageInfo supports pagination. See the google.golang.org/api/iterator package for details. *T : google.golang.org/api/iterator.Pageable func (*ServiceMonitoringClient).ListServiceLevelObjectives(ctx context.Context, req *monitoringpb.ListServiceLevelObjectivesRequest, opts ...gax.CallOption) *ServiceLevelObjectiveIterator
ServiceMonitoringCallOptions contains the retry settings for each method of ServiceMonitoringClient. CreateService []gax.CallOption CreateServiceLevelObjective []gax.CallOption DeleteService []gax.CallOption DeleteServiceLevelObjective []gax.CallOption GetService []gax.CallOption GetServiceLevelObjective []gax.CallOption ListServiceLevelObjectives []gax.CallOption ListServices []gax.CallOption UpdateService []gax.CallOption UpdateServiceLevelObjective []gax.CallOption
ServiceMonitoringClient is a client for interacting with Cloud Monitoring API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. The call options for this service. Close closes the connection to the API service. The user should invoke this when the client is no longer required. Connection returns a connection to the API service. Deprecated. CreateService create a Service. CreateServiceLevelObjective create a ServiceLevelObjective for the given Service. DeleteService soft delete this Service. DeleteServiceLevelObjective delete the given ServiceLevelObjective. GetService get the named Service. GetServiceLevelObjective get a ServiceLevelObjective by name. ListServiceLevelObjectives list the ServiceLevelObjectives for the given Service. ListServices list Services for this workspace. UpdateService update this Service. UpdateServiceLevelObjective update the given ServiceLevelObjective. *T : io.Closer func NewServiceMonitoringClient(ctx context.Context, opts ...option.ClientOption) (*ServiceMonitoringClient, error)
TimeSeriesIterator manages a stream of *monitoringpb.TimeSeries. InternalFetch is for use by the Google Cloud Libraries only. It is not part of the stable interface of this package. InternalFetch returns results from a single call to the underlying RPC. The number of results is no greater than pageSize. If there are no more results, nextPageToken is empty and err is nil. Response is the raw response for the current page. It must be cast to the RPC response type. Calling Next() or InternalFetch() updates this value. Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done. PageInfo supports pagination. See the google.golang.org/api/iterator package for details. *T : google.golang.org/api/iterator.Pageable func (*MetricClient).ListTimeSeries(ctx context.Context, req *monitoringpb.ListTimeSeriesRequest, opts ...gax.CallOption) *TimeSeriesIterator
UptimeCheckCallOptions contains the retry settings for each method of UptimeCheckClient. CreateUptimeCheckConfig []gax.CallOption DeleteUptimeCheckConfig []gax.CallOption GetUptimeCheckConfig []gax.CallOption ListUptimeCheckConfigs []gax.CallOption ListUptimeCheckIps []gax.CallOption UpdateUptimeCheckConfig []gax.CallOption
UptimeCheckClient is a client for interacting with Cloud Monitoring API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. The call options for this service. Close closes the connection to the API service. The user should invoke this when the client is no longer required. Connection returns a connection to the API service. Deprecated. CreateUptimeCheckConfig creates a new Uptime check configuration. DeleteUptimeCheckConfig deletes an Uptime check configuration. Note that this method will fail if the Uptime check configuration is referenced by an alert policy or other dependent configs that would be rendered invalid by the deletion. GetUptimeCheckConfig gets a single Uptime check configuration. ListUptimeCheckConfigs lists the existing valid Uptime check configurations for the project (leaving out any invalid configurations). ListUptimeCheckIps returns the list of IP addresses that checkers run from UpdateUptimeCheckConfig updates an Uptime check configuration. You can either replace the entire configuration with a new one or replace only certain fields in the current configuration by specifying the fields to be updated via updateMask. Returns the updated configuration. *T : io.Closer func NewUptimeCheckClient(ctx context.Context, opts ...option.ClientOption) (*UptimeCheckClient, error)
UptimeCheckConfigIterator manages a stream of *monitoringpb.UptimeCheckConfig. InternalFetch is for use by the Google Cloud Libraries only. It is not part of the stable interface of this package. InternalFetch returns results from a single call to the underlying RPC. The number of results is no greater than pageSize. If there are no more results, nextPageToken is empty and err is nil. Response is the raw response for the current page. It must be cast to the RPC response type. Calling Next() or InternalFetch() updates this value. Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done. PageInfo supports pagination. See the google.golang.org/api/iterator package for details. *T : google.golang.org/api/iterator.Pageable func (*UptimeCheckClient).ListUptimeCheckConfigs(ctx context.Context, req *monitoringpb.ListUptimeCheckConfigsRequest, opts ...gax.CallOption) *UptimeCheckConfigIterator
UptimeCheckIpIterator manages a stream of *monitoringpb.UptimeCheckIp. InternalFetch is for use by the Google Cloud Libraries only. It is not part of the stable interface of this package. InternalFetch returns results from a single call to the underlying RPC. The number of results is no greater than pageSize. If there are no more results, nextPageToken is empty and err is nil. Response is the raw response for the current page. It must be cast to the RPC response type. Calling Next() or InternalFetch() updates this value. Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done. PageInfo supports pagination. See the google.golang.org/api/iterator package for details. *T : google.golang.org/api/iterator.Pageable func (*UptimeCheckClient).ListUptimeCheckIps(ctx context.Context, req *monitoringpb.ListUptimeCheckIpsRequest, opts ...gax.CallOption) *UptimeCheckIpIterator
Package-Level Functions (total 28, in which 14 are exported)
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
GroupGroupPath returns the path for the group resource. Deprecated: Use fmt.Sprintf("projects/%s/groups/%s", project, group) instead.
GroupProjectPath returns the path for the project resource. Deprecated: Use fmt.Sprintf("projects/%s", project) instead.
MetricMetricDescriptorPath returns the path for the metric descriptor resource. Deprecated: Use fmt.Sprintf("projects/%s/metricDescriptors/%s", project, metricDescriptor) instead.
MetricMonitoredResourceDescriptorPath returns the path for the monitored resource descriptor resource. Deprecated: Use fmt.Sprintf("projects/%s/monitoredResourceDescriptors/%s", project, monitoredResourceDescriptor) instead.
MetricProjectPath returns the path for the project resource. Deprecated: Use fmt.Sprintf("projects/%s", project) instead.
NewAlertPolicyClient creates a new alert policy service client. The AlertPolicyService API is used to manage (list, create, delete, edit) alert policies in Stackdriver Monitoring. An alerting policy is 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. In addition to using this API, alert policies can also be managed through Stackdriver Monitoring (at https://cloud.google.com/monitoring/docs/), which can be reached by clicking the “Monitoring” tab in Cloud Console (at https://console.cloud.google.com/).
NewGroupClient creates a new group service client. The Group API lets you inspect and manage your groups (at #google.monitoring.v3.Group). A group is a named filter that is used to identify a collection of monitored resources. Groups are typically used to mirror the physical and/or logical topology of the environment. Because group membership is computed dynamically, monitored resources that are started in the future are automatically placed in matching groups. By using a group to name monitored resources in, for example, an alert policy, the target of that alert policy is updated automatically as monitored resources are added and removed from the infrastructure.
NewMetricClient creates a new metric service client. Manages metric descriptors, monitored resource descriptors, and time series data.
NewNotificationChannelClient creates a new notification channel service client. The Notification Channel API provides access to configuration that controls how messages related to incidents are sent.
NewServiceMonitoringClient creates a new service monitoring service client. The Cloud Monitoring Service-Oriented Monitoring API has endpoints for managing and querying aspects of a workspace’s services. These include the Service's monitored resources, its Service-Level Objectives, and a taxonomy of categorized Health Metrics.
NewUptimeCheckClient creates a new uptime check service client. The UptimeCheckService API is used to manage (list, create, delete, edit) Uptime check configurations in the Stackdriver Monitoring product. An Uptime check is a piece of configuration that determines which resources and services to monitor for availability. These configurations can also be configured interactively by navigating to the [Cloud Console] (http://console.cloud.google.com (at http://console.cloud.google.com)), selecting the appropriate project, clicking on “Monitoring” on the left-hand side to navigate to Stackdriver, and then clicking on “Uptime”.
UptimeCheckProjectPath returns the path for the project resource. Deprecated: Use fmt.Sprintf("projects/%s", project) instead.
UptimeCheckUptimeCheckConfigPath returns the path for the uptime check config resource. Deprecated: Use fmt.Sprintf("projects/%s/uptimeCheckConfigs/%s", project, uptimeCheckConfig) instead.
Package-Level Constants (only one, which is unexported)