agent.proto 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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/annotations.proto";
  17. import "google/monitoring/v3/common.proto";
  18. import "google/protobuf/timestamp.proto";
  19. option java_multiple_files = true;
  20. option java_outer_classname = "AgentProto";
  21. option java_package = "com.google.monitoring.v3";
  22. // A single data point from a `collectd`-based plugin.
  23. message CollectdValue {
  24. // The type of measurement for the data source.
  25. enum DataSourceType {
  26. // An unspecified data source type.
  27. // This corresponds to [google.api.MetricDescriptor.MetricKind.METRIC_KIND_UNSPECIFIED].
  28. UNSPECIFIED_DATA_SOURCE_TYPE = 0;
  29. // An instantaneous measurement of a varying quantity.
  30. // This corresponds to [google.api.MetricDescriptor.MetricKind.GAUGE].
  31. GAUGE = 1;
  32. // A cumulative value over time.
  33. // This corresponds to [google.api.MetricDescriptor.MetricKind.CUMULATIVE].
  34. COUNTER = 2;
  35. // A rate of change of the measurement.
  36. DERIVE = 3;
  37. // An amount of change since the last measurement interval.
  38. // This corresponds to [google.api.MetricDescriptor.MetricKind.DELTA].
  39. ABSOLUTE = 4;
  40. }
  41. // The data source for the `collectd` value. For example there are
  42. // two data sources for network measurements: `"rx"` and `"tx"`.
  43. string data_source_name = 1;
  44. // The type of measurement.
  45. DataSourceType data_source_type = 2;
  46. // The measurement value.
  47. TypedValue value = 3;
  48. }
  49. // A collection of data points sent from a `collectd`-based plugin.
  50. // See the `collectd` documentation for more information.
  51. message CollectdPayload {
  52. // The measured values during this time interval.
  53. // Each value must have a different `dataSourceName`.
  54. repeated CollectdValue values = 1;
  55. // The start time of the interval.
  56. google.protobuf.Timestamp start_time = 2;
  57. // The end time of the interval.
  58. google.protobuf.Timestamp end_time = 3;
  59. // The name of the plugin. Example: `"disk"`.
  60. string plugin = 4;
  61. // The instance name of the plugin Example: `"hdcl"`.
  62. string plugin_instance = 5;
  63. // The measurement type. Example: `"memory"`.
  64. string type = 6;
  65. // The measurement type instance. Example: `"used"`.
  66. string type_instance = 7;
  67. // The measurement metadata. Example: `"process_id" -> 12345`
  68. map<string, TypedValue> metadata = 8;
  69. }