monitoring.proto 1.21 KB
Newer Older
Ricard Vilalta's avatar
Ricard Vilalta committed
syntax = "proto3";
package monitoring;

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

service MonitoringService {
  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          ) {}
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;
Ricard Vilalta's avatar
Ricard Vilalta committed
}

Javi Moreno's avatar
Javi Moreno committed
message MonitorKpiRequest{
  KpiId kpi_id = 1;
  float sampling_duration_s = 2;
  float sampling_interval_s = 3;
message KpiId {
  context.Uuid kpi_id = 1;
Ricard Vilalta's avatar
Ricard Vilalta committed
message Kpi {
  KpiId kpi_id = 1;
  string timestamp = 2;
  KpiValue kpi_value = 4;
}

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

message KpiList {
  repeated Kpi kpi_list = 1;
}