William Kurkian | bd3736d | 2019-03-08 12:20:40 -0500 | [diff] [blame^] | 1 | syntax = "proto3"; |
| 2 | |
| 3 | option go_package = "github.com/opencord/voltha-protos/go/voltha"; |
| 4 | |
| 5 | package voltha; |
| 6 | |
| 7 | import "voltha_protos/meta.proto"; |
| 8 | import "google/api/annotations.proto"; |
| 9 | |
| 10 | message 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 | |
| 18 | message ConfigEvent { |
| 19 | ConfigEventType.ConfigEventType type = 1; |
| 20 | |
| 21 | string hash = 2; // hash for this change, can be used for quick lookup |
| 22 | string data = 3; // the actual new data, in json format |
| 23 | } |
| 24 | |
| 25 | message 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 | /* |
| 33 | * Struct to convey a dictionary of metric metadata. |
| 34 | */ |
| 35 | message 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 | /* |
| 56 | * Struct to convey a dictionary of metric->value pairs. Typically used in |
| 57 | * pure shared-timestamp or shared-timestamp + shared object prefix situations. |
| 58 | */ |
| 59 | message MetricValuePairs { |
| 60 | |
| 61 | // Metric / value pairs. |
| 62 | map<string, float> metrics = 1; |
| 63 | |
| 64 | } |
| 65 | |
| 66 | /* |
| 67 | * Struct to group metadata for a metric (or group of metrics) with the key-value |
| 68 | * pairs of collected metrics |
| 69 | */ |
| 70 | message MetricInformation { |
| 71 | MetricMetaData metadata = 1; |
| 72 | map<string, float> metrics = 2; |
| 73 | } |
| 74 | |
| 75 | /* |
| 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 | */ |
| 80 | message KpiEvent { |
| 81 | |
| 82 | KpiEventType.KpiEventType type = 1; |
| 83 | |
| 84 | // Fields used when for slice: |
| 85 | |
| 86 | float ts = 2; // UTC time-stamp of data in slice mode (seconds since epoc) |
| 87 | |
| 88 | map<string, MetricValuePairs> prefixes = 3; |
| 89 | |
| 90 | } |
| 91 | |
| 92 | message 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 | |
| 103 | /* |
| 104 | * Identify to the area of the system impacted by the alarm |
| 105 | */ |
| 106 | message 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 | */ |
| 120 | message AlarmEventCategory { |
| 121 | enum AlarmEventCategory { |
| 122 | PON = 0; |
| 123 | OLT = 1; |
| 124 | ONT = 2; |
| 125 | ONU = 3; |
| 126 | NNI = 4; |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | /* |
| 131 | * Active state of the alarm |
| 132 | */ |
| 133 | message 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 | */ |
| 143 | message 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 | */ |
| 156 | message AlarmEvent { |
| 157 | // Unique ID for this alarm. e.g. voltha.some_olt.1234 |
| 158 | string id = 1; |
| 159 | |
| 160 | // Refers to the area of the system impacted by the alarm |
| 161 | AlarmEventType.AlarmEventType type = 2; |
| 162 | |
| 163 | // Refers to functional category of the alarm |
| 164 | AlarmEventCategory.AlarmEventCategory category = 3; |
| 165 | |
| 166 | // Current active state of the alarm |
| 167 | AlarmEventState.AlarmEventState state = 4; |
| 168 | |
| 169 | // Overall impact of the alarm on the system |
| 170 | AlarmEventSeverity.AlarmEventSeverity severity = 5; |
| 171 | |
| 172 | // Timestamp at which the alarm was first raised |
| 173 | float raised_ts = 6; |
| 174 | |
| 175 | // Timestamp at which the alarm was reported |
| 176 | float reported_ts = 7; |
| 177 | |
| 178 | // Timestamp at which the alarm has changed since it was raised |
| 179 | float changed_ts = 8; |
| 180 | |
| 181 | // Identifier of the originating resource of the alarm |
| 182 | string resource_id = 9; |
| 183 | |
| 184 | // Textual explanation of the alarm |
| 185 | string description = 10; |
| 186 | |
| 187 | // Key/Value storage for extra information that may give context to the alarm |
| 188 | map<string, string> context = 11; |
| 189 | |
| 190 | // logical device id |
| 191 | string logical_device_id = 12; |
| 192 | |
| 193 | // alarm_type name indicates clearly the name of the alarm |
| 194 | string alarm_type_name = 13; |
| 195 | } |