cloudmonitoring

package
v1.1.7-beta.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2016 License: BSD-3-Clause, Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package cloudmonitoring provides access to the Cloud Monitoring API.

See https://cloud.google.com/monitoring/v2beta2/

Usage example:

import "google.golang.org/api/cloudmonitoring/v2beta2"
...
cloudmonitoringService, err := cloudmonitoring.New(oauthHttpClient)

Index

Constants

View Source
const (
	// View and manage your data across Google Cloud Platform services
	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"

	// View and write monitoring data for all of your Google and third-party
	// Cloud and API projects
	MonitoringScope = "https://www.googleapis.com/auth/monitoring"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteMetricDescriptorResponse

type DeleteMetricDescriptorResponse struct {
	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "cloudmonitoring#deleteMetricDescriptorResponse".
	Kind string `json:"kind,omitempty"`
}

DeleteMetricDescriptorResponse: The response of cloudmonitoring.metricDescriptors.delete.

type ListMetricDescriptorsRequest

type ListMetricDescriptorsRequest struct {
	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "cloudmonitoring#listMetricDescriptorsRequest".
	Kind string `json:"kind,omitempty"`
}

ListMetricDescriptorsRequest: The request of cloudmonitoring.metricDescriptors.list.

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"`
}

ListMetricDescriptorsResponse: The response of cloudmonitoring.metricDescriptors.list.

type ListTimeseriesDescriptorsRequest

type ListTimeseriesDescriptorsRequest struct {
	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "cloudmonitoring#listTimeseriesDescriptorsRequest".
	Kind string `json:"kind,omitempty"`
}

ListTimeseriesDescriptorsRequest: The request of cloudmonitoring.timeseriesDescriptors.list

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"`
}

ListTimeseriesDescriptorsResponse: The response of cloudmonitoring.timeseriesDescriptors.list

type ListTimeseriesRequest

type ListTimeseriesRequest struct {
	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "cloudmonitoring#listTimeseriesRequest".
	Kind string `json:"kind,omitempty"`
}

ListTimeseriesRequest: The request of cloudmonitoring.timeseries.list

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"`
}

ListTimeseriesResponse: The response of cloudmonitoring.timeseries.list

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"`
}

MetricDescriptor: A metricDescriptor defines the name, label keys, and data type of a particular metric.

type MetricDescriptorLabelDescriptor

type MetricDescriptorLabelDescriptor struct {
	// Description: Label description.
	Description string `json:"description,omitempty"`

	// Key: Label key.
	Key string `json:"key,omitempty"`
}

MetricDescriptorLabelDescriptor: A label in a metric is a description of this metric, including the key of this description (what the description is), and the value for this description.

type MetricDescriptorTypeDescriptor

type MetricDescriptorTypeDescriptor struct {
	// MetricType: The method of collecting data for the metric. See Metric
	// types.
	MetricType string `json:"metricType,omitempty"`

	// ValueType: The data type of of individual points in the metric's time
	// series. See Metric value types.
	ValueType string `json:"valueType,omitempty"`
}

MetricDescriptorTypeDescriptor: A type in a metric contains information about how the metric is collected and what its data points look like.

type MetricDescriptorsCreateCall

type MetricDescriptorsCreateCall struct {
	// contains filtered or unexported fields
}

func (*MetricDescriptorsCreateCall) Do

func (*MetricDescriptorsCreateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type MetricDescriptorsDeleteCall

type MetricDescriptorsDeleteCall struct {
	// contains filtered or unexported fields
}

func (*MetricDescriptorsDeleteCall) Do

func (*MetricDescriptorsDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type MetricDescriptorsListCall

type MetricDescriptorsListCall struct {
	// contains filtered or unexported fields
}

func (*MetricDescriptorsListCall) Count

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 (*MetricDescriptorsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*MetricDescriptorsListCall) PageToken

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

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) Create

func (r *MetricDescriptorsService) Create(project string, metricdescriptor *MetricDescriptor) *MetricDescriptorsCreateCall

Create: Create a new metric.

func (*MetricDescriptorsService) Delete

Delete: Delete an existing metric.

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"`
}

Point: Point is a single point in a time series. It consists of a start time, an end time, and a value.

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"`
}

PointDistribution: Distribution data point value type. When writing distribution points, try to be consistent with the boundaries of your buckets. If you must modify the bucket boundaries, then do so by merging, partitioning, or appending rather than skewing them.

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"`
}

PointDistributionBucket: The histogram's bucket. Buckets that form the histogram of a distribution value. If the upper bound of a bucket, say U1, does not equal the lower bound of the next bucket, say L2, this means that there is no event in [U1, L2).

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"`
}

