blob: 235a0ec3805054523c52350d2a5ce0bc5ca9db20 [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.
55}
56
57/*
58 * Struct to convey a dictionary of metric->value pairs. Typically used in
59 * pure shared-timestamp or shared-timestamp + shared object prefix situations.
60 */
61message MetricValuePairs {
62
63 // Metric / value pairs.
64 map<string, float> metrics = 1;
65
66}
67
68/*
69 * Struct to group metadata for a metric (or group of metrics) with the key-value
70 * pairs of collected metrics
71 */
72message MetricInformation {
73 MetricMetaData metadata = 1;
74 map<string, float> metrics = 2;
75}
76
77/*
78 * Legacy KPI Event structured. In mid-August, the KPI event format was updated
79 * to a more easily parsable format. See VOL-1140
80 * for more information.
81 */
82message KpiEvent {
83
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +030084 KpiEventType.Types type = 1;
Zack Williams52209662019-02-07 10:15:31 -070085
86 // Fields used when for slice:
87
88 float ts = 2; // UTC time-stamp of data in slice mode (seconds since epoc)
89
90 map<string, MetricValuePairs> prefixes = 3;
91
92}
93
94message KpiEvent2 {
95 // Type of KPI Event
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +030096 KpiEventType.Types type = 1;
Zack Williams52209662019-02-07 10:15:31 -070097
98 // Fields used when for slice:
99 double ts = 2; // UTC time-stamp of data in slice mode (seconds since epoch)
100 // of the time this entire KpiEvent was published to the kafka bus
101
102 repeated MetricInformation slice_data = 3;
103}
104
105/*
106 * Identify to the area of the system impacted by the alarm
Devmalya Paulf98ca132019-07-09 06:14:19 -0400107 * To be deprecated once python version of OpenOLT adapter
108 * moves to the new event defination for device alarms
Zack Williams52209662019-02-07 10:15:31 -0700109 */
110message AlarmEventType {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300111 enum Types {
Zack Williams52209662019-02-07 10:15:31 -0700112 COMMUNICATION = 0;
113 ENVIRONMENT = 1;
114 EQUIPMENT = 2;
115 SERVICE = 3;
116 PROCESSING = 4;
117 SECURITY = 5;
118 }
119}
120
121/*
122 * Identify to the functional category originating the alarm
Devmalya Paulf98ca132019-07-09 06:14:19 -0400123 * To be deprecated once python version of OpenOLT adapter
124 * as well as OpenONU adapter moves to the new event
125 * defination for device alarms
Zack Williams52209662019-02-07 10:15:31 -0700126 */
127message AlarmEventCategory {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300128 enum Types {
Zack Williams52209662019-02-07 10:15:31 -0700129 PON = 0;
130 OLT = 1;
131 ONT = 2;
132 ONU = 3;
133 NNI = 4;
134 }
135}
136
137/*
138 * Active state of the alarm
Devmalya Paulf98ca132019-07-09 06:14:19 -0400139 * To be deprecated once python version of OpenOLT adapter
140 * as well as OpenONU adapter moves to the new event
141 * defination for device alarms
Zack Williams52209662019-02-07 10:15:31 -0700142 */
143message AlarmEventState {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300144 enum Types {
Zack Williams52209662019-02-07 10:15:31 -0700145 RAISED = 0;
146 CLEARED = 1;
147 }
148}
149
150/*
151 * Identify the overall impact of the alarm on the system
Devmalya Paulf98ca132019-07-09 06:14:19 -0400152 * To be deprecated once python version of OpenOLT adapter
153 * as well as OpenONU adapter moves to the new event
154 * defination for device alarms
Zack Williams52209662019-02-07 10:15:31 -0700155 */
156message AlarmEventSeverity {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300157 enum Types {
Zack Williams52209662019-02-07 10:15:31 -0700158 INDETERMINATE = 0;
159 WARNING = 1;
160 MINOR = 2;
161 MAJOR = 3;
162 CRITICAL = 4;
163 }
164}
165
166/*
Devmalya Paulf98ca132019-07-09 06:14:19 -0400167 * To be deprecated once python version of OpenOLT adapter
168 * as well as OpenONU adapter moves to the new event
169 * defination for device alarms
Zack Williams52209662019-02-07 10:15:31 -0700170 */
171message AlarmEvent {
172 // Unique ID for this alarm. e.g. voltha.some_olt.1234
173 string id = 1;
174
175 // Refers to the area of the system impacted by the alarm
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300176 AlarmEventType.Types type = 2;
Zack Williams52209662019-02-07 10:15:31 -0700177
178 // Refers to functional category of the alarm
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300179 AlarmEventCategory.Types category = 3;
Zack Williams52209662019-02-07 10:15:31 -0700180
181 // Current active state of the alarm
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300182 AlarmEventState.Types state = 4;
Zack Williams52209662019-02-07 10:15:31 -0700183
184 // Overall impact of the alarm on the system
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300185 AlarmEventSeverity.Types severity = 5;
Zack Williams52209662019-02-07 10:15:31 -0700186
187 // Timestamp at which the alarm was first raised
Scott Baker7c854aa2020-02-10 17:25:31 -0800188 // TODO: Is this obsolete? Eventheader already has a raised_ts
189 google.protobuf.Timestamp raised_ts = 6;
Zack Williams52209662019-02-07 10:15:31 -0700190
191 // Timestamp at which the alarm was reported
Scott Baker7c854aa2020-02-10 17:25:31 -0800192 // TODO: Is this obsolete? Eventheader already has a reported_ts
193 google.protobuf.Timestamp reported_ts = 7;
Zack Williams52209662019-02-07 10:15:31 -0700194
195 // Timestamp at which the alarm has changed since it was raised
Scott Baker7c854aa2020-02-10 17:25:31 -0800196 google.protobuf.Timestamp changed_ts = 8;
Zack Williams52209662019-02-07 10:15:31 -0700197
198 // Identifier of the originating resource of the alarm
199 string resource_id = 9;
200
201 // Textual explanation of the alarm
202 string description = 10;
203
204 // Key/Value storage for extra information that may give context to the alarm
205 map<string, string> context = 11;
206
207 // logical device id
208 string logical_device_id = 12;
209
210 // alarm_type name indicates clearly the name of the alarm
211 string alarm_type_name = 13;
212}
Devmalya Paulf98ca132019-07-09 06:14:19 -0400213/*
214 * Describes the events specific to device
215 */
216message DeviceEvent {
217 // Identifier of the originating resource of the event, for ex: device_id
218 string resource_id = 1;
219
220 // device_event_name indicates clearly the name of the device event
221 string device_event_name = 2;
222
223 // Textual explanation of the device event
224 string description = 3;
225
226 // Key/Value storage for extra information that may give context to the event
227 map<string, string> context = 4;
228
229}
230
231/*
232 * Identify the area of the system impacted by the event.
233 */
234message EventCategory {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300235 enum Types {
Devmalya Paulf98ca132019-07-09 06:14:19 -0400236 COMMUNICATION = 0;
237 ENVIRONMENT = 1;
238 EQUIPMENT = 2;
239 SERVICE = 3;
240 PROCESSING = 4;
241 SECURITY = 5;
242 // Add new event areas here
243 }
244}
245
246/*
247 * Identify the functional category originating the event
248 */
249message EventSubCategory {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300250 enum Types {
Devmalya Paulf98ca132019-07-09 06:14:19 -0400251 PON = 0;
252 OLT = 1;
253 ONT = 2;
254 ONU = 3;
255 NNI = 4;
256 // Add new event categories here.
257 }
258}
259
260/*
261 * Identify the type of event
262*/
263message EventType {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300264 enum Types {
Devmalya Paulf98ca132019-07-09 06:14:19 -0400265 CONFIG_EVENT = 0;
266 KPI_EVENT = 1;
267 KPI_EVENT2 = 2;
268 DEVICE_EVENT = 3;
269
270 }
271}
272
273/*
274 * Identify the functional category originating the event
275 */
276message EventHeader {
277 // Unique ID for this event. e.g. voltha.some_olt.1234
278 string id = 1;
279
280 // Refers to the functional area affect by the event
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300281 EventCategory.Types category = 2;
Devmalya Paulf98ca132019-07-09 06:14:19 -0400282
283 // Refers to functional category of the event
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300284 EventSubCategory.Types sub_category = 3;
Devmalya Paulf98ca132019-07-09 06:14:19 -0400285
286 // Refers to the type of the event
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300287 EventType.Types type = 4;
Devmalya Paulf98ca132019-07-09 06:14:19 -0400288
289 // The version identifier for this event type, thus allowing each
290 // event type to evolve independently. The version should be in the
291 // format “MAJOR.MINOR” format and minor changes must only be additive
292 // and non-breaking.
293 string type_version = 5;
294
295 // Timestamp at which the event was first raised.
296 // This represents the UTC time stamp since epoch (in seconds) when the
297 // the event was first raised from the source entity.
298 // If the source entity doesn't send the raised_ts, this shall be set
299 // to timestamp when the event was received.
Scott Baker7c854aa2020-02-10 17:25:31 -0800300 google.protobuf.Timestamp raised_ts = 6;
Devmalya Paulf98ca132019-07-09 06:14:19 -0400301
302 // Timestamp at which the event was reported.
303 // This represents the UTC time stamp since epoch (in seconds) when the
304 // the event was reported (this time stamp is >= raised_ts).
305 // If the source entity that reported this event doesn't send the
306 // reported_ts, this shall be set to the same value as raised_ts.
Scott Baker7c854aa2020-02-10 17:25:31 -0800307 google.protobuf.Timestamp reported_ts = 7;
Devmalya Paulf98ca132019-07-09 06:14:19 -0400308
309
310}
311
312/*
313 * Event Structure
314 */
315message Event {
316 // event header
317 EventHeader header = 1;
318
319 // oneof event types referred by EventType.
320 oneof event_type {
321 // Refers to ConfigEvent
322 ConfigEvent config_event = 2;
323
324 // Refers to KpiEvent
325 KpiEvent kpi_event = 3;
326
327 // Refers to KpiEvent2
328 KpiEvent2 kpi_event2 = 4;
329
330 // Refers to DeviceEvent
331 DeviceEvent device_event = 5;
332
333 // Add other event types here.
334
335 }
336}
337