common.proto 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. // Copyright 2016 Google Inc.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.monitoring.v3;
  16. import "google/api/distribution.proto";
  17. import "google/protobuf/duration.proto";
  18. import "google/protobuf/timestamp.proto";
  19. option java_multiple_files = true;
  20. option java_outer_classname = "CommonProto";
  21. option java_package = "com.google.monitoring.v3";
  22. // A single strongly-typed value.
  23. message TypedValue {
  24. // The typed value field.
  25. oneof value {
  26. // A Boolean value: `true` or `false`.
  27. bool bool_value = 1;
  28. // A 64-bit integer. Its range is approximately &plusmn;9.2x10<sup>18</sup>.
  29. int64 int64_value = 2;
  30. // A 64-bit double-precision floating-point number. Its magnitude
  31. // is approximately &plusmn;10<sup>&plusmn;300</sup> and it has 16
  32. // significant digits of precision.
  33. double double_value = 3;
  34. // A variable-length string value.
  35. string string_value = 4;
  36. // A distribution value.
  37. google.api.Distribution distribution_value = 5;
  38. }
  39. }
  40. // A time interval extending from after `startTime` through `endTime`. If
  41. // `startTime` is omitted, the interval is the single point in time, `endTime`.
  42. message TimeInterval {
  43. // Required. The end of the interval. The interval includes this
  44. // time.
  45. google.protobuf.Timestamp end_time = 2;
  46. // If this value is omitted, the interval is a point in time,
  47. // `endTime`. If `startTime` is present, it must be earlier than
  48. // (less than) `endTime`. The interval begins after
  49. // `startTime`&mdash;it does not include `startTime`.
  50. google.protobuf.Timestamp start_time = 1;
  51. }
  52. // Describes how to combine, or aggregate, multiple time series to
  53. // provide different views of the data.
  54. // See [Aggregation](/monitoring/api/learn_more#aggregation) for more details.
  55. message Aggregation {
  56. // The Aligner describes how to bring the data points in a single
  57. // time series into temporal alignment.
  58. enum Aligner {
  59. // No alignment. Raw data is returned. Not valid if cross-time
  60. // series reduction is requested. The value type of the result is
  61. // the same as the value type of the input.
  62. ALIGN_NONE = 0;
  63. // Align and convert to delta metric type. This alignment is valid
  64. // for cumulative metrics and delta metrics. Aligning an existing
  65. // delta metric to a delta metric requires that the alignment
  66. // period be increased. The value type of the result is the same
  67. // as the value type of the input.
  68. ALIGN_DELTA = 1;
  69. // Align and convert to a rate. This alignment is valid for
  70. // cumulative metrics and delta metrics with numeric values. The output is a
  71. // gauge metric with value type
  72. // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
  73. ALIGN_RATE = 2;
  74. // Align by interpolating between adjacent points around the
  75. // period boundary. This alignment is valid for gauge and delta
  76. // metrics with numeric values. The value type of the result is the same
  77. // as the value type of the input.
  78. ALIGN_INTERPOLATE = 3;
  79. // Align by shifting the oldest data point before the period
  80. // boundary to the boundary. This alignment is valid for gauge
  81. // metrics. The value type of the result is the same as the
  82. // value type of the input.
  83. ALIGN_NEXT_OLDER = 4;
  84. // Align time series via aggregation. The resulting data point in
  85. // the alignment period is the minimum of all data points in the
  86. // period. This alignment is valid for gauge and delta metrics with numeric
  87. // values. The value type of the result is the same as the value
  88. // type of the input.
  89. ALIGN_MIN = 10;
  90. // Align time series via aggregation. The resulting data point in
  91. // the alignment period is the maximum of all data points in the
  92. // period. This alignment is valid for gauge and delta metrics with numeric
  93. // values. The value type of the result is the same as the value
  94. // type of the input.
  95. ALIGN_MAX = 11;
  96. // Align time series via aggregation. The resulting data point in
  97. // the alignment period is the average or arithmetic mean of all
  98. // data points in the period. This alignment is valid for gauge and delta
  99. // metrics with numeric values. The value type of the output is
  100. // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
  101. ALIGN_MEAN = 12;
  102. // Align time series via aggregation. The resulting data point in
  103. // the alignment period is the count of all data points in the
  104. // period. This alignment is valid for gauge and delta metrics with numeric
  105. // or Boolean values. The value type of the output is
  106. // [INT64][google.api.MetricDescriptor.ValueType.INT64].
  107. ALIGN_COUNT = 13;
  108. // Align time series via aggregation. The resulting data point in
  109. // the alignment period is the sum of all data points in the
  110. // period. This alignment is valid for gauge and delta metrics with numeric
  111. // and distribution values. The value type of the output is the
  112. // same as the value type of the input.
  113. ALIGN_SUM = 14;
  114. // Align time series via aggregation. The resulting data point in
  115. // the alignment period is the standard deviation of all data
  116. // points in the period. This alignment is valid for gauge and delta metrics
  117. // with numeric values. The value type of the output is
  118. // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
  119. ALIGN_STDDEV = 15;
  120. // Align time series via aggregation. The resulting data point in
  121. // the alignment period is the count of True-valued data points in the
  122. // period. This alignment is valid for gauge metrics with
  123. // Boolean values. The value type of the output is
  124. // [INT64][google.api.MetricDescriptor.ValueType.INT64].
  125. ALIGN_COUNT_TRUE = 16;
  126. // Align time series via aggregation. The resulting data point in
  127. // the alignment period is the fraction of True-valued data points in the
  128. // period. This alignment is valid for gauge metrics with Boolean values.
  129. // The output value is in the range [0, 1] and has value type
  130. // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
  131. ALIGN_FRACTION_TRUE = 17;
  132. // Align time series via aggregation. The resulting data point in
  133. // the alignment period is the 99th percentile of all data
  134. // points in the period. This alignment is valid for gauge and delta metrics
  135. // with distribution values. The output is a gauge metric with value type
  136. // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
  137. ALIGN_PERCENTILE_99 = 18;
  138. // Align time series via aggregation. The resulting data point in
  139. // the alignment period is the 95th percentile of all data
  140. // points in the period. This alignment is valid for gauge and delta metrics
  141. // with distribution values. The output is a gauge metric with value type
  142. // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
  143. ALIGN_PERCENTILE_95 = 19;
  144. // Align time series via aggregation. The resulting data point in
  145. // the alignment period is the 50th percentile of all data
  146. // points in the period. This alignment is valid for gauge and delta metrics
  147. // with distribution values. The output is a gauge metric with value type
  148. // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
  149. ALIGN_PERCENTILE_50 = 20;
  150. // Align time series via aggregation. The resulting data point in
  151. // the alignment period is the 5th percentile of all data
  152. // points in the period. This alignment is valid for gauge and delta metrics
  153. // with distribution values. The output is a gauge metric with value type
  154. // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
  155. ALIGN_PERCENTILE_05 = 21;
  156. }
  157. // A Reducer describes how to aggregate data points from multiple
  158. // time series into a single time series.
  159. enum Reducer {
  160. // No cross-time series reduction. The output of the aligner is
  161. // returned.
  162. REDUCE_NONE = 0;
  163. // Reduce by computing the mean across time series for each
  164. // alignment period. This reducer is valid for delta and
  165. // gauge metrics with numeric or distribution values. The value type of the
  166. // output is [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
  167. REDUCE_MEAN = 1;
  168. // Reduce by computing the minimum across time series for each
  169. // alignment period. This reducer is valid for delta and
  170. // gauge metrics with numeric values. The value type of the output
  171. // is the same as the value type of the input.
  172. REDUCE_MIN = 2;
  173. // Reduce by computing the maximum across time series for each
  174. // alignment period. This reducer is valid for delta and
  175. // gauge metrics with numeric values. The value type of the output
  176. // is the same as the value type of the input.
  177. REDUCE_MAX = 3;
  178. // Reduce by computing the sum across time series for each
  179. // alignment period. This reducer is valid for delta and
  180. // gauge metrics with numeric and distribution values. The value type of
  181. // the output is the same as the value type of the input.
  182. REDUCE_SUM = 4;
  183. // Reduce by computing the standard deviation across time series
  184. // for each alignment period. This reducer is valid for delta
  185. // and gauge metrics with numeric or distribution values. The value type of
  186. // the output is [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
  187. REDUCE_STDDEV = 5;
  188. // Reduce by computing the count of data points across time series
  189. // for each alignment period. This reducer is valid for delta
  190. // and gauge metrics of numeric, Boolean, distribution, and string value
  191. // type. The value type of the output is
  192. // [INT64][google.api.MetricDescriptor.ValueType.INT64].
  193. REDUCE_COUNT = 6;
  194. // Reduce by computing the count of True-valued data points across time
  195. // series for each alignment period. This reducer is valid for delta
  196. // and gauge metrics of Boolean value type. The value type of
  197. // the output is [INT64][google.api.MetricDescriptor.ValueType.INT64].
  198. REDUCE_COUNT_TRUE = 7;
  199. // Reduce by computing the fraction of True-valued data points across time
  200. // series for each alignment period. This reducer is valid for delta
  201. // and gauge metrics of Boolean value type. The output value is in the
  202. // range [0, 1] and has value type
  203. // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE].
  204. REDUCE_FRACTION_TRUE = 8;
  205. // Reduce by computing 99th percentile of data points across time series
  206. // for each alignment period. This reducer is valid for gauge and delta
  207. // metrics of numeric and distribution type. The value of the output is
  208. // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]
  209. REDUCE_PERCENTILE_99 = 9;
  210. // Reduce by computing 95th percentile of data points across time series
  211. // for each alignment period. This reducer is valid for gauge and delta
  212. // metrics of numeric and distribution type. The value of the output is
  213. // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]
  214. REDUCE_PERCENTILE_95 = 10;
  215. // Reduce by computing 50th percentile of data points across time series
  216. // for each alignment period. This reducer is valid for gauge and delta
  217. // metrics of numeric and distribution type. The value of the output is
  218. // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]
  219. REDUCE_PERCENTILE_50 = 11;
  220. // Reduce by computing 5th percentile of data points across time series
  221. // for each alignment period. This reducer is valid for gauge and delta
  222. // metrics of numeric and distribution type. The value of the output is
  223. // [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]
  224. REDUCE_PERCENTILE_05 = 12;
  225. }
  226. // The alignment period for per-[time series][google.monitoring.v3.TimeSeries]
  227. // alignment. If present, `alignmentPeriod` must be at least 60
  228. // seconds. After per-time series alignment, each time series will
  229. // contain data points only on the period boundaries. If
  230. // `perSeriesAligner` is not specified or equals `ALIGN_NONE`, then
  231. // this field is ignored. If `perSeriesAligner` is specified and
  232. // does not equal `ALIGN_NONE`, then this field must be defined;
  233. // otherwise an error is returned.
  234. google.protobuf.Duration alignment_period = 1;
  235. // The approach to be used to align individual time series. Not all
  236. // alignment functions may be applied to all time series, depending
  237. // on the metric type and value type of the original time
  238. // series. Alignment may change the metric type or the value type of
  239. // the time series.
  240. //
  241. // Time series data must be aligned in order to perform cross-time
  242. // series reduction. If `crossSeriesReducer` is specified, then
  243. // `perSeriesAligner` must be specified and not equal `ALIGN_NONE`
  244. // and `alignmentPeriod` must be specified; otherwise, an error is
  245. // returned.
  246. Aligner per_series_aligner = 2;
  247. // The approach to be used to combine time series. Not all reducer
  248. // functions may be applied to all time series, depending on the
  249. // metric type and the value type of the original time
  250. // series. Reduction may change the metric type of value type of the
  251. // time series.
  252. //
  253. // Time series data must be aligned in order to perform cross-time
  254. // series reduction. If `crossSeriesReducer` is specified, then
  255. // `perSeriesAligner` must be specified and not equal `ALIGN_NONE`
  256. // and `alignmentPeriod` must be specified; otherwise, an error is
  257. // returned.
  258. Reducer cross_series_reducer = 4;
  259. // The set of fields to preserve when `crossSeriesReducer` is
  260. // specified. The `groupByFields` determine how the time series
  261. // are partitioned into subsets prior to applying the aggregation
  262. // function. Each subset contains time series that have the same
  263. // value for each of the grouping fields. Each individual time
  264. // series is a member of exactly one subset. The
  265. // `crossSeriesReducer` is applied to each subset of time series.
  266. // Fields not specified in `groupByFields` are aggregated away.
  267. // If `groupByFields` is not specified, the time series are
  268. // aggregated into a single output time series. If
  269. // `crossSeriesReducer` is not defined, this field is ignored.
  270. repeated string group_by_fields = 5;
  271. }