github.com/cloudwan/edgelq-sdk@v1.15.4/devices/proto/v1/device_custom.proto (about) 1 syntax = "proto3"; 2 3 package ntt.devices.v1; 4 5 import "edgelq-sdk/common/api/credentials.proto"; 6 import "edgelq-sdk/devices/proto/v1/device.proto"; 7 import "edgelq-sdk/devices/proto/v1/device_change.proto"; 8 import "edgelq-sdk/monitoring/proto/v4/time_serie.proto"; 9 import "google/protobuf/duration.proto"; 10 import "google/protobuf/timestamp.proto"; 11 12 option go_package = "github.com/cloudwan/edgelq-sdk/devices/client/v1/device;device_client"; 13 option java_multiple_files = false; 14 option java_outer_classname = "DeviceCustomProto"; 15 option java_package = "com.ntt.devices.pb.v1"; 16 17 // A request message of the 18 // [GetDedicatedEndpoints][ntt.devices.v1.GetDedicatedEndpoints] 19 message GetDedicatedEndpointsRequest { string name = 1; } 20 21 // Response message for method 22 // [GetDedicatedEndpoints][ntt.devices.v1.GetDedicatedEndpoints] 23 message GetDedicatedEndpointsResponse { repeated string endpoints = 1; } 24 25 // Request message for method 26 // [ProvisionServiceAccountToDevice][ntt.devices.v1.ProvisionServiceAccountToDevice] 27 message ProvisionServiceAccountToDeviceRequest { 28 // Name of Device to provision service account. 29 // This method automatically generates a service account and a key for the 30 // device and assign the key to .Spec.ServiceAccount 31 string name = 1; 32 33 // external public key to use for service account for this device. 34 // If not present, a keypair will be generated by the server. 35 string external_pubkey = 2; 36 } 37 38 // Response message for method 39 // [ProvisionServiceAccountToDevice][ntt.devices.v1.ProvisionServiceAccountToDevice] 40 message ProvisionServiceAccountToDeviceResponse { 41 // The service account generated by the endpoint. Save the private key 42 // included. 43 ntt.api.ServiceAccount service_account = 1; 44 } 45 46 // Request message for method 47 // [RemoveServiceAccountFromDevice][ntt.devices.v1.RemoveServiceAccountFromDevice] 48 message RemoveServiceAccountFromDeviceRequest { 49 // Name of the Device to remove its service account 50 // The service account and the key will be automatically deleted as well when 51 // they have been generated automatically by `ProvisionServiceAccountToDevice` 52 // action. Otherwise, the service account will be kept intact. The device will 53 // lost the access to the resources in the project. 54 string name = 1; 55 } 56 57 // Response message for method 58 // [RemoveServiceAccountFromDevice][ntt.devices.v1.RemoveServiceAccountFromDevice] 59 message RemoveServiceAccountFromDeviceResponse {} 60 61 message HeartbeatMsg { 62 string name = 1; 63 64 oneof msg { 65 Register register = 2; 66 67 Heartbeat heartbeat = 3; 68 } 69 70 message Register {} 71 72 message Heartbeat {} 73 } 74 75 message HeartbeatResponse { 76 google.protobuf.Duration desired_heartbeat_interval = 1; 77 } 78 79 // A request message of the ReportDeviceMetrics method. 80 message ReportDeviceMetricsRequest { 81 // device_name abd region_id are required in first message for streaming 82 string name = 1; 83 84 string display_name = 3; 85 86 string serial_number = 4; 87 88 DeviceMetrics device_metrics = 2; 89 } 90 91 message DeviceMetrics { 92 uint64 uptime = 1; 93 94 uint64 memory_usage_bytes = 2; 95 96 float memory_utilization_percent = 3; 97 98 float load_average_1m = 4; 99 100 MemoryStats memory_stats = 5; 101 102 repeated CpuCoreStats cpu_stats = 6; 103 104 // should match order in repeated DiskMetricsLabel 105 repeated DiskMetric disk_metrics = 8; 106 107 // should match order in repeated DiskMetricsLabel 108 repeated HardwareMetric hardware_metrics = 10; 109 110 // should match order in repeated ModemMetricLabel 111 map<uint32, ModemMetric> modem_metrics = 12; 112 113 PerAntennaSignal per_antenna_signal = 13; 114 115 // should match order in repeated ContainerMetricLabel 116 map<uint32, ContainerMetric> container_metrics = 15; 117 118 // should match order in repeated PodMetricLabel 119 repeated PodMetric pod_metrics = 17; 120 121 google.protobuf.Timestamp metrics_time = 18; 122 123 // optional - only required when something changes or in first time the metric 124 // is sent 125 repeated DiskMetricsLabel disk_labels = 7; 126 127 // optional - only required when something changes or in first time the metric 128 // is sent 129 repeated HardwareMetricsLabel hardware_metrics_labels = 9; 130 131 // optional - only required when something changes or in first time the metric 132 // is sent 133 repeated ModemMetricLabel modem_metrics_labels = 11; 134 135 // optional - only required when something changes or in first time the metric 136 // is sent 137 repeated ContainerMetricLabel container_metrics_labels = 14; 138 139 // optional - only required when something changes or in first time the metric 140 // is sent 141 repeated PodMetricLabel pod_metrics_labels = 16; 142 143 repeated HealthCheckMetricLabel health_check_metric_labels = 19; 144 145 // should match order in health_check_metric_labels 146 map<uint32, HealthCheckMetric> health_check_metrics = 20; 147 148 // Sent only if there is some change 149 repeated string interface_name_labels = 21; 150 151 // Sent only if there is some change 152 repeated google.protobuf.Timestamp interface_counter_start_time = 22; 153 154 repeated InterfaceMetric interface_metrics = 23; 155 156 message MemoryStats { 157 uint64 buffered_memory = 1; 158 159 uint64 cached_memory = 2; 160 161 uint64 free_memory = 3; 162 163 uint64 used_memory = 4; 164 165 uint64 available_memory = 5; 166 167 uint64 shared_memory = 6; 168 } 169 170 message CpuCoreStats { 171 float user = 1; 172 173 float system = 2; 174 175 float idle = 3; 176 177 float nice = 4; 178 179 float iowait = 5; 180 181 float irq = 6; 182 183 float softirq = 7; 184 185 float steal = 8; 186 } 187 188 message DiskMetricsLabel { 189 string mount_point = 1; 190 191 string partition_label = 2; 192 193 string partition = 3; 194 } 195 196 message HardwareMetricsLabel { 197 string sensor_tag = 1; 198 199 string chip_tag = 2; 200 } 201 202 message DiskMetric { 203 uint64 disk_usage_bytes = 1; 204 205 float disk_utilization_percent = 2; 206 } 207 208 message HardwareMetric { 209 uint64 fan_speed = 1; 210 211 int64 temperature = 2; 212 213 float voltage = 3; 214 215 float power = 4; 216 } 217 218 message ModemMetricLabel { 219 MobileNetworkType cell_type = 1; 220 221 uint64 cell_id = 2; 222 223 uint64 physical_cell_id = 3; 224 225 uint64 tac = 4; 226 227 uint64 earfcn = 5; 228 } 229 230 message ModemMetric { 231 sint32 rssi = 1; 232 233 sint32 rsrp = 2; 234 235 float rsrq = 3; 236 237 float snr = 4; 238 } 239 240 message PerAntennaSignal { 241 repeated sint32 fiveg_rsrps = 1; 242 243 repeated float fiveg_rsrqs = 2; 244 245 repeated sint32 lte_rsrps = 3; 246 247 repeated float lte_rsrqs = 4; 248 } 249 250 message ContainerMetricLabel { 251 string pod_id = 1; 252 253 string container_id = 2; 254 } 255 256 message ContainerMetric { 257 float cpu_utilization = 1; 258 259 float memory_utilization = 2; 260 261 uint64 memory_usage_bytes = 3; 262 } 263 264 message PodMetricLabel { string pod_id = 1; } 265 266 message PodMetric { 267 uint64 pod_status = 1; 268 269 bool is_healthy = 2; 270 } 271 272 // Ideally labels should not change continuously. 273 // TODO: Check if status_summary and destination_host are an issue 274 message HealthCheckMetricLabel { 275 string health_check_name = 1; 276 277 string status_summary = 2; 278 279 string destination_host = 3; 280 281 string container_name = 4; 282 283 string pod_id = 5; 284 } 285 286 message HealthCheckMetric { 287 bool is_succeessful = 1; 288 289 uint64 http_response_time_micro_seconds = 2; 290 291 uint64 rtt_microseconds = 3; 292 } 293 294 message InterfaceMetric { 295 uint64 bytes_sent = 1; 296 297 uint64 bytes_recvd = 2; 298 299 uint64 packets_sent = 3; 300 301 uint64 packets_recvd = 4; 302 303 // in_errors - Sum of Errin, Dropin and Fifoin 304 uint64 in_err = 5; 305 306 // out errors - Sum of Errout, Dropout and Fifoout 307 uint64 out_err = 6; 308 } 309 } 310 311 message ReportDeviceMetricsResponse { 312 // List of newly seen time series headers with unique binary key 313 // observed in corresponding ReportDeviceMetricsRequest. 314 repeated ntt.monitoring.v4.TimeSerie new_time_series_headers = 2; 315 316 reserved 1; 317 } 318 319 enum MobileNetworkType { 320 FiveGNR = 0; 321 322 LTE = 1; 323 324 UMTS = 2; 325 }