khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [diff] [blame] | 1 | syntax = "proto3"; |
| 2 | |
William Kurkian | daa6bb2 | 2019-03-07 12:26:28 -0500 | [diff] [blame] | 3 | option go_package = "github.com/opencord/voltha-protos/go/voltha"; |
khenaidoo | abad44c | 2018-08-03 16:58:35 -0400 | [diff] [blame] | 4 | |
| 5 | package voltha; |
| 6 | |
| 7 | import "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->value pairs. Typically used in |
| 34 | * pure shared-timestamp or shared-timestamp + shared object prefix situations. |
| 35 | */ |
| 36 | message MetricValuePairs { |
| 37 | |
| 38 | // Metric / value pairs. |
| 39 | map<string, float> metrics = 1; |
| 40 | |
| 41 | } |
| 42 | |
| 43 | |
| 44 | message KpiEvent { |
| 45 | |
| 46 | KpiEventType.KpiEventType type = 1; |
| 47 | |
| 48 | // Fields used when for slice: |
| 49 | |
| 50 | float ts = 2; // UTC time-stamp of data in slice mode (seconds since epoc) |
| 51 | |
| 52 | map<string, MetricValuePairs> prefixes = 3; |
| 53 | |
| 54 | } |
| 55 | |
| 56 | /* |
| 57 | * Identify to the area of the system impacted by the alarm |
| 58 | */ |
| 59 | message AlarmEventType { |
| 60 | enum AlarmEventType { |
| 61 | COMMUNICATION = 0; |
| 62 | ENVIRONMENT = 1; |
| 63 | EQUIPMENT = 2; |
| 64 | SERVICE = 3; |
| 65 | PROCESSING = 4; |
| 66 | SECURITY = 5; |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | /* |
| 71 | * Identify to the functional category originating the alarm |
| 72 | */ |
| 73 | message AlarmEventCategory { |
| 74 | enum AlarmEventCategory { |
| 75 | PON = 0; |
| 76 | OLT = 1; |
| 77 | ONT = 2; |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | /* |
| 82 | * Active state of the alarm |
| 83 | */ |
| 84 | message AlarmEventState { |
| 85 | enum AlarmEventState { |
| 86 | RAISED = 0; |
| 87 | CLEARED = 1; |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | /* |
| 92 | * Identify the overall impact of the alarm on the system |
| 93 | */ |
| 94 | message AlarmEventSeverity { |
| 95 | enum AlarmEventSeverity { |
| 96 | INDETERMINATE = 0; |
| 97 | WARNING = 1; |
| 98 | MINOR = 2; |
| 99 | MAJOR = 3; |
| 100 | CRITICAL = 4; |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | /* |
| 105 | * |
| 106 | */ |
| 107 | message AlarmEvent { |
| 108 | // Unique ID for this alarm. e.g. voltha.some_olt.1234 |
| 109 | string id = 1; |
| 110 | |
| 111 | // Refers to the area of the system impacted by the alarm |
| 112 | AlarmEventType.AlarmEventType type = 2; |
| 113 | |
| 114 | // Refers to functional category of the alarm |
| 115 | AlarmEventCategory.AlarmEventCategory category = 3; |
| 116 | |
| 117 | // Current active state of the alarm |
| 118 | AlarmEventState.AlarmEventState state = 4; |
| 119 | |
| 120 | // Overall impact of the alarm on the system |
| 121 | AlarmEventSeverity.AlarmEventSeverity severity = 5; |
| 122 | |
| 123 | // Timestamp at which the alarm was first raised |
| 124 | float raised_ts = 6; |
| 125 | |
| 126 | // Timestamp at which the alarm was reported |
| 127 | float reported_ts = 7; |
| 128 | |
| 129 | // Timestamp at which the alarm has changed since it was raised |
| 130 | float changed_ts = 8; |
| 131 | |
| 132 | // Identifier of the originating resource of the alarm |
| 133 | string resource_id = 9; |
| 134 | |
| 135 | // Textual explanation of the alarm |
| 136 | string description = 10; |
| 137 | |
| 138 | // Key/Value storage for extra information that may give context to the alarm |
| 139 | map<string, string> context = 11; |
| 140 | } |