blob: e9852173ea9afd55be3740ce77490e8c7fe504ce [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";
10
11message ConfigEventType {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +030012 enum Types {
Zack Williams52209662019-02-07 10:15:31 -070013 add = 0; // A new config has been added
14 remove = 1; // A config has been removed
15 update = 2; // A config has been updated
16 }
17}
18
19message ConfigEvent {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +030020 ConfigEventType.Types type = 1;
Zack Williams52209662019-02-07 10:15:31 -070021
22 string hash = 2; // hash for this change, can be used for quick lookup
23 string data = 3; // the actual new data, in json format
24}
25
26message KpiEventType {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +030027 enum Types {
Zack Williams52209662019-02-07 10:15:31 -070028 slice = 0; // slice: a set of path/metric data for same time-stamp
29 ts = 1; // time-series: array of data for same metric
30 }
31}
32
33/*
34 * Struct to convey a dictionary of metric metadata.
35 */
36message MetricMetaData {
37 string title = 1; // Metric group or individual metric name
38 double ts = 2; // UTC time-stamp of data (seconds since epoch) of
39 // when the metric or metric group was collected.
40 // If this is a 15-min historical group, it is the
41 // time of the collection and reporting, not the
42 // start or end of the 15-min group interval.
43
44 string logical_device_id = 3; // The logical device ID of the VOLTHA
45 // (equivalent to the DPID that ONOS has
46 // for the VOLTHA device without the
47 // 'of:' prefix
48 string serial_no = 4; // The OLT, ONU, ... device serial number
49 string device_id = 5; // The OLT, ONU, ... physical device ID
50
51 map<string, string> context = 6; // Name value pairs that provide additional
52 // context information on the metrics being
53 // reported.
54}
55
56/*
57 * Struct to convey a dictionary of metric->value pairs. Typically used in
58 * pure shared-timestamp or shared-timestamp + shared object prefix situations.
59 */
60message MetricValuePairs {
61
62 // Metric / value pairs.
63 map<string, float> metrics = 1;
64
65}
66
67/*
68 * Struct to group metadata for a metric (or group of metrics) with the key-value
69 * pairs of collected metrics
70 */
71message MetricInformation {
72 MetricMetaData metadata = 1;
73 map<string, float> metrics = 2;
74}
75
76/*
77 * Legacy KPI Event structured. In mid-August, the KPI event format was updated
78 * to a more easily parsable format. See VOL-1140
79 * for more information.
80 */
81message KpiEvent {
82
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +030083 KpiEventType.Types type = 1;
Zack Williams52209662019-02-07 10:15:31 -070084
85 // Fields used when for slice:
86
87 float ts = 2; // UTC time-stamp of data in slice mode (seconds since epoc)
88
89 map<string, MetricValuePairs> prefixes = 3;
90
91}
92
93message KpiEvent2 {
94 // Type of KPI Event
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +030095 KpiEventType.Types type = 1;
Zack Williams52209662019-02-07 10:15:31 -070096
97 // Fields used when for slice:
98 double ts = 2; // UTC time-stamp of data in slice mode (seconds since epoch)
99 // of the time this entire KpiEvent was published to the kafka bus
100
101 repeated MetricInformation slice_data = 3;
102}
103
104/*
105 * Identify to the area of the system impacted by the alarm
Devmalya Paulf98ca132019-07-09 06:14:19 -0400106 * To be deprecated once python version of OpenOLT adapter
107 * moves to the new event defination for device alarms
Zack Williams52209662019-02-07 10:15:31 -0700108 */
109message AlarmEventType {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300110 enum Types {
Zack Williams52209662019-02-07 10:15:31 -0700111 COMMUNICATION = 0;
112 ENVIRONMENT = 1;
113 EQUIPMENT = 2;
114 SERVICE = 3;
115 PROCESSING = 4;
116 SECURITY = 5;
117 }
118}
119
120/*
121 * Identify to the functional category originating the alarm
Devmalya Paulf98ca132019-07-09 06:14:19 -0400122 * To be deprecated once python version of OpenOLT adapter
123 * as well as OpenONU adapter moves to the new event
124 * defination for device alarms
Zack Williams52209662019-02-07 10:15:31 -0700125 */
126message AlarmEventCategory {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300127 enum Types {
Zack Williams52209662019-02-07 10:15:31 -0700128 PON = 0;
129 OLT = 1;
130 ONT = 2;
131 ONU = 3;
132 NNI = 4;
133 }
134}
135
136/*
137 * Active state of the alarm
Devmalya Paulf98ca132019-07-09 06:14:19 -0400138 * To be deprecated once python version of OpenOLT adapter
139 * as well as OpenONU adapter moves to the new event
140 * defination for device alarms
Zack Williams52209662019-02-07 10:15:31 -0700141 */
142message AlarmEventState {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300143 enum Types {
Zack Williams52209662019-02-07 10:15:31 -0700144 RAISED = 0;
145 CLEARED = 1;
146 }
147}
148
149/*
150 * Identify the overall impact of the alarm on the system
Devmalya Paulf98ca132019-07-09 06:14:19 -0400151 * To be deprecated once python version of OpenOLT adapter
152 * as well as OpenONU adapter moves to the new event
153 * defination for device alarms
Zack Williams52209662019-02-07 10:15:31 -0700154 */
155message AlarmEventSeverity {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300156 enum Types {
Zack Williams52209662019-02-07 10:15:31 -0700157 INDETERMINATE = 0;
158 WARNING = 1;
159 MINOR = 2;
160 MAJOR = 3;
161 CRITICAL = 4;
162 }
163}
164
165/*
Devmalya Paulf98ca132019-07-09 06:14:19 -0400166 * To be deprecated once python version of OpenOLT adapter
167 * as well as OpenONU adapter moves to the new event
168 * defination for device alarms
Zack Williams52209662019-02-07 10:15:31 -0700169 */
170message AlarmEvent {
171 // Unique ID for this alarm. e.g. voltha.some_olt.1234
172 string id = 1;
173
174 // Refers to the area of the system impacted by the alarm
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300175 AlarmEventType.Types type = 2;
Zack Williams52209662019-02-07 10:15:31 -0700176
177 // Refers to functional category of the alarm
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300178 AlarmEventCategory.Types category = 3;
Zack Williams52209662019-02-07 10:15:31 -0700179
180 // Current active state of the alarm
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300181 AlarmEventState.Types state = 4;
Zack Williams52209662019-02-07 10:15:31 -0700182
183 // Overall impact of the alarm on the system
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300184 AlarmEventSeverity.Types severity = 5;
Zack Williams52209662019-02-07 10:15:31 -0700185
186 // Timestamp at which the alarm was first raised
187 float raised_ts = 6;
188
189 // Timestamp at which the alarm was reported
190 float reported_ts = 7;
191
192 // Timestamp at which the alarm has changed since it was raised
193 float changed_ts = 8;
194
195 // Identifier of the originating resource of the alarm
196 string resource_id = 9;
197
198 // Textual explanation of the alarm
199 string description = 10;
200
201 // Key/Value storage for extra information that may give context to the alarm
202 map<string, string> context = 11;
203
204 // logical device id
205 string logical_device_id = 12;
206
207 // alarm_type name indicates clearly the name of the alarm
208 string alarm_type_name = 13;
209}
Devmalya Paulf98ca132019-07-09 06:14:19 -0400210/*
211 * Describes the events specific to device
212 */
213message DeviceEvent {
214 // Identifier of the originating resource of the event, for ex: device_id
215 string resource_id = 1;
216
217 // device_event_name indicates clearly the name of the device event
218 string device_event_name = 2;
219
220 // Textual explanation of the device event
221 string description = 3;
222
223 // Key/Value storage for extra information that may give context to the event
224 map<string, string> context = 4;
225
226}
227
228/*
229 * Identify the area of the system impacted by the event.
230 */
231message EventCategory {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300232 enum Types {
Devmalya Paulf98ca132019-07-09 06:14:19 -0400233 COMMUNICATION = 0;
234 ENVIRONMENT = 1;
235 EQUIPMENT = 2;
236 SERVICE = 3;
237 PROCESSING = 4;
238 SECURITY = 5;
239 // Add new event areas here
240 }
241}
242
243/*
244 * Identify the functional category originating the event
245 */
246message EventSubCategory {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300247 enum Types {
Devmalya Paulf98ca132019-07-09 06:14:19 -0400248 PON = 0;
249 OLT = 1;
250 ONT = 2;
251 ONU = 3;
252 NNI = 4;
253 // Add new event categories here.
254 }
255}
256
257/*
258 * Identify the type of event
259*/
260message EventType {
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300261 enum Types {
Devmalya Paulf98ca132019-07-09 06:14:19 -0400262 CONFIG_EVENT = 0;
263 KPI_EVENT = 1;
264 KPI_EVENT2 = 2;
265 DEVICE_EVENT = 3;
266
267 }
268}
269
270/*
271 * Identify the functional category originating the event
272 */
273message EventHeader {
274 // Unique ID for this event. e.g. voltha.some_olt.1234
275 string id = 1;
276
277 // Refers to the functional area affect by the event
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300278 EventCategory.Types category = 2;
Devmalya Paulf98ca132019-07-09 06:14:19 -0400279
280 // Refers to functional category of the event
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300281 EventSubCategory.Types sub_category = 3;
Devmalya Paulf98ca132019-07-09 06:14:19 -0400282
283 // Refers to the type of the event
Serkant Uluderyacbcfaa42019-10-18 13:25:08 +0300284 EventType.Types type = 4;
Devmalya Paulf98ca132019-07-09 06:14:19 -0400285
286 // The version identifier for this event type, thus allowing each
287 // event type to evolve independently. The version should be in the
288 // format “MAJOR.MINOR” format and minor changes must only be additive
289 // and non-breaking.
290 string type_version = 5;
291
292 // Timestamp at which the event was first raised.
293 // This represents the UTC time stamp since epoch (in seconds) when the
294 // the event was first raised from the source entity.
295 // If the source entity doesn't send the raised_ts, this shall be set
296 // to timestamp when the event was received.
297 float raised_ts = 6;
298
299 // Timestamp at which the event was reported.
300 // This represents the UTC time stamp since epoch (in seconds) when the
301 // the event was reported (this time stamp is >= raised_ts).
302 // If the source entity that reported this event doesn't send the
303 // reported_ts, this shall be set to the same value as raised_ts.
304 float reported_ts = 7;
305
306
307}
308
309/*
310 * Event Structure
311 */
312message Event {
313 // event header
314 EventHeader header = 1;
315
316 // oneof event types referred by EventType.
317 oneof event_type {
318 // Refers to ConfigEvent
319 ConfigEvent config_event = 2;
320
321 // Refers to KpiEvent
322 KpiEvent kpi_event = 3;
323
324 // Refers to KpiEvent2
325 KpiEvent2 kpi_event2 = 4;
326
327 // Refers to DeviceEvent
328 DeviceEvent device_event = 5;
329
330 // Add other event types here.
331
332 }
333}
334