PointDistributionOverflowBucket: The overflow bucket is a special bucket that does not have the upperBound field; it includes all of the events that are no less than its lower bound.

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"`
}

PointDistributionUnderflowBucket: The underflow bucket is a special bucket that does not have the lowerBound field; it includes all of the events that are less than its upper bound.

type Service

type Service struct {
	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment

	MetricDescriptors *MetricDescriptorsService

	Timeseries *TimeseriesService

	TimeseriesDescriptors *TimeseriesDescriptorsService
	// contains filtered or unexported fields
}

func New

func New(client *http.Client) (*Service, error)

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"`
}

Timeseries: The monitoring data is organized as metrics and stored as data points that are recorded over time. Each data point represents information like the CPU utilization of your virtual machine. A historical record of these data points is called a time series.

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"`
}

TimeseriesDescriptor: TimeseriesDescriptor identifies a single time series.

type TimeseriesDescriptorLabel

type TimeseriesDescriptorLabel struct {
	// Key: The label's name.
	Key string `json:"key,omitempty"`

	// Value: The label's value.
	Value string `json:"value,omitempty"`
}

type TimeseriesDescriptorsListCall

type TimeseriesDescriptorsListCall struct {
	// contains filtered or unexported fields
}

func (*TimeseriesDescriptorsListCall) Aggregator

Aggregator sets the optional parameter "aggregator": The aggregation function that will reduce the data points in each window to a single point. This parameter is only valid for non-cumulative metrics with a value type of INT64 or DOUBLE.

Possible values:

"max"
"mean"
"min"
"sum"

func (*TimeseriesDescriptorsListCall) Count

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 (*TimeseriesDescriptorsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*TimeseriesDescriptorsListCall) Labels

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

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

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

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].

func (*TimeseriesDescriptorsListCall) Window

Window sets the optional parameter "window": The sampling window. At most one data point will be returned for each window in the requested time interval. This parameter is only valid for non-cumulative metric types. Units: - m: minute - h: hour - d: day - w: week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d is not allowed; you should use 17d instead.

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) Aggregator

func (c *TimeseriesListCall) Aggregator(aggregator string) *TimeseriesListCall

Aggregator sets the optional parameter "aggregator": The aggregation function that will reduce the data points in each window to a single point. This parameter is only valid for non-cumulative metrics with a value type of INT64 or DOUBLE.

Possible values:

"max"
"mean"
"min"
"sum"

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 (*TimeseriesListCall) Fields

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].

func (*TimeseriesListCall) Window

func (c *TimeseriesListCall) Window(window string) *TimeseriesListCall

Window sets the optional parameter "window": The sampling window. At most one data point will be returned for each window in the requested time interval. This parameter is only valid for non-cumulative metric types. Units: - m: minute - h: hour - d: day - w: week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d is not allowed; you should use 17d instead.

type TimeseriesPoint

type TimeseriesPoint struct {
	// Point: The data point in this time series snapshot.
	Point *Point `json:"point,omitempty"`

	// TimeseriesDesc: The descriptor of this time series.
	TimeseriesDesc *TimeseriesDescriptor `json:"timeseriesDesc,omitempty"`
}

TimeseriesPoint: When writing time series, TimeseriesPoint should be used instead of Timeseries, to enforce single point for each time series in the timeseries.write request.

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.

func (*TimeseriesService) Write

func (r *TimeseriesService) Write(project string, writetimeseriesrequest *WriteTimeseriesRequest) *TimeseriesWriteCall

Write: Put data points to one or more time series for one or more metrics. If a time series does not exist, a new time series will be created. It is not allowed to write a time series point that is older than the existing youngest point of that time series. Points that are older than the existing youngest point of that time series will be discarded silently. Therefore, users should make sure that points of a time series are written sequentially in the order of their end time.

type TimeseriesWriteCall

type TimeseriesWriteCall struct {
	// contains filtered or unexported fields
}

func (*TimeseriesWriteCall) Do

func (*TimeseriesWriteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type WriteTimeseriesRequest

type WriteTimeseriesRequest struct {
	// CommonLabels: The label's name.
	CommonLabels map[string]string `json:"commonLabels,omitempty"`

	// Timeseries: Provide time series specific labels and the data points
	// for each time series. The labels in timeseries and the common_labels
	// should form a complete list of labels that required by the metric.
	Timeseries []*TimeseriesPoint `json:"timeseries,omitempty"`
}

WriteTimeseriesRequest: The request of cloudmonitoring.timeseries.write

type WriteTimeseriesResponse

type WriteTimeseriesResponse struct {
	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "cloudmonitoring#writeTimeseriesResponse".
	Kind string `json:"kind,omitempty"`
}

WriteTimeseriesResponse: The response of cloudmonitoring.timeseries.write

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL