tca spec policy syncup
[dcaegen2/analytics/tca.git] / dpo / tcaSpec.json
1 {
2   "self": {
3     "name": "cdap.tca.hi.lo.app",
4     "version": "1.0.5",
5     "description": "cdap tca hi lo application",
6     "component_type": "cdap"
7   },
8   "streams": {
9     "subscribes": [
10       {
11         "config_key": "tca_handle_in",
12         "format": "VES_specification",
13         "version": "5.28.4",
14         "type": "message router"
15       }
16     ],
17     "publishes": [
18       {
19         "config_key": "tca_handle_out",
20         "format": "TCA Alert Definition",
21         "version": "1.0.0",
22         "type": "message router"
23       }
24     ]
25   },
26   "services": {
27     "calls": [],
28     "provides": []
29   },
30   "auxilary": {
31     "streamname": "TCASubscriberOutputStream",
32     "artifact_name": "dcae-analytics-cdap-tca",
33     "artifact_version": "2.0.0",
34     "namespace": "cdap_tca_hi_lo",
35     "programs": [
36       {
37         "program_type": "flows",
38         "program_id": "TCAVESCollectorFlow"
39       },
40       {
41         "program_type": "workers",
42         "program_id": "TCADMaaPMRSubscriberWorker"
43       },
44       {
45         "program_type": "workers",
46         "program_id": "TCADMaaPMRPublisherWorker"
47       }
48     ]
49   },
50   "artifacts": [
51     {
52       "uri": "https://nexus.onap.org/service/local/repositories/staging/content/org/onap/dcaegen2/analytics/tca/dcae-analytics-cdap-tca/2.0.0/dcae-analytics-cdap-tca-2.0.0.jar",
53       "type": "jar"
54     }
55   ],
56   "parameters": {
57     "app_config": [
58       {
59         "name": "appName",
60         "description": "CDAP Application Name for TCA App",
61         "value": "dcae-tca"
62       },
63       {
64         "name": "appDescription",
65         "description": "CDAP Application Description for TCA App",
66         "value": "DCAE Analytics Threshold Crossing Alert Application"
67       },
68       {
69         "name": "tcaSubscriberOutputStreamName",
70         "description": "Name of Stream where TCA DMaaP Subscriber pushes incoming messages to TCA App for processing",
71         "value": "TCASubscriberOutputStream"
72       },
73       {
74         "name": "thresholdCalculatorFlowletInstances",
75         "description": "Number of instances for Threshold Calculator",
76         "value": 2
77       },
78       {
79         "name": "tcaVESMessageStatusTableName",
80         "description": "TCA Message Status Table Name where status of each TCA message is stored",
81         "value": "TCAVESMessageStatusTable"
82       },
83       {
84         "name": "tcaVESMessageStatusTableTTLSeconds",
85         "description": "Time to Live for entries in Message Status Table",
86         "value": 86400
87       },
88       {
89         "name": "tcaVESAlertsTableName",
90         "description": "Table where TCA generated alerts are temporarily stored before published to DMaaP MR topic",
91         "value": "TCAVESAlertsTable"
92       },
93       {
94         "name": "tcaVESAlertsTableTTLSeconds",
95         "description": "Time to Live for entries in Alerts Table",
96         "value": 1728000
97       },
98       {
99         "name" : "tcaAlertsAbatementTableName",
100         "description" : "Table where information to determine sending of Abatement Alerts is stored",
101         "value" : "TCAAlertsAbatementTable"
102       },
103       {
104         "name" : "tcaAlertsAbatementTableTTLSeconds",
105         "description": "Time to Live for entries in  Alerts Abatement Table",
106         "value" : 1728000
107       }
108     ],
109     "app_preferences": [
110       {
111         "name" :  "subscriberHostName",
112         "description" :  "",
113         "value" : "HOSTNAME"
114       },
115       {
116         "name" :  "subscriberHostPort",
117         "description" :  "",
118         "value" : 1234
119       },
120       {
121         "name" :  "subscriberTopicName",
122         "description" :  "",
123         "value" : "com.att.dcae.dmaap.mtnje2.DcaeTestVESSub"
124       },
125       {
126         "name" :  "subscriberProtocol",
127         "description" :  "",
128         "value" : "https"
129       },
130       {
131         "name" :  "subscriberUserName",
132         "description" :  "",
133         "value" : "USERNAME"
134       },
135       {
136         "name" :  "subscriberUserPassword",
137         "description" :  "",
138         "value" : "PASSWORD"
139       },
140       {
141         "name": "subscriberContentType",
142         "description": "Subscriber Content Type",
143         "value": "application/json"
144       },
145       {
146         "name": "subscriberConsumerId",
147         "description": "Subscriber Consumer Id",
148         "value": "c12"
149       },
150       {
151         "name": "subscriberConsumerGroup",
152         "description": "Subscriber Group Id",
153         "value": "OpenDCAE-c12"
154       },
155       {
156         "name": "subscriberTimeoutMS",
157         "description": "Subscriber timeout in milliseconds",
158         "value": -1
159       },
160       {
161         "name": "subscriberMessageLimit",
162         "description": "Subscriber max message fetch limit",
163         "value": -1
164       },
165       {
166         "name": "subscriberPollingInterval",
167         "description": "Subscriber Polling Interval in milliseconds",
168         "value": 30000
169       },
170       {
171         "name" :  "publisherHostName",
172         "description" :  "",
173         "value" : "HOSTNAME"
174       },
175       {
176         "name" :  "publisherHostPort",
177         "description" :  "",
178         "value" : 1234
179       },
180       {
181         "name" :  "publisherTopicName",
182         "description" :  "",
183         "value" : "com.att.dcae.dmaap.mtnje2.DcaeTestVESPub"
184       },
185       {
186         "name" :  "publisherProtocol",
187         "description" :  "",
188         "value" : "https"
189       },
190       {
191         "name" :  "publisherUserName",
192         "description" :  "",
193         "value" : "USERNAME"
194       },
195       {
196         "name" :  "publisherUserPassword",
197         "description" :  "",
198         "value" : "PASSWORD"
199       },
200       {
201         "name": "publisherContentType",
202         "description": "Publisher Content Type",
203         "value": "application/json"
204       },
205       {
206         "name": "publisherMaxBatchSize",
207         "description": "Publisher max batch size",
208         "value": 1
209       },
210       {
211         "name": "publisherMaxRecoveryQueueSize",
212         "description": "Publisher Max Recovery Queue Size",
213         "value": 100000
214       },
215       {
216         "name": "publisherPollingInterval",
217         "description": "Publisher Polling Interval in milliseconds",
218         "value": 20000
219       },
220       {
221         "name": "enableAlertCEFFormat",
222         "description": "Enable output alert to be in CEF Format",
223         "value": "false"
224       },
225       {
226         "name": "enableAAIEnrichment",
227         "description": "Enable A&AI Enrichment of generated TCA Alerts",
228         "value": "true"
229       },
230       {
231         "name": "aaiEnrichmentHost",
232         "description": "A&AI Enrichment API Host name",
233         "value": "123.123.123.123"
234       },
235       {
236         "name": "aaiEnrichmentPortNumber",
237         "description": "A&AI Enrichment API Host port number",
238         "value": 8443
239       },
240       {
241         "name": "aaiEnrichmentProtocol",
242         "description": "A&AI Enrichment API protocol",
243         "value": "https"
244       },
245       {
246         "name": "aaiEnrichmentUserName",
247         "description": "A&AI Enrichment API username",
248         "value": "USERNAME"
249       },
250       {
251         "name": "aaiEnrichmentUserPassword",
252         "description": "A&AI Enrichment API password",
253         "value": "PASSWORD"
254       },
255       {
256         "name": "aaiEnrichmentIgnoreSSLCertificateErrors",
257         "description": "A&AI Ignore SSL Certification Errors",
258         "value": "true"
259       },
260       {
261         "name": "aaiVNFEnrichmentAPIPath",
262         "description": "A&AI VNF Enrichment API Path",
263         "value": "/aai/v11/network/generic-vnfs/generic-vnf"
264       },
265       {
266         "name": "aaiVMEnrichmentAPIPath",
267         "description": "A&AI VM Enrichment API Path",
268         "value": "/aai/v11/search/nodes-query"
269       },
270       {
271         "name": "aaiEnrichmentProxyURL",
272         "description": "A&AI Enrichment API Proxy URL",
273         "value": "URL"
274       },      
275       {
276         "name": "tca_policy",
277         "description": "TCA Policy JSON",
278         "value":"{\"domain\":\"measurementsForVfScaling\",\"metricsPerEventName\":[{\"eventName\":\"vFirewallBroadcastPackets\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":300,\"direction\":\"LESS_OR_EQUAL\",\"severity\":\"MAJOR\",\"closedLoopEventStatus\":\"ONSET\"},{\"closedLoopControlName\":\"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":700,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]},{\"eventName\":\"vLoadBalancer\",\"controlLoopSchemaType\":\"VM\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\",\"thresholdValue\":300,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]},{\"eventName\":\"Measurement_vGMUX\",\"controlLoopSchemaType\":\"VNF\",\"policyScope\":\"DCAE\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyVersion\":\"v0.0.1\",\"thresholds\":[{\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":0,\"direction\":\"EQUAL\",\"severity\":\"MAJOR\",\"closedLoopEventStatus\":\"ABATED\"},{\"closedLoopControlName\":\"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\",\"thresholdValue\":0,\"direction\":\"GREATER\",\"severity\":\"CRITICAL\",\"closedLoopEventStatus\":\"ONSET\"}]}]}" 
279         "policy_editable": true,
280         "policy_schema": [{
281           "name": "domain",
282           "description": "Domain name to which TCA needs to be applied",
283           "type": "string",
284           "value": "measurementsForVfScaling",
285           "constraints": [{
286             "equal": "measurementsForVfScaling"
287           }]
288         }, {
289           "name": "metricsPerEventName",
290           "description": "Contains eventName and threshold details that need to be applied to given eventName",
291           "type": "list",
292           "entry_schema": [{
293             "name": "eventName",
294             "description": "Event name to which thresholds need to be applied",
295             "type": "string",
296             "value": ""
297           }, {
298             "name": "controlLoopSchemaType",
299             "description": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM",
300             "type": "string",
301             "value": "",
302             "constraints": [{
303               "valid_values": ["VM", "VNF"]
304             }]
305           }, {
306             "name": "policyScope",
307             "description": "TCA Policy Scope",
308             "type": "string",
309             "value": ""
310           }, {
311             "name": "policyName",
312             "description": "TCA Policy Scope Name",
313             "type": "string",
314             "value": ""
315           }, {
316             "name": "policyVersion",
317             "description": "TCA Policy Scope Version",
318             "type": "string",
319             "value": ""
320           }, {
321             "name": "thresholds",
322             "description": "Thresholds associated with eventName",
323             "type": "list",
324             "entry_schema": [{
325               "name": "closedLoopControlName",
326               "description": "Closed Loop Control Name associated with the threshold",
327               "type": "string",
328               "value": ""
329             }, {
330               "name": "version",
331               "description": "Version number associated with the threshold",
332               "type": "string",
333               "value": ""
334             }, {
335               "name": "fieldPath",
336               "description": "Json field Path as per CEF message which needs to be analyzed for TCA",
337               "type": "string",
338               "value": ""
339             }, {
340               "name": "thresholdValue",
341               "description": "Threshold value for the field Path inside CEF message",
342               "type": "number",
343               "value": ""
344             }, {
345               "name": "direction",
346               "description": "Direction of the threshold",
347               "type": "string",
348               "value": "",
349               "constraints": [{
350                 "valid_values": [
351                       "LESS",
352                       "LESS_OR_EQUAL",
353                       "GREATER",
354                       "GREATER_OR_EQUAL",
355                       "EQUAL"
356                 ]
357               }]
358             }, {
359               "name": "closedLoopEventStatus",
360               "description": "Closed Loop Event Status of the threshold",
361               "type": "string",
362               "value": "",
363               "constraints": [{
364                 "valid_values": ["ONSET", "ABATED"]
365               }]
366             }, {
367               "name": "severity",
368               "description": "Threshold Event Severity",
369               "value": "",
370               "type": "string",
371               "constraints": [{
372                 "valid_values": [
373                   "CRITICAL",
374                   "MAJOR",
375                   "MINOR",
376                   "WARNING",
377                   "NORMAL"
378                 ]
379               }]
380             }]
381           }]
382         }]
383       }
384     ],
385     "program_preferences": []
386   }
387 }