monitoring.proto 1.83 KB
Newer Older
Ricard Vilalta's avatar
Ricard Vilalta committed
//Example of topology
syntax = "proto3";
package monitoring;

import "context.proto";

service MonitoringService {
Javi Moreno's avatar
Javi Moreno committed
  rpc CreateKpi (KpiRequest) returns (KpiId) {}
  rpc IncludeKpi (IncludeKpiRequest) returns (context.Empty) {}
  rpc MonitorKpi (MonitorKpiRequest) returns (context.Empty) {}
  rpc MonitoriDeviceKpi (MonitorKpiRequest) returns (context.Empty) {}
  rpc GetStreamKpi ( KpiId ) returns (stream Kpi) {}
  rpc GetInstantKpi ( KpiId ) returns (Kpi) {}
}

message KpiRequest{
  string kpiDescription = 1;
  context.DeviceId device_id = 2;
  KpiSampleType kpi_sample_type = 3;
//  context.EndpointId endpoint_id = 4;  // others might be added
//  context.ServiceId  service_id  = 5;  // for monitoring other
//  context.SliceId    slice_id    = 6;  // entities
Ricard Vilalta's avatar
Ricard Vilalta committed
}

Javi Moreno's avatar
Javi Moreno committed
message MonitorKpiRequest{
  KpiId kpi_id = 1;
  uint32 Connexion_time_s = 2;
  uint32 sample_rate_ms = 3;
}

message IncludeKpiRequest{
    KpiId kpi_id = 1;
    string time_stamp = 2;
    KpiValue kpi_value= 3;
}

Ricard Vilalta's avatar
Ricard Vilalta committed
message Kpi {
  KpiId kpi_id = 1;
  string timestamp = 2;
  string kpiDescription = 3;
  KpiValue kpi_value = 4;
  KpiSampleType kpi_sample_type = 5;
  context.DeviceId device_id = 6;
//  context.EndpointId endpoint_id = 7;  // others might be added
//  context.ServiceId  service_id  = 8;  // for monitoring other
//  context.SliceId    slice_id    = 9;  // entities
Ricard Vilalta's avatar
Ricard Vilalta committed
}

message KpiId {
  context.Uuid kpi_id = 1;
}

message KpiDevice {
  KpiId kpi_id = 1;
  context.DeviceId device_id = 2;
}

enum KpiSampleType {
    UNKNOWN = 0;
    PACKETS_TRANSMITTED = 101;  // others might be added for
    PACKETS_RECEIVED    = 102;  // packet, optical, radio,...
    BYTES_TRANSMITTED   = 201;
    BYTES_RECEIVED      = 202;
}
Ricard Vilalta's avatar
Ricard Vilalta committed

message KpiList {
  repeated Kpi kpiList = 1;
}

message KpiValue {
  oneof value {
    uint32 intVal = 1;
    string stringVal = 2;
    bool boolVal = 3;
  }
}