blob: 725bb8c7ffc3cddd1180b31bf095f39f5f2c2ba8 [file] [log] [blame]
Zsolt Haraszti313c4be2016-12-27 11:06:53 -08001syntax = "proto3";
2
Stephane Barbarie35595062018-02-08 08:34:39 -05003option go_package = "github.com/opencord/voltha/protos/go/voltha";
4
Zsolt Haraszti313c4be2016-12-27 11:06:53 -08005package voltha;
6
7import "meta.proto";
8import "google/api/annotations.proto";
9
alshabibaf542aa2017-02-17 10:56:19 -080010message ConfigEventType {
11 enum ConfigEventType {
12 add = 0; // A new config has been added
13 remove = 1; // A config has been removed
14 update = 2; // A config has been updated
15 }
16}
17
18message ConfigEvent {
19 ConfigEventType.ConfigEventType type = 1;
20
21 string hash = 2; // hash for this change, can be used for quick lookup
alshabibfa007ce2017-02-22 22:19:51 -080022 string data = 3; // the actual new data, in json format
alshabibaf542aa2017-02-17 10:56:19 -080023}
Zsolt Haraszti313c4be2016-12-27 11:06:53 -080024
25message KpiEventType {
26 enum KpiEventType {
27 slice = 0; // slice: a set of path/metric data for same time-stamp
28 ts = 1; // time-series: array of data for same metric
29 }
30}
31
32/*
Chip Boling8f171622018-08-17 10:39:54 -050033 * Struct to convey a dictionary of metric metadata.
34 */
35message MetricMetaData {
36 string title = 1; // Metric group or individual metric name
37 double ts = 2; // UTC time-stamp of data (seconds since epoch) of
38 // when the metric or metric group was collected.
39 // If this is a 15-min historical group, it is the
40 // time of the collection and reporting, not the
41 // start or end of the 15-min group interval.
42
43 string logical_device_id = 3; // The logical device ID of the VOLTHA
44 // (equivalent to the DPID that ONOS has
45 // for the VOLTHA device without the
46 // 'of:' prefix
47 string serial_no = 4; // The OLT, ONU, ... device serial number
48 string device_id = 5; // The OLT, ONU, ... physical device ID
49
50 map<string, string> context = 6; // Name value pairs that provide additional
51 // context information on the metrics being
52 // reported.
53}
54
55/*
Zsolt Haraszti0778a242017-01-18 01:11:54 -080056 * Struct to convey a dictionary of metric->value pairs. Typically used in
57 * pure shared-timestamp or shared-timestamp + shared object prefix situations.
58 */
59message MetricValuePairs {
60
61 // Metric / value pairs.
62 map<string, float> metrics = 1;
63
64}
65
Chip Boling8f171622018-08-17 10:39:54 -050066/*
67 * Struct to group metadata for a metric (or group of metrics) with the key-value
68 * pairs of collected metrics
69 */
70message MetricInformation {
71 MetricMetaData metadata = 1;
72 map<string, float> metrics = 2;
73}
Zsolt Haraszti0778a242017-01-18 01:11:54 -080074
Chip Boling8f171622018-08-17 10:39:54 -050075/*
76 * Legacy KPI Event structured. In mid-August, the KPI event format was updated
77 * to a more easily parsable format. See VOL-1140
78 * for more information.
79 */
Zsolt Haraszti313c4be2016-12-27 11:06:53 -080080message KpiEvent {
81
Zsolt Haraszti0778a242017-01-18 01:11:54 -080082 KpiEventType.KpiEventType type = 1;
Zsolt Haraszti313c4be2016-12-27 11:06:53 -080083
84 // Fields used when for slice:
85
Stephane Barbariecc6b2e62017-03-02 14:35:55 -050086 float ts = 2; // UTC time-stamp of data in slice mode (seconds since epoc)
Zsolt Haraszti313c4be2016-12-27 11:06:53 -080087
Zsolt Haraszti0778a242017-01-18 01:11:54 -080088 map<string, MetricValuePairs> prefixes = 3;
Zsolt Haraszti313c4be2016-12-27 11:06:53 -080089
90}
Stephane Barbarie52198b92017-03-02 13:44:46 -050091
Chip Boling8f171622018-08-17 10:39:54 -050092message KpiEvent2 {
93 // Type of KPI Event
94 KpiEventType.KpiEventType type = 1;
95
96 // Fields used when for slice:
97 double ts = 2; // UTC time-stamp of data in slice mode (seconds since epoch)
98 // of the time this entire KpiEvent was published to the kafka bus
99
100 repeated MetricInformation slice_data = 3;
101}
102
Stephane Barbarie52198b92017-03-02 13:44:46 -0500103/*
104 * Identify to the area of the system impacted by the alarm
105 */
106message AlarmEventType {
107 enum AlarmEventType {
108 COMMUNICATION = 0;
109 ENVIRONMENT = 1;
110 EQUIPMENT = 2;
111 SERVICE = 3;
112 PROCESSING = 4;
113 SECURITY = 5;
114 }
115}
116
117/*
118 * Identify to the functional category originating the alarm
119 */
120message AlarmEventCategory {
121 enum AlarmEventCategory {
Stephane Barbariebf3e10c2017-03-03 10:15:58 -0500122 PON = 0;
Niren R Chidrawar06bbb6f2017-08-31 02:37:06 -0400123 OLT = 1;
124 ONT = 2;
mzadig7cda5ff2018-07-10 16:37:28 -0400125 ONU = 3;
Girish Gowdru4e854c22018-09-26 02:51:57 -0700126 NNI = 4;
Stephane Barbarie52198b92017-03-02 13:44:46 -0500127 }
128}
129
130/*
131 * Active state of the alarm
132 */
133message AlarmEventState {
134 enum AlarmEventState {
135 RAISED = 0;
136 CLEARED = 1;
137 }
138}
139
140/*
141 * Identify the overall impact of the alarm on the system
142 */
143message AlarmEventSeverity {
144 enum AlarmEventSeverity {
145 INDETERMINATE = 0;
146 WARNING = 1;
147 MINOR = 2;
148 MAJOR = 3;
149 CRITICAL = 4;
150 }
151}
152
153/*
154 *
155 */
156message AlarmEvent {
Stephane Barbariecc6b2e62017-03-02 14:35:55 -0500157 // Unique ID for this alarm. e.g. voltha.some_olt.1234
158 string id = 1;
Stephane Barbarie52198b92017-03-02 13:44:46 -0500159
Stephane Barbariecc6b2e62017-03-02 14:35:55 -0500160 // Refers to the area of the system impacted by the alarm
Stephane Barbariecc6b2e62017-03-02 14:35:55 -0500161 AlarmEventType.AlarmEventType type = 2;
Stephane Barbarie52198b92017-03-02 13:44:46 -0500162
Stephane Barbariebf3e10c2017-03-03 10:15:58 -0500163 // Refers to functional category of the alarm
Stephane Barbariecc6b2e62017-03-02 14:35:55 -0500164 AlarmEventCategory.AlarmEventCategory category = 3;
Stephane Barbarie52198b92017-03-02 13:44:46 -0500165
Stephane Barbariecc6b2e62017-03-02 14:35:55 -0500166 // Current active state of the alarm
Stephane Barbariecc6b2e62017-03-02 14:35:55 -0500167 AlarmEventState.AlarmEventState state = 4;
Stephane Barbarie52198b92017-03-02 13:44:46 -0500168
Stephane Barbariecc6b2e62017-03-02 14:35:55 -0500169 // Overall impact of the alarm on the system
Stephane Barbariecc6b2e62017-03-02 14:35:55 -0500170 AlarmEventSeverity.AlarmEventSeverity severity = 5;
Stephane Barbarie52198b92017-03-02 13:44:46 -0500171
Stephane Barbariecc6b2e62017-03-02 14:35:55 -0500172 // Timestamp at which the alarm was first raised
173 float raised_ts = 6;
Stephane Barbarie52198b92017-03-02 13:44:46 -0500174
Stephane Barbariecc6b2e62017-03-02 14:35:55 -0500175 // Timestamp at which the alarm was reported
176 float reported_ts = 7;
Stephane Barbarie52198b92017-03-02 13:44:46 -0500177
Stephane Barbariecc6b2e62017-03-02 14:35:55 -0500178 // Timestamp at which the alarm has changed since it was raised
179 float changed_ts = 8;
Stephane Barbarie52198b92017-03-02 13:44:46 -0500180
Stephane Barbariecc6b2e62017-03-02 14:35:55 -0500181 // Identifier of the originating resource of the alarm
182 string resource_id = 9;
Stephane Barbarie52198b92017-03-02 13:44:46 -0500183
Stephane Barbariecc6b2e62017-03-02 14:35:55 -0500184 // Textual explanation of the alarm
185 string description = 10;
Stephane Barbarie52198b92017-03-02 13:44:46 -0500186
Stephane Barbariecc6b2e62017-03-02 14:35:55 -0500187 // Key/Value storage for extra information that may give context to the alarm
188 map<string, string> context = 11;
mzadig7cda5ff2018-07-10 16:37:28 -0400189
190 // logical device id
191 string logical_device_id = 12;
mzadig428dd622018-09-12 15:09:33 -0400192
193 // alarm_type name indicates clearly the name of the alarm
194 string alarm_type_name = 13;
Stephane Barbarie35595062018-02-08 08:34:39 -0500195}