• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5  margin: 0;
6  padding: 0;
7  border: 0;
8  font-weight: inherit;
9  font-style: inherit;
10  font-size: 100%;
11  font-family: inherit;
12  vertical-align: baseline;
13}
14
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50  border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54  margin-top: 0.5em;
55}
56
57.firstline {
58  margin-left: 2 em;
59}
60
61.method  {
62  margin-top: 1em;
63  border: solid 1px #CCC;
64  padding: 1em;
65  background: #EEE;
66}
67
68.details {
69  font-weight: bold;
70  font-size: 14px;
71}
72
73</style>
74
75<h1><a href="monitoring_v3.html">Stackdriver Monitoring API</a> . <a href="monitoring_v3.projects.html">projects</a> . <a href="monitoring_v3.projects.collectdTimeSeries.html">collectdTimeSeries</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#create">create(name, body, x__xgafv=None)</a></code></p>
79<p class="firstline">Stackdriver Monitoring Agent only: Creates a new time series.<aside class="caution">This method is only for use by the Stackdriver Monitoring Agent. Use projects.timeSeries.create instead.</aside></p>
80<h3>Method Details</h3>
81<div class="method">
82    <code class="details" id="create">create(name, body, x__xgafv=None)</code>
83  <pre>Stackdriver Monitoring Agent only: Creates a new time series.<aside class="caution">This method is only for use by the Stackdriver Monitoring Agent. Use projects.timeSeries.create instead.</aside>
84
85Args:
86  name: string, The project in which to create the time series. The format is "projects/PROJECT_ID_OR_NUMBER". (required)
87  body: object, The request body. (required)
88    The object takes the form of:
89
90{ # The CreateCollectdTimeSeries request.
91    "collectdPayloads": [ # The collectd payloads representing the time series data. You must not include more than a single point for each time series, so no two payloads can have the same values for all of the fields plugin, plugin_instance, type, and type_instance.
92      { # A collection of data points sent from a collectd-based plugin. See the collectd documentation for more information.
93        "plugin": "A String", # The name of the plugin. Example: "disk".
94        "typeInstance": "A String", # The measurement type instance. Example: "used".
95        "values": [ # The measured values during this time interval. Each value must have a different dataSourceName.
96          { # A single data point from a collectd-based plugin.
97            "dataSourceType": "A String", # The type of measurement.
98            "dataSourceName": "A String", # The data source for the collectd value. For example there are two data sources for network measurements: "rx" and "tx".
99            "value": { # A single strongly-typed value. # The measurement value.
100              "distributionValue": { # Distribution contains summary statistics for a population of values. It optionally contains a histogram representing the distribution of those values across a set of buckets.The summary statistics are the count, mean, sum of the squared deviation from the mean, the minimum, and the maximum of the set of population of values. The histogram is based on a sequence of buckets and gives a count of values that fall into each bucket. The boundaries of the buckets are given either explicitly or by formulas for buckets of fixed or exponentially increasing widths.Although it is not forbidden, it is generally a bad idea to include non-finite values (infinities or NaNs) in the population of values, as this will render the mean and sum_of_squared_deviation fields meaningless. # A distribution value.
101                "count": "A String", # The number of values in the population. Must be non-negative. This value must equal the sum of the values in bucket_counts if a histogram is provided.
102                "bucketCounts": [ # Required in the Stackdriver Monitoring API v3. The values for each bucket specified in bucket_options. The sum of the values in bucketCounts must equal the value in the count field of the Distribution object. The order of the bucket counts follows the numbering schemes described for the three bucket types. The underflow bucket has number 0; the finite buckets, if any, have numbers 1 through N-2; and the overflow bucket has number N-1. The size of bucket_counts must not be greater than N. If the size is less than N, then the remaining buckets are assigned values of zero.
103                  "A String",
104                ],
105                "bucketOptions": { # BucketOptions describes the bucket boundaries used to create a histogram for the distribution. The buckets can be in a linear sequence, an exponential sequence, or each bucket can be specified explicitly. BucketOptions does not include the number of values in each bucket.A bucket has an inclusive lower bound and exclusive upper bound for the values that are counted for that bucket. The upper bound of a bucket must be strictly greater than the lower bound. The sequence of N buckets for a distribution consists of an underflow bucket (number 0), zero or more finite buckets (number 1 through N - 2) and an overflow bucket (number N - 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the same as the upper bound of bucket i - 1. The buckets span the whole range of finite values: lower bound of the underflow bucket is -infinity and the upper bound of the overflow bucket is +infinity. The finite buckets are so-called because both bounds are finite. # Required in the Stackdriver Monitoring API v3. Defines the histogram bucket boundaries.
106                  "exponentialBuckets": { # Specifies an exponential sequence of buckets that have a width that is proportional to the value of the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1): scale * (growth_factor ^ i).  Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). # The exponential buckets.
107                    "scale": 3.14, # Must be greater than 0.
108                    "growthFactor": 3.14, # Must be greater than 1.
109                    "numFiniteBuckets": 42, # Must be greater than 0.
110                  },
111                  "linearBuckets": { # Specifies a linear sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1): offset + (width * i).  Lower bound (1 <= i < N): offset + (width * (i - 1)). # The linear bucket.
112                    "width": 3.14, # Must be greater than 0.
113                    "numFiniteBuckets": 42, # Must be greater than 0.
114                    "offset": 3.14, # Lower bound of the first bucket.
115                  },
116                  "explicitBuckets": { # Specifies a set of buckets with arbitrary widths.There are size(bounds) + 1 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1): boundsi  Lower bound (1 <= i < N); boundsi - 1The bounds field must contain at least one element. If bounds has only one element, then there are no finite buckets, and that single element is the common boundary of the overflow and underflow buckets. # The explicit buckets.
117                    "bounds": [ # The values must be monotonically increasing.
118                      3.14,
119                    ],
120                  },
121                },
122                "exemplars": [ # Must be in increasing order of value field.
123                  { # Exemplars are example points that may be used to annotate aggregated distribution values. They are metadata that gives information about a particular value added to a Distribution bucket, such as a trace ID that was active when a value was added. They may contain further information, such as a example values and timestamps, origin, etc.
124                    "timestamp": "A String", # The observation (sampling) time of the above value.
125                    "attachments": [ # Contextual information about the example value. Examples are:Trace: type.googleapis.com/google.monitoring.v3.SpanContextLiteral string: type.googleapis.com/google.protobuf.StringValueLabels dropped during aggregation:  type.googleapis.com/google.monitoring.v3.DroppedLabelsThere may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.
126                      {
127                        "a_key": "", # Properties of the object. Contains field @type with type URL.
128                      },
129                    ],
130                    "value": 3.14, # Value of the exemplar point. This value determines to which bucket the exemplar belongs.
131                  },
132                ],
133                "range": { # The range of the population values. # If specified, contains the range of the population values. The field must not be present if the count is zero. This field is presently ignored by the Stackdriver Monitoring API v3.
134                  "max": 3.14, # The maximum of the population values.
135                  "min": 3.14, # The minimum of the population values.
136                },
137                "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean of the values in the population. For values x_i this is:
138                    # Sum[i=1..n]((x_i - mean)^2)
139                    # Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition describes Welford's method for accumulating this sum in one pass.If count is zero then this field must be zero.
140                "mean": 3.14, # The arithmetic mean of the values in the population. If count is zero then this field must be zero.
141              },
142              "stringValue": "A String", # A variable-length string value.
143              "boolValue": True or False, # A Boolean value: true or false.
144              "doubleValue": 3.14, # A 64-bit double-precision floating-point number. Its magnitude is approximately &plusmn;10<sup>&plusmn;300</sup> and it has 16 significant digits of precision.
145              "int64Value": "A String", # A 64-bit integer. Its range is approximately &plusmn;9.2x10<sup>18</sup>.
146            },
147          },
148        ],
149        "startTime": "A String", # The start time of the interval.
150        "endTime": "A String", # The end time of the interval.
151        "type": "A String", # The measurement type. Example: "memory".
152        "pluginInstance": "A String", # The instance name of the plugin Example: "hdcl".
153        "metadata": { # The measurement metadata. Example: "process_id" -> 12345
154          "a_key": { # A single strongly-typed value.
155            "distributionValue": { # Distribution contains summary statistics for a population of values. It optionally contains a histogram representing the distribution of those values across a set of buckets.The summary statistics are the count, mean, sum of the squared deviation from the mean, the minimum, and the maximum of the set of population of values. The histogram is based on a sequence of buckets and gives a count of values that fall into each bucket. The boundaries of the buckets are given either explicitly or by formulas for buckets of fixed or exponentially increasing widths.Although it is not forbidden, it is generally a bad idea to include non-finite values (infinities or NaNs) in the population of values, as this will render the mean and sum_of_squared_deviation fields meaningless. # A distribution value.
156              "count": "A String", # The number of values in the population. Must be non-negative. This value must equal the sum of the values in bucket_counts if a histogram is provided.
157              "bucketCounts": [ # Required in the Stackdriver Monitoring API v3. The values for each bucket specified in bucket_options. The sum of the values in bucketCounts must equal the value in the count field of the Distribution object. The order of the bucket counts follows the numbering schemes described for the three bucket types. The underflow bucket has number 0; the finite buckets, if any, have numbers 1 through N-2; and the overflow bucket has number N-1. The size of bucket_counts must not be greater than N. If the size is less than N, then the remaining buckets are assigned values of zero.
158                "A String",
159              ],
160              "bucketOptions": { # BucketOptions describes the bucket boundaries used to create a histogram for the distribution. The buckets can be in a linear sequence, an exponential sequence, or each bucket can be specified explicitly. BucketOptions does not include the number of values in each bucket.A bucket has an inclusive lower bound and exclusive upper bound for the values that are counted for that bucket. The upper bound of a bucket must be strictly greater than the lower bound. The sequence of N buckets for a distribution consists of an underflow bucket (number 0), zero or more finite buckets (number 1 through N - 2) and an overflow bucket (number N - 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the same as the upper bound of bucket i - 1. The buckets span the whole range of finite values: lower bound of the underflow bucket is -infinity and the upper bound of the overflow bucket is +infinity. The finite buckets are so-called because both bounds are finite. # Required in the Stackdriver Monitoring API v3. Defines the histogram bucket boundaries.
161                "exponentialBuckets": { # Specifies an exponential sequence of buckets that have a width that is proportional to the value of the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1): scale * (growth_factor ^ i).  Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). # The exponential buckets.
162                  "scale": 3.14, # Must be greater than 0.
163                  "growthFactor": 3.14, # Must be greater than 1.
164                  "numFiniteBuckets": 42, # Must be greater than 0.
165                },
166                "linearBuckets": { # Specifies a linear sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1): offset + (width * i).  Lower bound (1 <= i < N): offset + (width * (i - 1)). # The linear bucket.
167                  "width": 3.14, # Must be greater than 0.
168                  "numFiniteBuckets": 42, # Must be greater than 0.
169                  "offset": 3.14, # Lower bound of the first bucket.
170                },
171                "explicitBuckets": { # Specifies a set of buckets with arbitrary widths.There are size(bounds) + 1 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1): boundsi  Lower bound (1 <= i < N); boundsi - 1The bounds field must contain at least one element. If bounds has only one element, then there are no finite buckets, and that single element is the common boundary of the overflow and underflow buckets. # The explicit buckets.
172                  "bounds": [ # The values must be monotonically increasing.
173                    3.14,
174                  ],
175                },
176              },
177              "exemplars": [ # Must be in increasing order of value field.
178                { # Exemplars are example points that may be used to annotate aggregated distribution values. They are metadata that gives information about a particular value added to a Distribution bucket, such as a trace ID that was active when a value was added. They may contain further information, such as a example values and timestamps, origin, etc.
179                  "timestamp": "A String", # The observation (sampling) time of the above value.
180                  "attachments": [ # Contextual information about the example value. Examples are:Trace: type.googleapis.com/google.monitoring.v3.SpanContextLiteral string: type.googleapis.com/google.protobuf.StringValueLabels dropped during aggregation:  type.googleapis.com/google.monitoring.v3.DroppedLabelsThere may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.
181                    {
182                      "a_key": "", # Properties of the object. Contains field @type with type URL.
183                    },
184                  ],
185                  "value": 3.14, # Value of the exemplar point. This value determines to which bucket the exemplar belongs.
186                },
187              ],
188              "range": { # The range of the population values. # If specified, contains the range of the population values. The field must not be present if the count is zero. This field is presently ignored by the Stackdriver Monitoring API v3.
189                "max": 3.14, # The maximum of the population values.
190                "min": 3.14, # The minimum of the population values.
191              },
192              "sumOfSquaredDeviation": 3.14, # The sum of squared deviations from the mean of the values in the population. For values x_i this is:
193                  # Sum[i=1..n]((x_i - mean)^2)
194                  # Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition describes Welford's method for accumulating this sum in one pass.If count is zero then this field must be zero.
195              "mean": 3.14, # The arithmetic mean of the values in the population. If count is zero then this field must be zero.
196            },
197            "stringValue": "A String", # A variable-length string value.
198            "boolValue": True or False, # A Boolean value: true or false.
199            "doubleValue": 3.14, # A 64-bit double-precision floating-point number. Its magnitude is approximately &plusmn;10<sup>&plusmn;300</sup> and it has 16 significant digits of precision.
200            "int64Value": "A String", # A 64-bit integer. Its range is approximately &plusmn;9.2x10<sup>18</sup>.
201          },
202        },
203      },
204    ],
205    "resource": { # An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the labels field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for "gce_instance" has labels "instance_id" and "zone": # The monitored resource associated with the time series.
206        # { "type": "gce_instance",
207        #   "labels": { "instance_id": "12345678901234",
208        #               "zone": "us-central1-a" }}
209      "labels": { # Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels "project_id", "instance_id", and "zone".
210        "a_key": "A String",
211      },
212      "type": "A String", # Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is gce_instance. For a list of types, see Monitoring resource types and Logging resource types.
213    },
214    "collectdVersion": "A String", # The version of collectd that collected the data. Example: "5.3.0-192.el6".
215  }
216
217  x__xgafv: string, V1 error format.
218    Allowed values
219      1 - v1 error format
220      2 - v2 error format
221
222Returns:
223  An object of the form:
224
225    { # The CreateCollectdTimeSeries response.
226    "payloadErrors": [ # Records the error status for points that were not written due to an error.Failed requests for which nothing is written will return an error response instead.
227      { # Describes the error status for payloads that were not written.
228        "index": 42, # The zero-based index in CreateCollectdTimeSeriesRequest.collectd_payloads.
229        "valueErrors": [ # Records the error status for values that were not written due to an error.Failed payloads for which nothing is written will not include partial value errors.
230          { # Describes the error status for values that were not written.
231            "index": 42, # The zero-based index in CollectdPayload.values within the parent CreateCollectdTimeSeriesRequest.collectd_payloads.
232            "error": { # The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors). # Records the error status for the value.
233              "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
234              "code": 42, # The status code, which should be an enum value of google.rpc.Code.
235              "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
236                {
237                  "a_key": "", # Properties of the object. Contains field @type with type URL.
238                },
239              ],
240            },
241          },
242        ],
243        "error": { # The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors). # Records the error status for the payload. If this field is present, the partial errors for nested values won't be populated.
244          "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
245          "code": 42, # The status code, which should be an enum value of google.rpc.Code.
246          "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
247            {
248              "a_key": "", # Properties of the object. Contains field @type with type URL.
249            },
250          ],
251        },
252      },
253    ],
254  }</pre>
255</div>
256
257</body></html>