blob: 0ef12a49a084b9362577091a56848b63bf2a2156 [file] [log] [blame]
Zack Williams52209662019-02-07 10:15:31 -07001syntax = "proto3";
2
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +03003option go_package = "github.com/opencord/voltha-protos/v3/go/voltha";
4option java_package = "org.opencord.voltha";
Zack Williams52209662019-02-07 10:15:31 -07005
6package voltha;
7
8import "voltha_protos/meta.proto";
9import "google/api/annotations.proto";
Scott Baker7c854aa2020-02-10 17:25:31 -080010import "google/protobuf/timestamp.proto";
Zack Williams52209662019-02-07 10:15:31 -070011
12message ConfigEventType {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +030013 enum Types {
Zack Williams52209662019-02-07 10:15:31 -070014 add = 0; // A new config has been added
15 remove = 1; // A config has been removed
16 update = 2; // A config has been updated
17 }
18}
19
20message ConfigEvent {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +030021 ConfigEventType.Types type = 1;
Zack Williams52209662019-02-07 10:15:31 -070022
23 string hash = 2; // hash for this change, can be used for quick lookup
24 string data = 3; // the actual new data, in json format
25}
26
27message KpiEventType {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +030028 enum Types {
Zack Williams52209662019-02-07 10:15:31 -070029 slice = 0; // slice: a set of path/metric data for same time-stamp
30 ts = 1; // time-series: array of data for same metric
31 }
32}
33
34/*
35 * Struct to convey a dictionary of metric metadata.
36 */
37message MetricMetaData {
38 string title = 1; // Metric group or individual metric name
39 double ts = 2; // UTC time-stamp of data (seconds since epoch) of
40 // when the metric or metric group was collected.
41 // If this is a 15-min historical group, it is the
42 // time of the collection and reporting, not the
43 // start or end of the 15-min group interval.
44
45 string logical_device_id = 3; // The logical device ID of the VOLTHA
46 // (equivalent to the DPID that ONOS has
47 // for the VOLTHA device without the
48 // 'of:' prefix
49 string serial_no = 4; // The OLT, ONU, ... device serial number
50 string device_id = 5; // The OLT, ONU, ... physical device ID
51
52 map<string, string> context = 6; // Name value pairs that provide additional
53 // context information on the metrics being
54 // reported.
onkar.kundargi7b85fa12020-02-27 13:19:22 +053055
56 string uuid = 7; // Transaction identifier used to match On
57 // Demand gRPC requests with kafka responses
Zack Williams52209662019-02-07 10:15:31 -070058}
59
60/*
61 * Struct to convey a dictionary of metric->value pairs. Typically used in
62 * pure shared-timestamp or shared-timestamp + shared object prefix situations.
63 */
64message MetricValuePairs {
65
66 // Metric / value pairs.
67 map<string, float> metrics = 1;
68
69}
70
71/*
72 * Struct to group metadata for a metric (or group of metrics) with the key-value
73 * pairs of collected metrics
74 */
75message MetricInformation {
76 MetricMetaData metadata = 1;
77 map<string, float> metrics = 2;
78}
79
80/*
81 * Legacy KPI Event structured. In mid-August, the KPI event format was updated
82 * to a more easily parsable format. See VOL-1140
83 * for more information.
84 */
85message KpiEvent {
86
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +030087 KpiEventType.Types type = 1;
Zack Williams52209662019-02-07 10:15:31 -070088
89 // Fields used when for slice:
90
91 float ts = 2; // UTC time-stamp of data in slice mode (seconds since epoc)
92
93 map<string, MetricValuePairs> prefixes = 3;
94
95}
96
97message KpiEvent2 {
98 // Type of KPI Event
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +030099 KpiEventType.Types type = 1;
Zack Williams52209662019-02-07 10:15:31 -0700100
101 // Fields used when for slice:
102 double ts = 2; // UTC time-stamp of data in slice mode (seconds since epoch)
103 // of the time this entire KpiEvent was published to the kafka bus
104
105 repeated MetricInformation slice_data = 3;
106}
107
108/*
109 * Identify to the area of the system impacted by the alarm
Devmalya Paulf98ca132019-07-09 06:14:19 -0400110 * To be deprecated once python version of OpenOLT adapter
111 * moves to the new event defination for device alarms
Zack Williams52209662019-02-07 10:15:31 -0700112 */
113message AlarmEventType {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300114 enum Types {
Zack Williams52209662019-02-07 10:15:31 -0700115 COMMUNICATION = 0;
116 ENVIRONMENT = 1;
117 EQUIPMENT = 2;
118 SERVICE = 3;
119 PROCESSING = 4;
120 SECURITY = 5;
121 }
122}
123
124/*
125 * Identify to the functional category originating the alarm
Devmalya Paulf98ca132019-07-09 06:14:19 -0400126 * To be deprecated once python version of OpenOLT adapter
127 * as well as OpenONU adapter moves to the new event
128 * defination for device alarms
Zack Williams52209662019-02-07 10:15:31 -0700129 */
130message AlarmEventCategory {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300131 enum Types {
Zack Williams52209662019-02-07 10:15:31 -0700132 PON = 0;
133 OLT = 1;
134 ONT = 2;
135 ONU = 3;
136 NNI = 4;
137 }
138}
139
140/*
141 * Active state of the alarm
Devmalya Paulf98ca132019-07-09 06:14:19 -0400142 * To be deprecated once python version of OpenOLT adapter
143 * as well as OpenONU adapter moves to the new event
144 * defination for device alarms
Zack Williams52209662019-02-07 10:15:31 -0700145 */
146message AlarmEventState {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300147 enum Types {
Zack Williams52209662019-02-07 10:15:31 -0700148 RAISED = 0;
149 CLEARED = 1;
150 }
151}
152
153/*
154 * Identify the overall impact of the alarm on the system
Devmalya Paulf98ca132019-07-09 06:14:19 -0400155 * To be deprecated once python version of OpenOLT adapter
156 * as well as OpenONU adapter moves to the new event
157 * defination for device alarms
Zack Williams52209662019-02-07 10:15:31 -0700158 */
159message AlarmEventSeverity {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300160 enum Types {
Zack Williams52209662019-02-07 10:15:31 -0700161 INDETERMINATE = 0;
162 WARNING = 1;
163 MINOR = 2;
164 MAJOR = 3;
165 CRITICAL = 4;
166 }
167}
168
169/*
Devmalya Paulf98ca132019-07-09 06:14:19 -0400170 * To be deprecated once python version of OpenOLT adapter
171 * as well as OpenONU adapter moves to the new event
172 * defination for device alarms
Zack Williams52209662019-02-07 10:15:31 -0700173 */
174message AlarmEvent {
175 // Unique ID for this alarm. e.g. voltha.some_olt.1234
176 string id = 1;
177
178 // Refers to the area of the system impacted by the alarm
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300179 AlarmEventType.Types type = 2;
Zack Williams52209662019-02-07 10:15:31 -0700180
181 // Refers to functional category of the alarm
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300182 AlarmEventCategory.Types category = 3;
Zack Williams52209662019-02-07 10:15:31 -0700183
184 // Current active state of the alarm
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300185 AlarmEventState.Types state = 4;
Zack Williams52209662019-02-07 10:15:31 -0700186
187 // Overall impact of the alarm on the system
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300188 AlarmEventSeverity.Types severity = 5;
Zack Williams52209662019-02-07 10:15:31 -0700189
190 // Timestamp at which the alarm was first raised
Scott Baker7c854aa2020-02-10 17:25:31 -0800191 // TODO: Is this obsolete? Eventheader already has a raised_ts
192 google.protobuf.Timestamp raised_ts = 6;
Zack Williams52209662019-02-07 10:15:31 -0700193
194 // Timestamp at which the alarm was reported
Scott Baker7c854aa2020-02-10 17:25:31 -0800195 // TODO: Is this obsolete? Eventheader already has a reported_ts
196 google.protobuf.Timestamp reported_ts = 7;
Zack Williams52209662019-02-07 10:15:31 -0700197
198 // Timestamp at which the alarm has changed since it was raised
Scott Baker7c854aa2020-02-10 17:25:31 -0800199 google.protobuf.Timestamp changed_ts = 8;
Zack Williams52209662019-02-07 10:15:31 -0700200
201 // Identifier of the originating resource of the alarm
202 string resource_id = 9;
203
204 // Textual explanation of the alarm
205 string description = 10;
206
207 // Key/Value storage for extra information that may give context to the alarm
208 map<string, string> context = 11;
209
210 // logical device id
211 string logical_device_id = 12;
212
213 // alarm_type name indicates clearly the name of the alarm
214 string alarm_type_name = 13;
215}
Devmalya Paulf98ca132019-07-09 06:14:19 -0400216/*
217 * Describes the events specific to device
218 */
219message DeviceEvent {
220 // Identifier of the originating resource of the event, for ex: device_id
221 string resource_id = 1;
222
223 // device_event_name indicates clearly the name of the device event
224 string device_event_name = 2;
225
226 // Textual explanation of the device event
227 string description = 3;
228
229 // Key/Value storage for extra information that may give context to the event
230 map<string, string> context = 4;
231
232}
233
234/*
235 * Identify the area of the system impacted by the event.
236 */
237message EventCategory {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300238 enum Types {
Devmalya Paulf98ca132019-07-09 06:14:19 -0400239 COMMUNICATION = 0;
240 ENVIRONMENT = 1;
241 EQUIPMENT = 2;
242 SERVICE = 3;
243 PROCESSING = 4;
244 SECURITY = 5;
245 // Add new event areas here
246 }
247}
248
249/*
250 * Identify the functional category originating the event
251 */
252message EventSubCategory {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300253 enum Types {
Devmalya Paulf98ca132019-07-09 06:14:19 -0400254 PON = 0;
255 OLT = 1;
256 ONT = 2;
257 ONU = 3;
258 NNI = 4;
259 // Add new event categories here.
260 }
261}
262
263/*
264 * Identify the type of event
265*/
266message EventType {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300267 enum Types {
Devmalya Paulf98ca132019-07-09 06:14:19 -0400268 CONFIG_EVENT = 0;
269 KPI_EVENT = 1;
270 KPI_EVENT2 = 2;
271 DEVICE_EVENT = 3;
272
273 }
274}
275
276/*
277 * Identify the functional category originating the event
278 */
279message EventHeader {
280 // Unique ID for this event. e.g. voltha.some_olt.1234
281 string id = 1;
282
283 // Refers to the functional area affect by the event
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300284 EventCategory.Types category = 2;
Devmalya Paulf98ca132019-07-09 06:14:19 -0400285
286 // Refers to functional category of the event
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300287 EventSubCategory.Types sub_category = 3;
Devmalya Paulf98ca132019-07-09 06:14:19 -0400288
289 // Refers to the type of the event
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300290 EventType.Types type = 4;
Devmalya Paulf98ca132019-07-09 06:14:19 -0400291
292 // The version identifier for this event type, thus allowing each
293 // event type to evolve independently. The version should be in the
294 // format “MAJOR.MINOR” format and minor changes must only be additive
295 // and non-breaking.
296 string type_version = 5;
297
298 // Timestamp at which the event was first raised.
299 // This represents the UTC time stamp since epoch (in seconds) when the
300 // the event was first raised from the source entity.
301 // If the source entity doesn't send the raised_ts, this shall be set
302 // to timestamp when the event was received.
Scott Baker7c854aa2020-02-10 17:25:31 -0800303 google.protobuf.Timestamp raised_ts = 6;
Devmalya Paulf98ca132019-07-09 06:14:19 -0400304
305 // Timestamp at which the event was reported.
306 // This represents the UTC time stamp since epoch (in seconds) when the
307 // the event was reported (this time stamp is >= raised_ts).
308 // If the source entity that reported this event doesn't send the
309 // reported_ts, this shall be set to the same value as raised_ts.
Scott Baker7c854aa2020-02-10 17:25:31 -0800310 google.protobuf.Timestamp reported_ts = 7;
Devmalya Paulf98ca132019-07-09 06:14:19 -0400311
312
313}
314
315/*
316 * Event Structure
317 */
318message Event {
319 // event header
320 EventHeader header = 1;
321
322 // oneof event types referred by EventType.
323 oneof event_type {
324 // Refers to ConfigEvent
325 ConfigEvent config_event = 2;
326
327 // Refers to KpiEvent
328 KpiEvent kpi_event = 3;
329
330 // Refers to KpiEvent2
331 KpiEvent2 kpi_event2 = 4;
332
333 // Refers to DeviceEvent
334 DeviceEvent device_event = 5;
335
336 // Add other event types here.
337
338 }
339}
340