Initial TCA commit into DCAEGEN2
[dcaegen2/analytics/tca.git] / dpo / tcaSpec.json
1 {
2         "self": {
3                 "name": "cdap.tca.hi.lo.app",
4                 "version": "1.0.2",
5                 "description": "cdap tca hi lo application",
6                 "component_type": "cdap"
7         },
8         "streams": {
9                 "subscribes": [{
10                                 "config_key": "tca_handle_in",
11                                 "format": "Common Event Format Definition",
12                                 "version": "25.0.0",
13                                 "type": "message router"
14                         }
15                 ],
16                 "publishes": [{
17                                 "config_key": "tca_handle_out",
18                                 "format": "TCA Alert Definition",
19                                 "version": "1.0.0",
20                                 "type": "message router"
21                         }
22                 ]
23         },
24         "services": {
25                 "calls": [],
26                 "provides": []
27         },
28         "auxilary": {
29                 "streamname": "TCASubscriberOutputStream",
30                 "artifact_name": "dcae-analytics-tca",
31                 "artifact_version": "1.1.0",
32                 "programs": [{
33                                 "program_type": "flows",
34                                 "program_id": "TCAVESCollectorFlow"
35                         }, {
36                                 "program_type": "workers",
37                                 "program_id": "TCADMaaPMRSubscriberWorker"
38                         }, {
39                                 "program_type": "workers",
40                                 "program_id": "TCADMaaPMRPublisherWorker"
41                         }
42                 ],
43                 "namespace": "cdap_tca_hi_lo"
44         },
45         "artifacts": [{
46                         "uri": "${nexusproxy}/repository/dcae-dev-raw/jar_files/dcae-analytics-tca-1.1.0.jar",
47                         "type": "jar"
48                 }
49         ],
50         "parameters": {
51                 "app_config": [{
52                                 "name": "appName",
53                                 "description": "",
54                                 "value": "dcae-tca"
55                         }, {
56                                 "name": "appDescription",
57                                 "description": "",
58                                 "value": "DCAE Analytics Threshold Crossing Alert Application"
59                         }, {
60                                 "name": "tcaSubscriberOutputStreamName",
61                                 "description": "",
62                                 "value": "TCASubscriberOutputStream"
63                         }, {
64                                 "name": "thresholdCalculatorFlowletInstances",
65                                 "description": "",
66                                 "value": 2
67                         }, {
68                                 "name": "tcaVESMessageStatusTableName",
69                                 "description": "",
70                                 "value": "TCAVESMessageStatusTable"
71                         }, {
72                                 "name": "tcaVESMessageStatusTableTTLSeconds",
73                                 "description": "",
74                                 "value": 86400
75                         }, {
76                                 "name": "tcaVESAlertsTableName",
77                                 "description": "",
78                                 "value": "TCAVESAlertsTable"
79                         }, {
80                                 "name": "tcaVESAlertsTableTTLSeconds",
81                                 "description": "",
82                                 "value": 1728000
83                         }
84                 ],
85                 "app_preferences": [{
86                                 "name": "subscriberContentType",
87                                 "description": "",
88                                 "value": "application/json"
89                         }, {
90                                 "name": "subscriberConsumerId",
91                                 "description": "",
92                                 "value": "c12"
93                         }, {
94                                 "name": "subscriberConsumerGroup",
95                                 "description": "",
96                                 "value": "OpenDCAE-c12"
97                         }, {
98                                 "name": "subscriberTimeoutMS",
99                                 "description": "",
100                                 "value": -1
101                         }, {
102                                 "name": "subscriberMessageLimit",
103                                 "description": "",
104                                 "value": -1
105                         }, {
106                                 "name": "subscriberPollingInterval",
107                                 "description": "",
108                                 "value": 20000
109                         }, {
110                                 "name": "publisherContentType",
111                                 "description": "",
112                                 "value": "application/json"
113                         }, {
114                                 "name": "publisherMaxBatchSize",
115                                 "description": "",
116                                 "value": 10
117                         }, {
118                                 "name": "publisherMaxRecoveryQueueSize",
119                                 "description": "",
120                                 "value": 100000
121                         }, {
122                                 "name": "publisherPollingInterval",
123                                 "description": "",
124                                 "value": 20000
125                         }, {
126                                 "name": "tca_policy",
127                                 "description": "",
128                                 "value":
129                                 "'{\"domain\":\"measurementsForVfScaling\",\"metricsPerFunctionalRole\":[{\"functionalRole\":\"vFirewall\",\"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\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicUsageArray[*].bytesIn\",\"thresholdValue\":4000,\"direction\":\"LESS_OR_EQUAL\",\"severity\":\"MAJOR\"},{\"closedLoopControlName\":\"CL-FRWL-HIGH-TRAFFIC-SIG-EA36FE84-9342-5E13-A656-EC5F21309A09\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicUsageArray[*].bytesIn\",\"thresholdValue\":20000,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\"}]},{\"functionalRole\":\"vLoadBalancer\",\"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\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicUsageArray[*].packetsIn\",\"thresholdValue\":500,\"direction\":\"LESS_OR_EQUAL\",\"severity\":\"MAJOR\"},{\"closedLoopControlName\":\"CL-LBAL-LOW-TRAFFIC-SIG-0C5920A6-B564-8035-C878-0E814352BC2B\",\"version\":\"1.0.2\",\"fieldPath\":\"$.event.measurementsForVfScalingFields.vNicUsageArray[*].packetsIn\",\"thresholdValue\":5000,\"direction\":\"GREATER_OR_EQUAL\",\"severity\":\"CRITICAL\"}]}]}'"
130                         }
131                 ],
132                 "program_preferences": [],
133
134                 "policy_parameters": [{
135                                 "name": "domain",
136                                 "description": "",
137                                 "type": "string",
138                                 "value": "measurementsForVfScaling",
139                                 "constraints":
140                                 [{
141                                                 "equal": "measurementsForVfScaling"
142                                         }
143                                 ]
144                         }, {
145                                 "name": "metricsPerFunctionalRole",
146                                 "description": "",
147                                 "type": "list",
148                                 "entry_schema":
149                                 [{
150                                                 "name": "functionalRole",
151                                                 "description": "Function of the event source e.g., eNodeB, MME, PCRF",
152                                                 "type": "string",
153                                                 "value": ""
154                                         }, {
155                                                 "name": "policyScope",
156                                                 "description": "Policy Scope associated with this event.For example-resource=vFirewall;type=configuration",
157                                                 "type": "string",
158                                                 "value": ""
159                                         }, {
160                                                 "name": "policyName",
161                                                 "description": "Policy name/ID for this event",
162                                                 "type": "string",
163                                                 "value": "configuration.dcae.microservice.tca.xml"
164                                         }, {
165                                                 "name": "policyVersion",
166                                                 "description": "Policy Version",
167                                                 "type": "string",
168                                                 "value": "v0.0.1"
169                                         }, {
170                                                 "name": "thresholds",
171                                                 "description": "",
172                                                 "type": "list",
173                                                 "entry_schema":
174                                                 [{
175                                                                 "name": "closedLoopControlName",
176                                                                 "description": "A UNIQUE string identifying the Closed Loop ID this event is for.",
177                                                                 "type": "string",
178                                                                 "value": ""
179                                                         }, {
180                                                                 "name": "version",
181                                                                 "description": "Version for the closed loop message",
182                                                                 "type": "string",
183                                                                 "value": ""
184                                                         }, {
185                                                                 "name": "fieldPath",
186                                                                 "description": "",
187                                                                 "type": "string",
188                                                                 "value": ""
189                                                         }, {
190                                                                 "name": "thresholdValue",
191                                                                 "description": "",
192                                                                 "type": "number",
193                                                                 "value": ""
194                                                         }, {
195                                                                 "name": "direction",
196                                                                 "description": "",
197                                                                 "type": "string",
198                                                                 "value": "",
199                                                                 "constraints":
200                                                                 [{
201                                                                                 "valid_value":
202                                                                                 ["LESS", "LESS_OR_EQUAL", "GREATER", "GREATER_OR_EQUAL"]
203                                                                         }
204                                                                 ]
205                                                         }, {
206                                                                 "name": "severity",
207                                                                 "description": "event severity or priority",
208                                                                 "value": "",
209                                                                 "type": "string",
210                                                                 "constraints":
211                                                                 [{
212                                                                                 "valid_value":
213                                                                                 ["CRITICAL", "MAJOR", "MINOR", "WARNING", "NORMAL"]
214                                                                         }
215                                                                 ]
216                                                         }
217                                                 ]
218                                         }
219                                 ]
220                         }
221                 ]
222         }
223 }