Documentation
¶
Overview ¶
Package cloudmonitoring provides access to the Cloud Monitoring API.
See https://developers.google.com/cloud-monitoring/
Usage example:
import "code.google.com/p/google-api-go-client/cloudmonitoring/v2beta1" ... cloudmonitoringService, err := cloudmonitoring.New(oauthHttpClient)
Index ¶
- Constants
- type ListMetricDescriptorsRequest
- type ListMetricDescriptorsResponse
- type ListTimeseriesDescriptorsRequest
- type ListTimeseriesDescriptorsResponse
- type ListTimeseriesRequest
- type ListTimeseriesResponse
- type MetricDescriptor
- type MetricDescriptorLabelDescriptor
- type MetricDescriptorTypeDescriptor
- type MetricDescriptorsListCall
- func (c *MetricDescriptorsListCall) Count(count int64) *MetricDescriptorsListCall
- func (c *MetricDescriptorsListCall) Do() (*ListMetricDescriptorsResponse, error)
- func (c *MetricDescriptorsListCall) Fields(s ...googleapi.Field) *MetricDescriptorsListCall
- func (c *MetricDescriptorsListCall) PageToken(pageToken string) *MetricDescriptorsListCall
- func (c *MetricDescriptorsListCall) Query(query string) *MetricDescriptorsListCall
- type MetricDescriptorsService
- type Point
- type PointDistribution
- type PointDistributionBucket
- type PointDistributionOverflowBucket
- type PointDistributionUnderflowBucket
- type Service
- type Timeseries
- type TimeseriesDescriptor
- type TimeseriesDescriptorLabel
- type TimeseriesDescriptorsListCall
- func (c *TimeseriesDescriptorsListCall) Count(count int64) *TimeseriesDescriptorsListCall
- func (c *TimeseriesDescriptorsListCall) Do() (*ListTimeseriesDescriptorsResponse, error)
- func (c *TimeseriesDescriptorsListCall) Fields(s ...googleapi.Field) *TimeseriesDescriptorsListCall
- func (c *TimeseriesDescriptorsListCall) Labels(labels string) *TimeseriesDescriptorsListCall
- func (c *TimeseriesDescriptorsListCall) Oldest(oldest string) *TimeseriesDescriptorsListCall
- func (c *TimeseriesDescriptorsListCall) PageToken(pageToken string) *TimeseriesDescriptorsListCall
- func (c *TimeseriesDescriptorsListCall) Timespan(timespan string) *TimeseriesDescriptorsListCall
- type TimeseriesDescriptorsService
- type TimeseriesListCall
- func (c *TimeseriesListCall) Count(count int64) *TimeseriesListCall
- func (c *TimeseriesListCall) Do() (*ListTimeseriesResponse, error)
- func (c *TimeseriesListCall) Fields(s ...googleapi.Field) *TimeseriesListCall
- func (c *TimeseriesListCall) Labels(labels string) *TimeseriesListCall
- func (c *TimeseriesListCall) Oldest(oldest string) *TimeseriesListCall
- func (c *TimeseriesListCall) PageToken(pageToken string) *TimeseriesListCall
- func (c *TimeseriesListCall) Timespan(timespan string) *TimeseriesListCall
- type TimeseriesService
Constants ¶
const (
// View monitoring data for all of your Google Cloud and API projects
MonitoringReadonlyScope = "https://www.googleapis.com/auth/monitoring.readonly"
)
OAuth2 scopes used by this API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListMetricDescriptorsRequest ¶
type ListMetricDescriptorsRequest struct { // Kind: Identifies what kind of resource this is. Value: the fixed // string "cloudmonitoring#listMetricDescriptorsRequest". Kind string `json:"kind,omitempty"` }
type ListMetricDescriptorsResponse ¶
type ListMetricDescriptorsResponse struct { // Kind: Identifies what kind of resource this is. Value: the fixed // string "cloudmonitoring#listMetricDescriptorsResponse". Kind string `json:"kind,omitempty"` // Metrics: The returned metric descriptors. Metrics []*MetricDescriptor `json:"metrics,omitempty"` // NextPageToken: Pagination token. If present, indicates that // additional results are available for retrieval. To access the results // past the pagination limit, pass this value to the pageToken query // parameter. NextPageToken string `json:"nextPageToken,omitempty"` }
type ListTimeseriesDescriptorsRequest ¶
type ListTimeseriesDescriptorsRequest struct { // Kind: Identifies what kind of resource this is. Value: the fixed // string "cloudmonitoring#listTimeseriesDescriptorsRequest". Kind string `json:"kind,omitempty"` }
type ListTimeseriesDescriptorsResponse ¶
type ListTimeseriesDescriptorsResponse struct { // Kind: Identifies what kind of resource this is. Value: the fixed // string "cloudmonitoring#listTimeseriesDescriptorsResponse". Kind string `json:"kind,omitempty"` // NextPageToken: Pagination token. If present, indicates that // additional results are available for retrieval. To access the results // past the pagination limit, set this value to the pageToken query // parameter. NextPageToken string `json:"nextPageToken,omitempty"` // Oldest: The oldest timestamp of the interval of this query, as an RFC // 3339 string. Oldest string `json:"oldest,omitempty"` // Timeseries: The returned time series descriptors. Timeseries []*TimeseriesDescriptor `json:"timeseries,omitempty"` // Youngest: The youngest timestamp of the interval of this query, as an // RFC 3339 string. Youngest string `json:"youngest,omitempty"` }
type ListTimeseriesRequest ¶
type ListTimeseriesRequest struct { // Kind: Identifies what kind of resource this is. Value: the fixed // string "cloudmonitoring#listTimeseriesRequest". Kind string `json:"kind,omitempty"` }
type ListTimeseriesResponse ¶
type ListTimeseriesResponse struct { // Kind: Identifies what kind of resource this is. Value: the fixed // string "cloudmonitoring#listTimeseriesResponse". Kind string `json:"kind,omitempty"` // NextPageToken: Pagination token. If present, indicates that // additional results are available for retrieval. To access the results // past the pagination limit, set the pageToken query parameter to this // value. All of the points of a time series will be returned before // returning any point of the subsequent time series. NextPageToken string `json:"nextPageToken,omitempty"` // Oldest: The oldest timestamp of the interval of this query as an RFC // 3339 string. Oldest string `json:"oldest,omitempty"` // Timeseries: The returned time series. Timeseries []*Timeseries `json:"timeseries,omitempty"` // Youngest: The youngest timestamp of the interval of this query as an // RFC 3339 string. Youngest string `json:"youngest,omitempty"` }
type MetricDescriptor ¶
type MetricDescriptor struct { // Description: Description of this metric. Description string `json:"description,omitempty"` // Labels: Labels defined for this metric. Labels []*MetricDescriptorLabelDescriptor `json:"labels,omitempty"` // Name: The name of this metric. Name string `json:"name,omitempty"` // Project: The project ID to which the metric belongs. Project string `json:"project,omitempty"` // TypeDescriptor: Type description for this metric. TypeDescriptor *MetricDescriptorTypeDescriptor `json:"typeDescriptor,omitempty"` }
type MetricDescriptorsListCall ¶
type MetricDescriptorsListCall struct {
// contains filtered or unexported fields
}
func (*MetricDescriptorsListCall) Count ¶
func (c *MetricDescriptorsListCall) Count(count int64) *MetricDescriptorsListCall
Count sets the optional parameter "count": Maximum number of metric descriptors per page. Used for pagination. If not specified, count = 100.
func (*MetricDescriptorsListCall) Do ¶
func (c *MetricDescriptorsListCall) Do() (*ListMetricDescriptorsResponse, error)
func (*MetricDescriptorsListCall) Fields ¶
func (c *MetricDescriptorsListCall) Fields(s ...googleapi.Field) *MetricDescriptorsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*MetricDescriptorsListCall) PageToken ¶
func (c *MetricDescriptorsListCall) PageToken(pageToken string) *MetricDescriptorsListCall
PageToken sets the optional parameter "pageToken": The pagination token, which is used to page through large result sets. Set this value to the value of the nextPageToken to retrieve the next page of results.
func (*MetricDescriptorsListCall) Query ¶
func (c *MetricDescriptorsListCall) Query(query string) *MetricDescriptorsListCall
Query sets the optional parameter "query": The query used to search against existing metrics. Separate keywords with a space; the service joins all keywords with AND, meaning that all keywords must match for a metric to be returned. If this field is omitted, all metrics are returned. If an empty string is passed with this field, no metrics are returned.
type MetricDescriptorsService ¶
type MetricDescriptorsService struct {
// contains filtered or unexported fields
}
func NewMetricDescriptorsService ¶
func NewMetricDescriptorsService(s *Service) *MetricDescriptorsService
func (*MetricDescriptorsService) List ¶
func (r *MetricDescriptorsService) List(project string, listmetricdescriptorsrequest *ListMetricDescriptorsRequest) *MetricDescriptorsListCall
List: List metric descriptors that match the query. If the query is not set, then all of the metric descriptors will be returned. Large responses will be paginated, use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken.
type Point ¶
type Point struct { // BoolValue: The value of this data point. Either "true" or "false". BoolValue bool `json:"boolValue,omitempty"` // DistributionValue: The value of this data point as a distribution. A // distribution value can contain a list of buckets and/or an // underflowBucket and an overflowBucket. The values of these points can // be used to create a histogram. DistributionValue *PointDistribution `json:"distributionValue,omitempty"` // DoubleValue: The value of this data point as a double-precision // floating-point number. DoubleValue float64 `json:"doubleValue,omitempty"` // End: The interval [start, end] is the time period to which the // point's value applies. For gauge metrics, whose values are // instantaneous measurements, this interval should be empty (start // should equal end). For cumulative metrics (of which deltas and rates // are special cases), the interval should be non-empty. Both start and // end are RFC 3339 strings. End string `json:"end,omitempty"` // Int64Value: The value of this data point as a 64-bit integer. Int64Value int64 `json:"int64Value,omitempty,string"` // Start: The interval [start, end] is the time period to which the // point's value applies. For gauge metrics, whose values are // instantaneous measurements, this interval should be empty (start // should equal end). For cumulative metrics (of which deltas and rates // are special cases), the interval should be non-empty. Both start and // end are RFC 3339 strings. Start string `json:"start,omitempty"` // StringValue: The value of this data point in string format. StringValue string `json:"stringValue,omitempty"` }
type PointDistribution ¶
type PointDistribution struct { // Buckets: The finite buckets. Buckets []*PointDistributionBucket `json:"buckets,omitempty"` // OverflowBucket: The overflow bucket. OverflowBucket *PointDistributionOverflowBucket `json:"overflowBucket,omitempty"` // UnderflowBucket: The underflow bucket. UnderflowBucket *PointDistributionUnderflowBucket `json:"underflowBucket,omitempty"` }
type PointDistributionBucket ¶
type PointDistributionBucket struct { // Count: The number of events whose values are in the interval defined // by this bucket. Count int64 `json:"count,omitempty,string"` // LowerBound: The lower bound of the value interval of this bucket // (inclusive). LowerBound float64 `json:"lowerBound,omitempty"` // UpperBound: The upper bound of the value interval of this bucket // (exclusive). UpperBound float64 `json:"upperBound,omitempty"` }
type PointDistributionOverflowBucket ¶
type PointDistributionOverflowBucket struct { // Count: The number of events whose values are in the interval defined // by this bucket. Count int64 `json:"count,omitempty,string"` // LowerBound: The lower bound of the value interval of this bucket // (inclusive). LowerBound float64 `json:"lowerBound,omitempty"` }
type PointDistributionUnderflowBucket ¶
type PointDistributionUnderflowBucket struct { // Count: The number of events whose values are in the interval defined // by this bucket. Count int64 `json:"count,omitempty,string"` // UpperBound: The upper bound of the value interval of this bucket // (exclusive). UpperBound float64 `json:"upperBound,omitempty"` }
type Service ¶
type Service struct { BasePath string // API endpoint base URL MetricDescriptors *MetricDescriptorsService Timeseries *TimeseriesService TimeseriesDescriptors *TimeseriesDescriptorsService // contains filtered or unexported fields }
type Timeseries ¶
type Timeseries struct { // Points: The data points of this time series. The points are listed in // order of their end timestamp, from younger to older. Points []*Point `json:"points,omitempty"` // TimeseriesDesc: The descriptor of this time series. TimeseriesDesc *TimeseriesDescriptor `json:"timeseriesDesc,omitempty"` }
type TimeseriesDescriptor ¶
type TimeseriesDescriptor struct { // Labels: The label's name. Labels map[string]string `json:"labels,omitempty"` // Metric: The name of the metric. Metric string `json:"metric,omitempty"` // Project: The Developers Console project number to which this time // series belongs. Project string `json:"project,omitempty"` }
type TimeseriesDescriptorsListCall ¶
type TimeseriesDescriptorsListCall struct {
// contains filtered or unexported fields
}
func (*TimeseriesDescriptorsListCall) Count ¶
func (c *TimeseriesDescriptorsListCall) Count(count int64) *TimeseriesDescriptorsListCall
Count sets the optional parameter "count": Maximum number of time series descriptors per page. Used for pagination. If not specified, count = 100.
func (*TimeseriesDescriptorsListCall) Do ¶
func (c *TimeseriesDescriptorsListCall) Do() (*ListTimeseriesDescriptorsResponse, error)
func (*TimeseriesDescriptorsListCall) Fields ¶
func (c *TimeseriesDescriptorsListCall) Fields(s ...googleapi.Field) *TimeseriesDescriptorsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*TimeseriesDescriptorsListCall) Labels ¶
func (c *TimeseriesDescriptorsListCall) Labels(labels string) *TimeseriesDescriptorsListCall
Labels sets the optional parameter "labels": A collection of labels for the matching time series, which are represented as: - key==value: key equals the value - key=~value: key regex matches the value - key!=value: key does not equal the value - key!~value: key regex does not match the value For example, to list all of the time series descriptors for the region us-central1, you could specify: label=cloud.googleapis.com%2Flocation=~us-central1.*
func (*TimeseriesDescriptorsListCall) Oldest ¶
func (c *TimeseriesDescriptorsListCall) Oldest(oldest string) *TimeseriesDescriptorsListCall
Oldest sets the optional parameter "oldest": Start of the time interval (exclusive), which is expressed as an RFC 3339 timestamp. If neither oldest nor timespan is specified, the default time interval will be (youngest - 4 hours, youngest]
func (*TimeseriesDescriptorsListCall) PageToken ¶
func (c *TimeseriesDescriptorsListCall) PageToken(pageToken string) *TimeseriesDescriptorsListCall
PageToken sets the optional parameter "pageToken": The pagination token, which is used to page through large result sets. Set this value to the value of the nextPageToken to retrieve the next page of results.
func (*TimeseriesDescriptorsListCall) Timespan ¶
func (c *TimeseriesDescriptorsListCall) Timespan(timespan string) *TimeseriesDescriptorsListCall
Timespan sets the optional parameter "timespan": Length of the time interval to query, which is an alternative way to declare the interval: (youngest - timespan, youngest]. The timespan and oldest parameters should not be used together. Units: - s: second - m: minute - h: hour - d: day - w: week Examples: 2s, 3m, 4w. Only one unit is allowed, for example: 2w3d is not allowed; you should use 17d instead.
If neither oldest nor timespan is specified, the default time interval will be (youngest - 4 hours, youngest].
type TimeseriesDescriptorsService ¶
type TimeseriesDescriptorsService struct {
// contains filtered or unexported fields
}
func NewTimeseriesDescriptorsService ¶
func NewTimeseriesDescriptorsService(s *Service) *TimeseriesDescriptorsService
func (*TimeseriesDescriptorsService) List ¶
func (r *TimeseriesDescriptorsService) List(project string, metric string, youngest string, listtimeseriesdescriptorsrequest *ListTimeseriesDescriptorsRequest) *TimeseriesDescriptorsListCall
List: List the descriptors of the time series that match the metric and labels values and that have data points in the interval. Large responses are paginated; use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken.
type TimeseriesListCall ¶
type TimeseriesListCall struct {
// contains filtered or unexported fields
}
func (*TimeseriesListCall) Count ¶
func (c *TimeseriesListCall) Count(count int64) *TimeseriesListCall
Count sets the optional parameter "count": Maximum number of data points per page, which is used for pagination of results.
func (*TimeseriesListCall) Do ¶
func (c *TimeseriesListCall) Do() (*ListTimeseriesResponse, error)
func (*TimeseriesListCall) Fields ¶
func (c *TimeseriesListCall) Fields(s ...googleapi.Field) *TimeseriesListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*TimeseriesListCall) Labels ¶
func (c *TimeseriesListCall) Labels(labels string) *TimeseriesListCall
Labels sets the optional parameter "labels": A collection of labels for the matching time series, which are represented as: - key==value: key equals the value - key=~value: key regex matches the value - key!=value: key does not equal the value - key!~value: key regex does not match the value For example, to list all of the time series descriptors for the region us-central1, you could specify: label=cloud.googleapis.com%2Flocation=~us-central1.*
func (*TimeseriesListCall) Oldest ¶
func (c *TimeseriesListCall) Oldest(oldest string) *TimeseriesListCall
Oldest sets the optional parameter "oldest": Start of the time interval (exclusive), which is expressed as an RFC 3339 timestamp. If neither oldest nor timespan is specified, the default time interval will be (youngest - 4 hours, youngest]
func (*TimeseriesListCall) PageToken ¶
func (c *TimeseriesListCall) PageToken(pageToken string) *TimeseriesListCall
PageToken sets the optional parameter "pageToken": The pagination token, which is used to page through large result sets. Set this value to the value of the nextPageToken to retrieve the next page of results.
func (*TimeseriesListCall) Timespan ¶
func (c *TimeseriesListCall) Timespan(timespan string) *TimeseriesListCall
Timespan sets the optional parameter "timespan": Length of the time interval to query, which is an alternative way to declare the interval: (youngest - timespan, youngest]. The timespan and oldest parameters should not be used together. Units: - s: second - m: minute - h: hour - d: day - w: week Examples: 2s, 3m, 4w. Only one unit is allowed, for example: 2w3d is not allowed; you should use 17d instead.
If neither oldest nor timespan is specified, the default time interval will be (youngest - 4 hours, youngest].
type TimeseriesService ¶
type TimeseriesService struct {
// contains filtered or unexported fields
}
func NewTimeseriesService ¶
func NewTimeseriesService(s *Service) *TimeseriesService
func (*TimeseriesService) List ¶
func (r *TimeseriesService) List(project string, metric string, youngest string, listtimeseriesrequest *ListTimeseriesRequest) *TimeseriesListCall
List: List the data points of the time series that match the metric and labels values and that have data points in the interval. Large responses are paginated; use the nextPageToken returned in the response to request subsequent pages of results by setting the pageToken query parameter to the value of the nextPageToken.