monitoring.proto 1.83 KB
Newer Older
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
// Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

Ricard Vilalta's avatar
Ricard Vilalta committed
syntax = "proto3";
package monitoring;

import "context.proto";
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
import "kpi_sample_types.proto";
Ricard Vilalta's avatar
Ricard Vilalta committed

service MonitoringService {
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
  rpc CreateKpi       (KpiDescriptor    ) returns (KpiId        ) {}
  rpc GetKpiDescriptor(KpiId            ) returns (KpiDescriptor) {}
  rpc IncludeKpi      (Kpi              ) returns (context.Empty) {}
  rpc MonitorKpi      (MonitorKpiRequest) returns (context.Empty) {}
  rpc GetStreamKpi    (KpiId            ) returns (stream Kpi   ) {}
  rpc GetInstantKpi   (KpiId            ) returns (Kpi          ) {}
Ricard Vilalta's avatar
Ricard Vilalta committed
}

Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
message KpiDescriptor {
  string kpi_description = 1;
  kpi_sample_types.KpiSampleType kpi_sample_type = 2;
  context.DeviceId device_id = 3;
  context.EndPointId endpoint_id = 4;
  context.ServiceId  service_id  = 5;
//  context.SliceId    slice_id    = 6;
}

message MonitorKpiRequest{
Ricard Vilalta's avatar
Ricard Vilalta committed
  KpiId kpi_id = 1;
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
  float sampling_duration_s = 2;
  float sampling_interval_s = 3;
Ricard Vilalta's avatar
Ricard Vilalta committed
}

message KpiId {
  context.Uuid kpi_id = 1;
}

Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
message Kpi {
Ricard Vilalta's avatar
Ricard Vilalta committed
  KpiId kpi_id = 1;
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
  string timestamp = 2;
  KpiValue kpi_value = 4;
Ricard Vilalta's avatar
Ricard Vilalta committed
}

message KpiValue {
  oneof value {
    uint32 intVal = 1;
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    float floatVal = 2;
    string stringVal = 3;
    bool boolVal = 4;
Ricard Vilalta's avatar
Ricard Vilalta committed
  }
}

Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
message KpiList {
  repeated Kpi kpi_list = 1;
}