github.com/cloudwan/edgelq-sdk@v1.15.4/monitoring/proto/v4/time_serie_custom.proto (about)

     1  syntax = "proto3";
     2  
     3  package ntt.monitoring.v4;
     4  
     5  import "edgelq-sdk/common/rpc/status.proto";
     6  import "edgelq-sdk/monitoring/proto/v4/common.proto";
     7  import "edgelq-sdk/monitoring/proto/v4/time_serie.proto";
     8  import "google/protobuf/duration.proto";
     9  import "google/protobuf/field_mask.proto";
    10  import "google/protobuf/timestamp.proto";
    11  
    12  option go_package = "github.com/cloudwan/edgelq-sdk/monitoring/client/v4/time_serie;time_serie_client";
    13  option java_multiple_files = false;
    14  option java_outer_classname = "TimeSerieCustomProto";
    15  option java_package = "com.ntt.monitoring.pb.v4";
    16  
    17  // Request message for method [ListTimeSeries][ntt.monitoring.v4.ListTimeSeries]
    18  message ListTimeSeriesRequest {
    19    // The project on which to execute the request. The format is
    20    // "projects/{project_id}", or
    21    // "projects/{project_id}/regions/{region_id}/buckets/{bucket_id}"
    22    string parent = 10;
    23  
    24    // A monitoring filter that specifies which time
    25    // series should be returned.  The filter must specify a single metric type,
    26    // and can additionally specify metric labels and other information. For
    27    // example:
    28    //
    29    //     metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND
    30    //         metric.label.instance_name = "my-instance-name"
    31    string filter = 2;
    32  
    33    // The time interval for which results should be returned. Only time series
    34    // that contain data points in the specified interval are included
    35    // in the response.
    36    TimeInterval interval = 4;
    37  
    38    // Instructs how to transform individual time series (aligner) and combine
    39    // them together (reducer, group by fields).
    40    // Cannot be used with pagination, as pagination exactly defines aggregation.
    41    // Query will be rejected if it touches too many time series.
    42    Aggregation aggregation = 5;
    43  
    44    // Picks paginated time series according to pre-defined (in metric descriptor)
    45    // view and function. Cannot be used with aggregation, because pagination
    46    // view and function determines time series transformation and sorting.
    47    Pagination pagination = 3;
    48  
    49    // Specifies which information is returned about the time series.
    50    TimeSeriesView view = 7;
    51  
    52    // view list mask. Optimize network usage and limit returned header fields to
    53    // a required subset. example fields in field mask:
    54    // - "key": for later caching,
    55    // - "resource.labels.project_id", "resource.labels.instance_name", etc -
    56    // specific labels only
    57    // - "resource", "metric": all resource labels, reduced_labels and type
    58    // NOTE: points are added implicitly
    59    google.protobuf.FieldMask field_mask = 12;
    60  
    61    // A positive number that is the maximum number of Points to return. If
    62    // `points_cap` is empty or more than 100,000 results, the effective
    63    // `points_cap` is 100,000 results. If `view` is set to `HEADERS`, this is
    64    // the maximum number of `TimeSeries` returned.
    65    int32 points_cap = 8;
    66  
    67    // If this field is not empty then it must contain the `continuation_token`
    68    // value returned by a previous call to this method.  Using this field causes
    69    // the method to return additional results from the previous method call.
    70    string continuation_token = 9;
    71  
    72    reserved 6;
    73  }
    74  
    75  // Response message for method
    76  // [ListTimeSeries][ntt.monitoring.v4.ListTimeSeries]
    77  message ListTimeSeriesResponse {
    78    // One or more time series that match the filter included in the request.
    79    repeated TimeSerie time_series = 1;
    80  
    81    // Query execution errors that may have caused the time series data returned
    82    // to be incomplete.
    83    repeated ntt.rpc.Status execution_errors = 3;
    84  
    85    // If there are more results than have been returned, then this field is set
    86    // to a non-empty value.  To see the additional results,
    87    // use that value as `continuation_token` in the next call to this method.
    88    string continuation_token = 2;
    89  
    90    // Special time series with total amount of records available for pagination
    91    // by given time series key. Metric/Resource labels will contain "common"
    92    // values shared by all ranked time series. ValueType will be always INT64 and
    93    // metricKind GAUGE. In a sense, this time series is execution of
    94    // ListTimeSeries with Aggregation = {groupByFields: [<viewPaginatedLabels>],
    95    // REDUCER: REDUCE_COUNT} This field is only populated for paginated queries
    96    // (pagination in ListTimeSeries is specified).
    97    repeated TimeSerie total_point_counters = 4;
    98  
    99    // ErrorDetails is used when one of the queried regions fails to produce
   100    // results. It is used in execution_errors field (see subfield
   101    // ntt.rpc.Status.details).
   102    message ErrorDetails {
   103      // region id which failed to give results.
   104      string region_id = 1;
   105    }
   106  }
   107  
   108  // Request message for method
   109  // [CreateTimeSeries][ntt.monitoring.v4.CreateTimeSeries]
   110  message CreateTimeSeriesRequest {
   111    // The project on which to execute the request. The format is
   112    // "projects/{project_id}", or
   113    // "projects/{project_id}/regions/{region_id}/buckets/{bucket_id}"
   114    string parent = 3;
   115  
   116    // The new data to be added to a list of time series.
   117    // Adds at most one data point to each of several time series.  The new data
   118    // point must be more recent than any other point in its time series.  Each
   119    // `TimeSeries` value must fully specify a unique time series by supplying
   120    // all label values for the metric and the monitored resource.
   121    repeated TimeSerie time_series = 2;
   122  }
   123  
   124  // Response message for method
   125  // [CreateTimeSeries][ntt.monitoring.v4.CreateTimeSeries]
   126  message CreateTimeSeriesResponse {
   127    // Time Serie keys indexed by Create position - present only when given
   128    // TimeSerie didn't use Key field
   129    map<uint32, bytes> time_serie_keys = 11;
   130  
   131    // Time series that failed to be created
   132    repeated CreateTimeSeriesError failed_time_series = 50;
   133  }
   134  
   135  // Describes the result of a failed request to write data to a time series.
   136  message CreateTimeSeriesError {
   137    // The time series, including the `Metric`, `MonitoredResource`,
   138    // and `Point`s (including timestamp and value) that resulted
   139    // in the error. This field provides all of the context that
   140    // would be needed to retry the operation.
   141    TimeSerie time_series = 1;
   142  
   143    // The status of the requested write operation.
   144    ntt.rpc.Status status = 2;
   145  }
   146  
   147  message StatsQuery {
   148    oneof request {
   149      CallLatencies call_latencies = 1;
   150  
   151      ExecutedCalls executed_calls = 2;
   152  
   153      OpenCalls open_calls = 3;
   154  
   155      ErrorCounts error_counts = 4;
   156  
   157      IngressThroughput ingress_throughput = 5;
   158  
   159      EgressThroughput egress_throughput = 6;
   160  
   161      StoreOperations store_usage = 7;
   162  
   163      ResourceCount resource_count = 8;
   164  
   165      Logs logs_usage = 9;
   166  
   167      ActivityLogs activity_logs_usage = 10;
   168  
   169      ResourceChangeLogs resource_change_logs_usage = 11;
   170  
   171      TimeSeries time_series_usage = 12;
   172  
   173      TimeSeriesLatencies time_series_latencies = 13;
   174    }
   175  
   176    message CallLatencies {
   177      repeated string methods = 1;
   178  
   179      repeated string versions = 2;
   180  
   181      repeated string resources = 3;
   182  
   183      Reducer reducer = 4;
   184  
   185      repeated Groups group_by = 5;
   186  
   187      enum Groups {
   188        METHOD = 0;
   189  
   190        VERSION = 1;
   191  
   192        RESOURCE_TYPE = 2;
   193      }
   194  
   195      enum Reducer {
   196        SUMMARY = 0;
   197  
   198        MIN = 1;
   199  
   200        MAX = 2;
   201  
   202        P50 = 3;
   203  
   204        P95 = 4;
   205  
   206        P99 = 5;
   207  
   208        MEAN = 6;
   209  
   210        STD_DEV = 7;
   211      }
   212    }
   213  
   214    message ExecutedCalls {
   215      repeated string methods = 1;
   216  
   217      repeated string versions = 2;
   218  
   219      repeated string resources = 3;
   220  
   221      repeated Groups group_by = 4;
   222  
   223      enum Groups {
   224        METHOD = 0;
   225  
   226        VERSION = 1;
   227  
   228        RESOURCE_TYPE = 2;
   229      }
   230    }
   231  
   232    message OpenCalls {
   233      repeated string methods = 1;
   234  
   235      repeated string versions = 2;
   236  
   237      repeated string resources = 3;
   238  
   239      repeated Groups group_by = 4;
   240  
   241      enum Groups {
   242        METHOD = 0;
   243  
   244        VERSION = 1;
   245  
   246        RESOURCE_TYPE = 2;
   247      }
   248    }
   249  
   250    message ErrorCounts {
   251      repeated string methods = 1;
   252  
   253      repeated string versions = 2;
   254  
   255      repeated string resources = 3;
   256  
   257      repeated string error_codes = 4;
   258  
   259      repeated Groups group_by = 5;
   260  
   261      enum Groups {
   262        METHOD = 0;
   263  
   264        VERSION = 1;
   265  
   266        RESOURCE_TYPE = 2;
   267  
   268        RESPONSE_CODE = 3;
   269      }
   270    }
   271  
   272    message IngressThroughput {
   273      repeated string methods = 1;
   274  
   275      repeated string versions = 2;
   276  
   277      repeated string resources = 3;
   278  
   279      repeated Groups group_by = 4;
   280  
   281      enum Groups {
   282        METHOD = 0;
   283  
   284        VERSION = 1;
   285  
   286        RESOURCE_TYPE = 2;
   287      }
   288    }
   289  
   290    message EgressThroughput {
   291      repeated string methods = 1;
   292  
   293      repeated string versions = 2;
   294  
   295      repeated string resources = 3;
   296  
   297      repeated Groups group_by = 4;
   298  
   299      enum Groups {
   300        METHOD = 0;
   301  
   302        VERSION = 1;
   303  
   304        RESOURCE_TYPE = 2;
   305      }
   306    }
   307  
   308    message StoreOperations {
   309      repeated string methods = 1;
   310  
   311      repeated string versions = 2;
   312  
   313      repeated string resources = 3;
   314  
   315      repeated Operation operations = 4;
   316  
   317      repeated Groups group_by = 5;
   318  
   319      enum Groups {
   320        METHOD = 0;
   321  
   322        VERSION = 1;
   323  
   324        RESOURCE_TYPE = 2;
   325  
   326        OPERATION = 3;
   327      }
   328  
   329      enum Operation {
   330        UNDEFINED = 0;
   331  
   332        GET = 1;
   333  
   334        LIST = 2;
   335  
   336        SEARCH = 3;
   337  
   338        WATCH = 4;
   339  
   340        CREATE = 5;
   341  
   342        UPDATE = 6;
   343  
   344        DELETE = 7;
   345      }
   346    }
   347  
   348    message ResourceCount { repeated string resources = 1; }
   349  
   350    message Logs {
   351      Type type = 1;
   352  
   353      repeated string log_types = 2;
   354  
   355      repeated Groups group_by = 3;
   356  
   357      enum Groups {
   358        LOG_TYPE = 0;
   359      }
   360  
   361      enum Type {
   362        UNDEFINED = 0;
   363  
   364        READS = 1;
   365  
   366        WRITES = 2;
   367      }
   368    }
   369  
   370    message ActivityLogs {
   371      Type type = 1;
   372  
   373      repeated string methods = 2;
   374  
   375      repeated string versions = 3;
   376  
   377      repeated string categories = 4;
   378  
   379      repeated Groups group_by = 5;
   380  
   381      enum Groups {
   382        METHOD = 0;
   383  
   384        VERSION = 1;
   385  
   386        CATEGORY = 2;
   387      }
   388  
   389      enum Type {
   390        UNDEFINED = 0;
   391  
   392        READS = 1;
   393  
   394        WRITES = 2;
   395      }
   396    }
   397  
   398    message ResourceChangeLogs {
   399      Type type = 1;
   400  
   401      repeated string resource_types = 2;
   402  
   403      repeated Groups group_by = 3;
   404  
   405      enum Groups {
   406        RESOURCE_TYPE = 0;
   407      }
   408  
   409      enum Type {
   410        UNDEFINED = 0;
   411  
   412        READS = 1;
   413  
   414        WRITES = 2;
   415      }
   416    }
   417  
   418    message TimeSeries {
   419      Type type = 1;
   420  
   421      repeated string resource_types = 2;
   422  
   423      repeated string metric_types = 3;
   424  
   425      repeated Groups group_by = 4;
   426  
   427      enum Groups {
   428        RESOURCE_TYPE = 0;
   429  
   430        METRIC_TYPE = 1;
   431      }
   432  
   433      enum Type {
   434        UNDEFINED = 0;
   435  
   436        READS = 1;
   437  
   438        RAW_WRITES = 2;
   439  
   440        ROLLUP_WRITES = 3;
   441      }
   442    }
   443  
   444    message TimeSeriesLatencies {
   445      google.protobuf.Duration of_ap = 1;
   446  
   447      Reducer reducer = 2;
   448  
   449      enum Reducer {
   450        SUMMARY = 0;
   451  
   452        MIN = 1;
   453  
   454        MAX = 2;
   455  
   456        P50 = 3;
   457  
   458        P95 = 4;
   459  
   460        P99 = 5;
   461  
   462        MEAN = 6;
   463  
   464        STD_DEV = 7;
   465      }
   466    }
   467  }
   468  
   469  // Response message for method
   470  // [QueryProjectTimeSeriesStats][ntt.monitoring.v4.QueryProjectTimeSeriesStats]
   471  message QueryProjectTimeSeriesStatsRequest {
   472    string project = 1;
   473  
   474    // Service domain for which we request stats, for example "devices.edgelq.com"
   475    string service = 2;
   476  
   477    // Region ID from which to get metrics
   478    string region_id = 3;
   479  
   480    // Aggregation alignment period
   481    google.protobuf.Duration ap = 4;
   482  
   483    // The time interval for which results should be returned.
   484    TimeInterval interval = 5;
   485  
   486    // A positive number that is the maximum number of results to return. If
   487    // `page_size` is empty or more than 100,000 results, the effective
   488    // `page_size` is 100,000 results.
   489    int32 page_size = 6;
   490  
   491    // If this field is not empty then it must contain the `nextPageToken` value
   492    // returned by a previous call to this method.  Using this field causes the
   493    // method to return additional results from the previous method call.
   494    string page_token = 7;
   495  
   496    StatsQuery query = 8;
   497  }
   498  
   499  // Response message for method
   500  // [QueryProjectTimeSeriesStats][ntt.monitoring.v4.QueryProjectTimeSeriesStats]
   501  message QueryProjectTimeSeriesStatsResponse {
   502    // One or more time series that match the request.
   503    repeated TimeSerie time_series = 1;
   504  
   505    // If there are more results than have been returned, then this field is set
   506    // to a non-empty value.  To see the additional results,
   507    // use that value as `pageToken` in the next call to this method.
   508    string next_page_token = 2;
   509  
   510    // Query execution errors that may have caused the time series data returned
   511    // to be incomplete.
   512    repeated ntt.rpc.Status execution_errors = 3;
   513  
   514    // ErrorDetails is used when one of the queried regions fails to produce
   515    // results. It is used in execution_errors field (see subfield
   516    // ntt.rpc.Status.details).
   517    message ErrorDetails {
   518      // region id which failed to give results.
   519      string region_id = 1;
   520    }
   521  }
   522  
   523  // Response message for method
   524  // [QueryServiceTimeSeriesStats][ntt.monitoring.v4.QueryServiceTimeSeriesStats]
   525  message QueryServiceTimeSeriesStatsRequest {
   526    string service = 1;
   527  
   528    // Region ID from which stats should e obtained
   529    string region_id = 2;
   530  
   531    google.protobuf.Duration ap = 3;
   532  
   533    // The time interval for which results should be returned.
   534    TimeInterval interval = 4;
   535  
   536    // A positive number that is the maximum number of results to return. If
   537    // `page_size` is empty or more than 100,000 results, the effective
   538    // `page_size` is 100,000 results.
   539    int32 page_size = 5;
   540  
   541    // If this field is not empty then it must contain the `nextPageToken` value
   542    // returned by a previous call to this method.  Using this field causes the
   543    // method to return additional results from the previous method call.
   544    string page_token = 6;
   545  
   546    // Optional list of user projects for which we want to get stats. If provided,
   547    // statistics will be grouped by them.
   548    repeated string user_project_ids = 7;
   549  
   550    StatsQuery query = 8;
   551  }
   552  
   553  // Response message for method
   554  // [QueryServiceTimeSeriesStats][ntt.monitoring.v4.QueryServiceTimeSeriesStats]
   555  message QueryServiceTimeSeriesStatsResponse {
   556    // One or more time series that match the request.
   557    repeated TimeSerie time_series = 1;
   558  
   559    // If there are more results than have been returned, then this field is set
   560    // to a non-empty value.  To see the additional results,
   561    // use that value as `pageToken` in the next call to this method.
   562    string next_page_token = 2;
   563  
   564    // Query execution errors that may have caused the time series data returned
   565    // to be incomplete.
   566    repeated ntt.rpc.Status execution_errors = 3;
   567  
   568    // ErrorDetails is used when one of the queried regions fails to produce
   569    // results. It is used in execution_errors field (see subfield
   570    // ntt.rpc.Status.details).
   571    message ErrorDetails {
   572      // region id which failed to give results.
   573      string region_id = 1;
   574    }
   575  }
   576  
   577  message WatchTimeSeriesRequest {
   578    // The project on which to execute the request. The format is
   579    // "projects/{project_id}", or
   580    // "projects/{project_id}/regions/{region_id}/buckets/{bucket_id}"
   581    string parent = 1;
   582  
   583    // A monitoring filter that specifies which time
   584    // series should be returned.  The filter must specify a single metric type,
   585    // and can additionally specify metric labels and other information. For
   586    // example:
   587    //
   588    //     metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND
   589    //         metric.label.instance_name = "my-instance-name"
   590    string filter = 2;
   591  
   592    // Instructs how to transform individual time series (aligner) and combine
   593    // them together (reducer, group by fields).
   594    Aggregation aggregation = 3;
   595  
   596    // Amount of past data to fetch when new time series key appears (not present
   597    // in current session). For example: If client lost previous watch session for
   598    // 15 minutes, they can set this field value to 15 minutes duration + 1 extra
   599    // AlignmentPeriod value just in case. Initial time series in response will
   600    // contain extra past data. Once specific TimeSeries key was already observed,
   601    // further values will be coming only from realtime watch.
   602    // This field has lower priority than starting_time!
   603    google.protobuf.Duration snapshot_interval_to_fetch = 4;
   604  
   605    // For every new unique time series key monitoring will try to fetch past
   606    // data from given starting time. This is useful for recovery purposes, if
   607    // client has lost previous watch session. Once snapshot is retrieved for
   608    // given key, further data will contain live updates. This field takes
   609    // priority over snapshot_interval_to_fetch.
   610    google.protobuf.Timestamp starting_time = 5;
   611  }
   612  
   613  message WatchTimeSeriesResponse { repeated TimeSerie time_series = 1; }