TCA: Support for VES/A&AI enrichment
[dcaegen2/analytics/tca.git] / dpo / tcaSpec.json
1 {\r
2   "self": {\r
3     "name": "cdap.tca.hi.lo.app",\r
4     "version": "1.0.5",\r
5     "description": "cdap tca hi lo application",\r
6     "component_type": "cdap"\r
7   },\r
8   "streams": {\r
9     "subscribes": [\r
10       {\r
11         "config_key": "tca_handle_in",\r
12         "format": "VES_specification",\r
13         "version": "5.28.4",\r
14         "type": "message router"\r
15       }\r
16     ],\r
17     "publishes": [\r
18       {\r
19         "config_key": "tca_handle_out",\r
20         "format": "TCA Alert Definition",\r
21         "version": "1.0.0",\r
22         "type": "message router"\r
23       }\r
24     ]\r
25   },\r
26   "services": {\r
27     "calls": [],\r
28     "provides": []\r
29   },\r
30   "auxilary": {\r
31     "streamname": "TCASubscriberOutputStream",\r
32     "artifact_name": "dcae-analytics-cdap-tca",\r
33     "artifact_version": "2.0.0",\r
34     "namespace": "cdap_tca_hi_lo",\r
35     "programs": [\r
36       {\r
37         "program_type": "flows",\r
38         "program_id": "TCAVESCollectorFlow"\r
39       },\r
40       {\r
41         "program_type": "workers",\r
42         "program_id": "TCADMaaPMRSubscriberWorker"\r
43       },\r
44       {\r
45         "program_type": "workers",\r
46         "program_id": "TCADMaaPMRPublisherWorker"\r
47       }\r
48     ]\r
49   },\r
50   "artifacts": [\r
51     {\r
52       "uri": "${nexusproxy}/repository/dcae-dev-raw/jar_files/dcae-analytics-tca-2.0.0.jar",\r
53       "type": "jar"\r
54     }\r
55   ],\r
56   "parameters": {\r
57     "app_config": [\r
58       {\r
59         "name": "appName",\r
60         "description": "CDAP Application Name for TCA App",\r
61         "value": "dcae-tca"\r
62       },\r
63       {\r
64         "name": "appDescription",\r
65         "description": "CDAP Application Description for TCA App",\r
66         "value": "DCAE Analytics Threshold Crossing Alert Application"\r
67       },\r
68       {\r
69         "name": "tcaSubscriberOutputStreamName",\r
70         "description": "Name of Stream where TCA DMaaP Subscriber pushes incoming messages to TCA App for processing",\r
71         "value": "TCASubscriberOutputStream"\r
72       },\r
73       {\r
74         "name": "thresholdCalculatorFlowletInstances",\r
75         "description": "Number of instances for Threshold Calculator",\r
76         "value": 2\r
77       },\r
78       {\r
79         "name": "tcaVESMessageStatusTableName",\r
80         "description": "TCA Message Status Table Name where status of each TCA message is stored",\r
81         "value": "TCAVESMessageStatusTable"\r
82       },\r
83       {\r
84         "name": "tcaVESMessageStatusTableTTLSeconds",\r
85         "description": "Time to Live for entries in Message Status Table",\r
86         "value": 86400\r
87       },\r
88       {\r
89         "name": "tcaVESAlertsTableName",\r
90         "description": "Table where TCA generated alerts are temporarily stored before published to DMaaP MR topic",\r
91         "value": "TCAVESAlertsTable"\r
92       },\r
93       {\r
94         "name": "tcaVESAlertsTableTTLSeconds",\r
95         "description": "Time to Live for entries in Alerts Table",\r
96         "value": 1728000\r
97       },\r
98       {\r
99         "name" : "tcaAlertsAbatementTableName",\r
100         "description" : "Table where information to determine sending of Abatement Alerts is stored",\r
101         "value" : "TCAAlertsAbatementTable"\r
102       },\r
103       {\r
104         "name" : "tcaAlertsAbatementTableTTLSeconds",\r
105         "description": "Time to Live for entries in  Alerts Abatement Table",\r
106         "value" : 1728000\r
107       }\r
108     ],\r
109     "app_preferences": [\r
110       {\r
111         "name": "subscriberContentType",\r
112         "description": "Subscriber Content Type",\r
113         "value": "application/json"\r
114       },\r
115       {\r
116         "name": "subscriberConsumerId",\r
117         "description": "Subscriber Consumer Id",\r
118         "value": "c12"\r
119       },\r
120       {\r
121         "name": "subscriberConsumerGroup",\r
122         "description": "Subscriber Group Id",\r
123         "value": "OpenDCAE-c12"\r
124       },\r
125       {\r
126         "name": "subscriberTimeoutMS",\r
127         "description": "Subscriber timeout in milliseconds",\r
128         "value": -1\r
129       },\r
130       {\r
131         "name": "subscriberMessageLimit",\r
132         "description": "Subscriber max message fetch limit",\r
133         "value": -1\r
134       },\r
135       {\r
136         "name": "subscriberPollingInterval",\r
137         "description": "Subscriber Polling Interval in milliseconds",\r
138         "value": 30000\r
139       },\r
140       {\r
141         "name": "publisherContentType",\r
142         "description": "Publisher Content Type",\r
143         "value": "application/json"\r
144       },\r
145       {\r
146         "name": "publisherMaxBatchSize",\r
147         "description": "Publisher max batch size",\r
148         "value": 1\r
149       },\r
150       {\r
151         "name": "publisherMaxRecoveryQueueSize",\r
152         "description": "Publisher Max Recovery Queue Size",\r
153         "value": 100000\r
154       },\r
155       {\r
156         "name": "publisherPollingInterval",\r
157         "description": "Publisher Polling Interval in milliseconds",\r
158         "value": 20000\r
159       },\r
160       {\r
161         "name": "enableAlertCEFFormat",\r
162         "description": "Enable output alert to be in CEF Format",\r
163         "value": "false"\r
164       },
165       {
166         "name": "enableAAIEnrichment",
167         "description": "Enable A&AI Enrichment of generated TCA Alerts",
168         "value": "true"
169       },
170       {
171         "name": "aaiEnrichmentHost",
172         "description": "A&AI Enrichment API Host name",
173         "value": "123.123.123.123"
174       },
175       {
176         "name": "aaiEnrichmentPortNumber",
177         "description": "A&AI Enrichment API Host port number",
178         "value": 8443
179       },
180       {
181         "name": "aaiEnrichmentProtocol",
182         "description": "A&AI Enrichment API protocol",
183         "value": "https"
184       },
185       {
186         "name": "aaiEnrichmentUserName",
187         "description": "A&AI Enrichment API username",
188         "value": "DCAE"
189       },
190       {
191         "name": "aaiEnrichmentUserPassword",
192         "description": "A&AI Enrichment API password",
193         "value": "DCAE"
194       },
195       {
196         "name": "aaiEnrichmentIgnoreSSLCertificateErrors",
197         "description": "A&AI Ignore SSL Certification Errors",
198         "value": "true"
199       },
200       {
201         "name": "aaiVNFEnrichmentAPIPath",
202         "description": "A&AI VNF Enrichment API Path",
203         "value": "/aai/v11/network/generic-vnfs/generic-vnf"
204       },
205       {
206         "name": "aaiVMEnrichmentAPIPath",
207         "description": "A&AI VM Enrichment API Path",
208         "value": "/aai/v11/search/nodes-query"
209       },
210       {
211         "name": "aaiEnrichmentProxyURL",
212         "description": "A&AI Enrichment API Proxy URL",
213         "value": "http://username:password@proxyhost.com:8080"
214       },      \r
215       {\r
216         "name": "tca_policy",\r
217         "description": "TCA Policy JSON",\r
218         "value": "{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"Mfvs_eNodeB_RANKPI\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"resource=vFirewall;type=configuration\",\"policyName\":\"configuration.dcae.microservice.tca.xml\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8\",\"closedLoopEventStatus\":\"ONSET\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":4000,\"direction\":\"LESS_OR_EQUAL\",\"severity\":\"MAJOR\"},{\"closedLoopControlName\":\"CL-FRWL-HIGH-TRAFFIC-SIG-EA36FE84-9342-5E13-A656-EC5F21309A09\",\"closedLoopEventStatus\":\"ONSET\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":20000,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\"},{\"closedLoopControlName\":\"CL-FRWL-HIGH-TRAFFIC-SIG-EA36FE84-9342-5E13-A656-EC5F21309A09\",\"closedLoopEventStatus\":\"ABATED\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":0,\"direction\":\"EQUAL\",\"severity\":\"CRITICAL\"}]},{\"eventName\":\"vLoadBalancer\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"resource=vLoadBalancer;type=configuration\",\"policyName\":\"configuration.dcae.microservice.tca.xml\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"CL-LBAL-LOW-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241AB1A\",\"closedLoopEventStatus\":\"ONSET\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":500,\"direction\":\"LESS_OR_EQUAL\",\"severity\":\"MAJOR\"},{\"closedLoopControlName\":\"CL-LBAL-LOW-TRAFFIC-SIG-0C5920A6-B564-8035-C878-0E814352BC2B\",\"closedLoopEventStatus\":\"ONSET\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated\",\"thresholdValue\":5000,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\"}]}]}",\r
219         "policy_editable": true,
220         "policy_schema": [{
221           "name": "domain",
222           "description": "Domain name to which TCA needs to be applied",
223           "type": "string",
224           "value": "measurementsForVfScaling",
225           "constraints": [{
226             "equal": "measurementsForVfScaling"
227           }]
228         }, {
229           "name": "metricsPerEventName",
230           "description": "Contains eventName and threshold details that need to be applied to given eventName",
231           "type": "list",
232           "entry_schema": [{
233             "name": "eventName",
234             "description": "Event name to which thresholds need to be applied",
235             "type": "string",
236             "value": ""
237           }, {
238             "name": "controlLoopSchemaType",
239             "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM",
240             "type": "string",
241             "value": "",
242             "constraints": [{
243               "valid_values": ["VM", "VNF"]
244             }]
245           }, {
246             "name": "policyScope",
247             "description": "TCA Policy Scope",
248             "type": "string",
249             "value": ""
250           }, {
251             "name": "policyName",
252             "description": "TCA Policy Scope Name",
253             "type": "string",
254             "value": ""
255           }, {
256             "name": "policyVersion",
257             "description": "TCA Policy Scope Version",
258             "type": "string",
259             "value": ""
260           }, {
261             "name": "thresholds",
262             "description": "Thresholds associated with eventName",
263             "type": "list",
264             "entry_schema": [{
265               "name": "closedLoopControlName",
266               "description": "Closed Loop Control Name associated with the threshold",
267               "type": "string",
268               "value": ""
269             }, {
270               "name": "version",
271               "description": "Version number associated with the threshold",
272               "type": "string",
273               "value": ""
274             }, {
275               "name": "fieldPath",
276               "description": "Json field Path as per CEF message which needs to be analyzed for TCA",
277               "type": "string",
278               "value": ""
279             }, {
280               "name": "thresholdValue",
281               "description": "Threshold value for the field Path inside CEF message",
282               "type": "number",
283               "value": ""
284             }, {
285               "name": "direction",
286               "description": "Direction of the threshold",
287               "type": "string",
288               "value": "",
289               "constraints": [{
290                 "valid_values": [
291                       "LESS",
292                       "LESS_OR_EQUAL",
293                       "GREATER",
294                       "GREATER_OR_EQUAL"
295                 ]
296               }]
297             }, {
298               "name": "closedLoopEventStatus",
299               "description": "Closed Loop Event Status of the threshold",
300               "type": "string",
301               "value": "",
302               "constraints": [{
303                 "valid_values": ["ONSET", "ABATED"]
304               }]
305             }, {
306               "name": "severity",
307               "description": "Threshold Event Severity",
308               "value": "",
309               "type": "string",
310               "constraints": [{
311                 "valid_values": [
312                   "CRITICAL",
313                   "MAJOR",
314                   "MINOR",
315                   "WARNING",
316                   "NORMAL"
317                 ]
318               }]
319             }]
320           }]
321         }]
322       }
323     ],
324     "program_preferences": []
325   }
326 }