@itentialopensource/adapter-kentik_v5 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/TAB2.md ADDED
@@ -0,0 +1,336 @@
1
+ # Kentik v5
2
+
3
+ ## Table of Contents
4
+
5
+ - [Specific Adapter Information](#specific-adapter-information)
6
+ - [Authentication](#authentication)
7
+ - [Sample Properties](#sample-properties)
8
+ - [Swagger](#swagger)
9
+ - [Generic Adapter Information](#generic-adapter-information)
10
+
11
+ ## Specific Adapter Information
12
+ ### Authentication
13
+
14
+ This document will go through the steps for authenticating the Kentik adapter with Static Token Authentication. Properly configuring the properties for an adapter in IAP is critical for getting the adapter online. You can read more about adapter authentication <a href="https://docs.itential.com/opensource/docs/authentication" target="_blank">HERE</a>.
15
+
16
+ Companies periodically change authentication methods to provide better security. As this happens this section should be updated and contributed/merge back into the adapter repository.
17
+
18
+ #### Static Token Authentication
19
+ The Kentik adapter requires Static Token Authentication. If you change authentication methods, you should change this section accordingly and merge it back into the adapter repository.
20
+
21
+ STEPS
22
+ 1. Ensure you have access to a Kentik server and that it is running
23
+ 2. Follow the steps in the README.md to import the adapter into IAP if you have not already done so
24
+ 3. Use the properties below for the ```properties.authentication``` field
25
+ ```json
26
+ "authentication": {
27
+ "auth_method": "static_token",
28
+ "token": "<user_api_token>",
29
+ "auth_field": "header.headers.X-CH-Auth-API-Token",
30
+ "auth_field_format": "{token}",
31
+ "auth_logging": false
32
+ }
33
+ ```
34
+ you can leave all of the other properties in the authentication section, they will not be used for static token authentication.
35
+
36
+ 4. Use the properties below for the ```request.global_request.addlHeaders``` field to add X-CH-Auth-Email header to the requests
37
+ ```json
38
+ "request": {
39
+ "global_request": {
40
+ "addlHeaders": {
41
+ "X-CH-Auth-Email": "user@domain.suffix"
42
+ }
43
+ }
44
+ }
45
+ ```
46
+ 5. Restart the adapter. If your properties were set correctly, the adapter should go online.
47
+
48
+ #### Troubleshooting
49
+ - Make sure you copied over the correct token.
50
+ - Turn on debug level logs for the adapter in IAP Admin Essentials.
51
+ - Turn on auth_logging for the adapter in IAP Admin Essentials (adapter properties).
52
+ - Investigate the logs - in particular:
53
+ - The FULL REQUEST log to make sure the proper headers are being sent with the request.
54
+ - The FULL BODY log to make sure the payload is accurate.
55
+ - The CALL RETURN log to see what the other system is telling us.
56
+ - Credentials should be ** masked ** by the adapter so make sure you verify the username and password - including that there are erroneous spaces at the front or end.
57
+ - Remember when you are done to turn auth_logging off as you do not want to log credentials.
58
+
59
+ ### Sample Properties
60
+
61
+ Sample Properties can be used to help you configure the adapter in the Itential Automation Platform. You will need to update connectivity information such as the host, port, protocol and credentials.
62
+
63
+ ```json
64
+ "properties": {
65
+ "host": "api.kentik.com",
66
+ "port": 443,
67
+ "choosepath": "",
68
+ "base_path": "/api",
69
+ "version": "v5",
70
+ "cache_location": "none",
71
+ "encode_pathvars": true,
72
+ "encode_queryvars": true,
73
+ "save_metric": false,
74
+ "stub": true,
75
+ "protocol": "https",
76
+ "authentication": {
77
+ "auth_method": "static_token",
78
+ "username": "username",
79
+ "password": "password",
80
+ "token": "tokenGoesHere",
81
+ "token_timeout": 600000,
82
+ "token_cache": "local",
83
+ "invalid_token_error": 401,
84
+ "auth_field": "header.headers.X-CH-Auth-API-Token",
85
+ "auth_field_format": "{token}",
86
+ "auth_logging": false,
87
+ "client_id": "",
88
+ "client_secret": "",
89
+ "grant_type": "",
90
+ "sensitive": [],
91
+ "sso": {
92
+ "protocol": "",
93
+ "host": "",
94
+ "port": 0
95
+ },
96
+ "multiStepAuthCalls": [
97
+ {
98
+ "name": "",
99
+ "requestFields": {},
100
+ "responseFields": {},
101
+ "successfullResponseCode": 200
102
+ }
103
+ ],
104
+ "token_user_field": "username",
105
+ "token_password_field": "password",
106
+ "token_result_field": "token",
107
+ "token_URI_path": ""
108
+ },
109
+ "healthcheck": {
110
+ "type": "none",
111
+ "frequency": 60000,
112
+ "query_object": {},
113
+ "addlHeaders": {},
114
+ "protocol": "REST",
115
+ "URI_Path": ""
116
+ },
117
+ "throttle": {
118
+ "throttle_enabled": false,
119
+ "number_pronghorns": 1,
120
+ "sync_async": "sync",
121
+ "max_in_queue": 1000,
122
+ "concurrent_max": 1,
123
+ "expire_timeout": 0,
124
+ "avg_runtime": 200,
125
+ "priorities": [
126
+ {
127
+ "value": 0,
128
+ "percent": 100
129
+ }
130
+ ]
131
+ },
132
+ "request": {
133
+ "number_redirects": 0,
134
+ "number_retries": 3,
135
+ "limit_retry_error": [
136
+ 0
137
+ ],
138
+ "failover_codes": [],
139
+ "attempt_timeout": 5000,
140
+ "global_request": {
141
+ "payload": {},
142
+ "uriOptions": {},
143
+ "addlHeaders": {
144
+ "X-CH-Auth-Email": "first.last@itential.com"
145
+ },
146
+ "authData": {}
147
+ },
148
+ "healthcheck_on_timeout": true,
149
+ "return_raw": false,
150
+ "archiving": false,
151
+ "return_request": false
152
+ },
153
+ "proxy": {
154
+ "enabled": false,
155
+ "host": "",
156
+ "port": 1,
157
+ "protocol": "http",
158
+ "username": "",
159
+ "password": ""
160
+ },
161
+ "ssl": {
162
+ "ecdhCurve": "",
163
+ "enabled": false,
164
+ "accept_invalid_cert": false,
165
+ "ca_file": "",
166
+ "key_file": "",
167
+ "cert_file": "",
168
+ "secure_protocol": "",
169
+ "ciphers": ""
170
+ },
171
+ "mongo": {
172
+ "host": "",
173
+ "port": 0,
174
+ "database": "",
175
+ "username": "",
176
+ "password": "",
177
+ "replSet": "",
178
+ "db_ssl": {
179
+ "enabled": false,
180
+ "accept_invalid_cert": false,
181
+ "ca_file": "",
182
+ "key_file": "",
183
+ "cert_file": ""
184
+ }
185
+ },
186
+ "devicebroker": {
187
+ "enabled": false,
188
+ "getDevice": [
189
+ {
190
+ "path": "/not/mapped",
191
+ "method": "GET",
192
+ "query": {},
193
+ "body": {},
194
+ "headers": {},
195
+ "handleFailure": "ignore",
196
+ "requestFields": {
197
+ "insample": "{port}"
198
+ },
199
+ "responseDatakey": "",
200
+ "responseFields": {
201
+ "name": "{this}{||}{that}",
202
+ "ostype": "{osfield}",
203
+ "ostypePrefix": "meraki-",
204
+ "port": "{port}",
205
+ "ipaddress": "{ip_addr}",
206
+ "serial": "{serial}"
207
+ }
208
+ }
209
+ ],
210
+ "getDevicesFiltered": [
211
+ {
212
+ "path": "/not/mapped",
213
+ "method": "GET",
214
+ "pagination": {
215
+ "offsetVar": "",
216
+ "limitVar": "",
217
+ "incrementBy": "limit",
218
+ "requestLocation": "query"
219
+ },
220
+ "query": {},
221
+ "body": {},
222
+ "headers": {},
223
+ "handleFailure": "ignore",
224
+ "requestFields": {},
225
+ "responseDatakey": "",
226
+ "responseFields": {
227
+ "name": "{this}{||}{that}",
228
+ "ostype": "{osfield}",
229
+ "ostypePrefix": "meraki-",
230
+ "port": "{port}",
231
+ "ipaddress": "{ip_addr}",
232
+ "serial": "{serial}",
233
+ "id": "{myid}"
234
+ }
235
+ }
236
+ ],
237
+ "isAlive": [
238
+ {
239
+ "path": "/not/mapped/{devID}",
240
+ "method": "GET",
241
+ "query": {},
242
+ "body": {},
243
+ "headers": {},
244
+ "handleFailure": "ignore",
245
+ "requestFields": {
246
+ "devID": "{id}"
247
+ },
248
+ "responseDatakey": "",
249
+ "responseFields": {
250
+ "status": "return2xx",
251
+ "statusValue": "AD.200"
252
+ }
253
+ }
254
+ ],
255
+ "getConfig": [
256
+ {
257
+ "path": "/not/mapped/{devID}",
258
+ "method": "GET",
259
+ "query": {},
260
+ "body": {},
261
+ "headers": {},
262
+ "handleFailure": "ignore",
263
+ "requestFields": {
264
+ "devID": "{id}"
265
+ },
266
+ "responseDatakey": "",
267
+ "responseFields": {}
268
+ }
269
+ ],
270
+ "getCount": [
271
+ {
272
+ "path": "/not/mapped",
273
+ "method": "GET",
274
+ "query": {},
275
+ "body": {},
276
+ "headers": {},
277
+ "handleFailure": "ignore",
278
+ "requestFields": {},
279
+ "responseDatakey": "",
280
+ "responseFields": {}
281
+ }
282
+ ]
283
+ },
284
+ "cache": {
285
+ "enabled": false,
286
+ "entities": [
287
+ {
288
+ "entityType": "device",
289
+ "frequency": 3600,
290
+ "flushOnFail": false,
291
+ "limit": 10000,
292
+ "retryAttempts": 5,
293
+ "sort": true,
294
+ "populate": [
295
+ {
296
+ "path": "/not/mapped",
297
+ "method": "GET",
298
+ "pagination": {
299
+ "offsetVar": "",
300
+ "limitVar": "",
301
+ "incrementBy": "limit",
302
+ "requestLocation": "query"
303
+ },
304
+ "query": {},
305
+ "body": {},
306
+ "headers": {},
307
+ "handleFailure": "ignore",
308
+ "requestFields": {},
309
+ "responseDatakey": "",
310
+ "responseFields": {
311
+ "name": "{this}{||}{that}",
312
+ "ostype": "{osfield}",
313
+ "ostypePrefix": "meraki-",
314
+ "port": "{port}",
315
+ "ipaddress": "{ip_addr}",
316
+ "serial": "{serial}",
317
+ "id": "{myid}"
318
+ }
319
+ }
320
+ ],
321
+ "cachedTasks": [
322
+ {
323
+ "name": "",
324
+ "filterField": "",
325
+ "filterLoc": ""
326
+ }
327
+ ]
328
+ }
329
+ ]
330
+ }
331
+ }
332
+ ```
333
+ ### [Swagger](https://gitlab.com/itentialopensource/adapters/observability/adapter-kentik_v5/-/blob/master/report/adapter-openapi.json)
334
+
335
+ ## [Generic Adapter Information](https://gitlab.com/itentialopensource/adapters/observability/adapter-kentik_v5/-/blob/master/README.md)
336
+
@@ -0,0 +1,9 @@
1
+ {
2
+ "ComplianceEntries": [
3
+ {
4
+ "name": "Compliance Summary",
5
+ "numInvalidProjects": 0,
6
+ "numValidProjects": 0
7
+ }
8
+ ]
9
+ }
@@ -0,0 +1,5 @@
1
+ ---------------------------------------------------------------------------------------------
2
+ **** Project Compliance Summary ****
3
+ 0 project(s) are not valid
4
+ 0 project(s) are valid
5
+ ---------------------------------------------------------------------------------------------
package/metadata.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "adapter-kentik_v5",
3
3
  "webName": "Adapter for Integration to Kentik API v5",
4
4
  "vendor": "Kentik",
5
- "product": "API v5",
5
+ "product": "Kentik",
6
6
  "osVersion": [],
7
7
  "apiVersions": [
8
8
  "v5"
@@ -29,34 +29,80 @@
29
29
  "isDeprecated": false
30
30
  },
31
31
  "brokerSince": "",
32
+ "authMethods": [
33
+ {
34
+ "type": "API Key",
35
+ "primary": true
36
+ }
37
+ ],
32
38
  "documentation": {
33
39
  "storeLink": "",
34
40
  "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-kentik_v5",
35
- "repoLink": "https://gitlab.com/itentialopensource/adapters/observability/adapter-kentik_v5",
41
+ "repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-kentik_v5",
36
42
  "docLink": "",
37
- "demoLinks": [],
38
- "trainingLinks": [],
43
+ "demoLinks": [
44
+ {
45
+ "title": "Itential + Kentik: Integrated Network Observability & Automation",
46
+ "link": "https://www.itential.com/resource/demo/itential-kentik-integrated-network-observability-automation/"
47
+ },
48
+ {
49
+ "title": "Itential + Kentik: Integrating Observability with Automation for Closed-Loop Remediation of Infrastructure Events",
50
+ "link": "https://www.itential.com/blog/company/hybrid-cloud-automation/itential-kentik-integrating-observability-with-automation-for-closed-loop-remediation-of-infrastructure-events/"
51
+ }
52
+ ],
53
+ "trainingLinks": [
54
+ {
55
+ "title": "Itential Academy",
56
+ "link": "https://www.itential.com/itential-academy/"
57
+ }
58
+ ],
39
59
  "faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
40
60
  "contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
41
61
  "issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
42
62
  "webLink": "https://www.itential.com/adapters/kentik-api-version-5/",
43
- "vendorLink": "",
44
- "productLink": "",
45
- "apiLinks": []
63
+ "vendorLink": "https://www.kentik.com/",
64
+ "productLink": "https://www.kentik.com/",
65
+ "apiLinks": [
66
+ {
67
+ "title": "Kentik APIs",
68
+ "link": "https://kb.kentik.com/v0/Ab09.htm",
69
+ "public": true
70
+ }
71
+ ]
46
72
  },
47
73
  "assets": [],
48
74
  "relatedItems": {
49
75
  "adapters": [],
50
76
  "integrations": [],
51
77
  "ecosystemApplications": [],
52
- "workflowProjects": [],
78
+ "workflowProjects": [
79
+ {
80
+ "name": "Kentik - REST",
81
+ "webName": "Kentik - Device Management",
82
+ "overview": "The integration of Itential and Kentik enables network teams to build automations that can immediately respond to events and alarms generated by the Kentik observability platform. In addition, Itential also offers a package of Pre-Built Automations to implement multiple use cases with the integration. The Kentik - REST Pre-Built provides automations that help Network Engineers automate common tasks performed in the Kentik platform. This Pre-Built contains multiple automations including:\n\n- Create a Device in Kentik - With this automation, users can create a device for a specific site and provide the device record as output.\n- Run Device Flow Test - With this automation, users can run a device flow test for a specific device, providing the results of the test as output.",
83
+ "isDependency": false,
84
+ "versions": [
85
+ "^1.0.9"
86
+ ],
87
+ "repoLink": "https://gitlab.com/itentialopensource/pre-built-automations/kentik-rest",
88
+ "docLink": "",
89
+ "webLink": "https://www.itential.com/automations/kentik-device-management/"
90
+ }
91
+ ],
53
92
  "transformationProjects": [],
54
- "exampleProjects": []
55
- },
56
- "authMethods": [
57
- {
58
- "type": "API Key",
59
- "primary": true
60
- }
61
- ]
93
+ "exampleProjects": [
94
+ {
95
+ "name": "Kentik - REST - Example",
96
+ "webName": "Kentik - Example Use Case Bundle",
97
+ "overview": "This contains several example use cases that are applicable when the Itential Automation Platform is integrated with the Kentik Platform. Because every environment is different, these use cases are fully functioning examples that can be modified to operate in your IT ecosystem. These workflows have been written with modularity in mind to make them easy to understand and simple to modify to suit your needs.",
98
+ "isDependency": false,
99
+ "versions": [
100
+ "1.1.10"
101
+ ],
102
+ "repoLink": "https://gitlab.com/itentialopensource/pre-built-automations/kentik-rest-example",
103
+ "docLink": "",
104
+ "webLink": "https://www.itential.com/automations/kentik-example-use-case-bundle/"
105
+ }
106
+ ]
107
+ }
62
108
  }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-kentik_v5",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "This adapter integrates with system described as: kentikV5Api.",
5
5
  "main": "adapter.js",
6
6
  "wizardVersion": "2.44.7",
7
- "engineVersion": "1.67.14",
7
+ "engineVersion": "1.67.20",
8
8
  "adapterType": "http",
9
9
  "scripts": {
10
10
  "artifactize": "npm i && node utils/packModificationScript.js",
@@ -15,7 +15,6 @@
15
15
  "test:baseunit": "mocha test/unit/adapterBaseTestUnit.js --LOG=error",
16
16
  "test:unit": "mocha test/unit/adapterTestUnit.js --LOG=error",
17
17
  "test:integration": "mocha test/integration/adapterTestIntegration.js --LOG=error",
18
- "test:cover": "nyc --reporter html --reporter text mocha --reporter dot test/*",
19
18
  "test": "npm run test:baseunit && npm run test:unit && npm run test:integration",
20
19
  "adapter:install": "npm i && node utils/tbScript.js install",
21
20
  "adapter:checkMigrate": "node utils/checkMigrate.js",
@@ -43,20 +42,20 @@
43
42
  ],
44
43
  "license": "Apache-2.0",
45
44
  "engines": {
46
- "node": ">= 8.0.0",
45
+ "node": ">= 14.0.0",
47
46
  "npm": ">= 6.0.0"
48
47
  },
49
48
  "repository": {
50
49
  "type": "git",
51
- "url": "git@gitlab.com:itentialopensource/adapters/observability/adapter-kentik_v5.git"
50
+ "url": "git@gitlab.com:itentialopensource/adapters/adapter-kentik_v5.git"
52
51
  },
53
52
  "author": "Itential",
54
- "homepage": "https://gitlab.com/itentialopensource/adapters/observability/adapter-kentik_v5#readme",
53
+ "homepage": "https://gitlab.com/itentialopensource/adapters/adapter-kentik_v5#readme",
55
54
  "dependencies": {
56
- "@itentialopensource/adapter-utils": "^5.3.8",
55
+ "@itentialopensource/adapter-utils": "^5.5.0",
57
56
  "acorn": "^8.10.0",
58
57
  "ajv": "^8.12.0",
59
- "axios": "^1.6.7",
58
+ "axios": "^1.6.8",
60
59
  "commander": "^11.0.0",
61
60
  "dns-lookup-promise": "^1.0.4",
62
61
  "fs-extra": "^11.1.1",
@@ -64,7 +63,6 @@
64
63
  "mocha": "^10.3.0",
65
64
  "mocha-param": "^2.0.1",
66
65
  "mongodb": "^4.16.0",
67
- "nyc": "^15.1.0",
68
66
  "ping": "^0.4.4",
69
67
  "prompts": "^2.4.2",
70
68
  "readline-sync": "^1.4.10",
@@ -945,6 +945,11 @@
945
945
  "devicebroker": {
946
946
  "type": "object",
947
947
  "properties": {
948
+ "enabled": {
949
+ "type": "boolean",
950
+ "description": "Whether or not the device broker calls have been mapped",
951
+ "default": false
952
+ },
948
953
  "getDevice": {
949
954
  "type": "array",
950
955
  "description": "Broker call(s) to getDevice",
Binary file
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "0.2.0",
3
- "configLines": 8395,
2
+ "version": "0.3.3",
3
+ "configLines": 8400,
4
4
  "scriptLines": 1783,
5
5
  "codeLines": 7198,
6
- "testLines": 7378,
6
+ "testLines": 7377,
7
7
  "testCases": 352,
8
- "totalCodeLines": 16359,
8
+ "totalCodeLines": 16358,
9
9
  "wfTasks": 85
10
10
  }
@@ -0,0 +1,120 @@
1
+ {
2
+ "errors": [],
3
+ "statistics": [
4
+ {
5
+ "owner": "errorJson",
6
+ "description": "New adapter errors available for use",
7
+ "value": 0
8
+ },
9
+ {
10
+ "owner": "errorJson",
11
+ "description": "Adapter errors no longer available for use",
12
+ "value": 0
13
+ },
14
+ {
15
+ "owner": "errorJson",
16
+ "description": "Adapter errors that have been updated (e.g. recommendation changes)",
17
+ "value": 31
18
+ },
19
+ {
20
+ "owner": "packageJson",
21
+ "description": "Number of production dependencies",
22
+ "value": 16
23
+ },
24
+ {
25
+ "owner": "packageJson",
26
+ "description": "Number of development dependencies",
27
+ "value": 6
28
+ },
29
+ {
30
+ "owner": "packageJson",
31
+ "description": "Number of npm scripts",
32
+ "value": 21
33
+ },
34
+ {
35
+ "owner": "packageJson",
36
+ "description": "Runtime Library dependency",
37
+ "value": "^5.5.0"
38
+ },
39
+ {
40
+ "owner": "propertiesSchemaJson",
41
+ "description": "Adapter properties defined in the propertiesSchema file",
42
+ "value": 78
43
+ },
44
+ {
45
+ "owner": "markdown",
46
+ "description": "Number of lines in the README.md",
47
+ "value": 344
48
+ },
49
+ {
50
+ "owner": "markdown",
51
+ "description": "Number of lines in the SUMMARY.md",
52
+ "value": 9
53
+ },
54
+ {
55
+ "owner": "markdown",
56
+ "description": "Number of lines in the PROPERTIES.md",
57
+ "value": 647
58
+ },
59
+ {
60
+ "owner": "markdown",
61
+ "description": "Number of lines in the TROUBLESHOOT.md",
62
+ "value": 48
63
+ },
64
+ {
65
+ "owner": "markdown",
66
+ "description": "Number of lines in the ENHANCE.md",
67
+ "value": 70
68
+ },
69
+ {
70
+ "owner": "markdown",
71
+ "description": "Number of lines in the BROKER.md",
72
+ "value": 70
73
+ },
74
+ {
75
+ "owner": "unitTestJS",
76
+ "description": "Number of lines of code in unit tests",
77
+ "value": 3672
78
+ },
79
+ {
80
+ "owner": "unitTestJS",
81
+ "description": "Number of unit tests",
82
+ "value": 213
83
+ },
84
+ {
85
+ "owner": "integrationTestJS",
86
+ "description": "Number of lines of code in integration tests",
87
+ "value": 2453
88
+ },
89
+ {
90
+ "owner": "integrationTestJS",
91
+ "description": "Number of integration tests",
92
+ "value": 69
93
+ },
94
+ {
95
+ "owner": "staticFile",
96
+ "description": "Number of lines of code in adapterBase.js",
97
+ "value": 1453
98
+ },
99
+ {
100
+ "owner": "staticFile",
101
+ "description": "Number of static files added",
102
+ "value": 36
103
+ },
104
+ {
105
+ "owner": "Overall",
106
+ "description": "Total lines of Code",
107
+ "value": 7578
108
+ },
109
+ {
110
+ "owner": "Overall",
111
+ "description": "Total Tests",
112
+ "value": 282
113
+ },
114
+ {
115
+ "owner": "Overall",
116
+ "description": "Total Files",
117
+ "value": 6
118
+ }
119
+ ]
120
+ }