@itentialopensource/adapter-thruk_monitoring 0.3.4 → 0.4.0
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/AUTH.md +14 -17
- package/BROKER.md +31 -19
- package/CHANGELOG.md +8 -0
- package/PROPERTIES.md +5 -0
- package/README.md +60 -63
- package/SYSTEMINFO.md +20 -5
- package/TAB1.md +9 -0
- package/TAB2.md +76 -1763
- package/metadata.json +22 -5
- package/package.json +4 -6
- package/propertiesSchema.json +5 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +4 -4
- package/report/updateReport1715798616398.json +120 -0
- package/sampleProperties.json +37 -25
- package/test/integration/adapterTestIntegration.js +1 -0
- package/test/unit/adapterTestUnit.js +0 -2
package/metadata.json
CHANGED
|
@@ -28,20 +28,37 @@
|
|
|
28
28
|
"isDeprecated": false
|
|
29
29
|
},
|
|
30
30
|
"brokerSince": "",
|
|
31
|
+
"authMethods": [
|
|
32
|
+
{
|
|
33
|
+
"type": "API Key",
|
|
34
|
+
"primary": true
|
|
35
|
+
}
|
|
36
|
+
],
|
|
31
37
|
"documentation": {
|
|
32
38
|
"storeLink": "",
|
|
33
39
|
"npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-thruk_monitoring",
|
|
34
|
-
"repoLink": "https://gitlab.com/itentialopensource/adapters/
|
|
40
|
+
"repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-thruk_monitoring",
|
|
35
41
|
"docLink": "https://docs.itential.com/opensource/docs/thruk-monitoring",
|
|
36
42
|
"demoLinks": [],
|
|
37
|
-
"trainingLinks": [
|
|
43
|
+
"trainingLinks": [
|
|
44
|
+
{
|
|
45
|
+
"title": "Itential Academy",
|
|
46
|
+
"link": "https://www.itential.com/itential-academy/"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
38
49
|
"faqLink": "https://docs.itential.com/opensource/docs/troubleshooting-an-adapter",
|
|
39
50
|
"contributeLink": "https://gitlab.com/itentialopensource/adapters/contributing-guide",
|
|
40
51
|
"issueLink": "https://itential.atlassian.net/servicedesk/customer/portals",
|
|
41
52
|
"webLink": "https://www.itential.com/adapters/thruk-monitoring/",
|
|
42
|
-
"vendorLink": "",
|
|
43
|
-
"productLink": "",
|
|
44
|
-
"apiLinks": [
|
|
53
|
+
"vendorLink": "https://www.thruk.org/",
|
|
54
|
+
"productLink": "https://www.thruk.org/",
|
|
55
|
+
"apiLinks": [
|
|
56
|
+
{
|
|
57
|
+
"title": "Thruk REST API",
|
|
58
|
+
"link": "https://www.thruk.org/documentation/rest.html",
|
|
59
|
+
"public": true
|
|
60
|
+
}
|
|
61
|
+
]
|
|
45
62
|
},
|
|
46
63
|
"assets": [],
|
|
47
64
|
"relatedItems": {
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itentialopensource/adapter-thruk_monitoring",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "This adapter integrates with system described as: Thruk.",
|
|
5
5
|
"main": "adapter.js",
|
|
6
6
|
"wizardVersion": "2.44.7",
|
|
7
|
-
"engineVersion": "1.67.
|
|
7
|
+
"engineVersion": "1.67.19",
|
|
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",
|
|
@@ -50,10 +49,10 @@
|
|
|
50
49
|
},
|
|
51
50
|
"repository": {
|
|
52
51
|
"type": "git",
|
|
53
|
-
"url": "git@gitlab.com:itentialopensource/adapters/
|
|
52
|
+
"url": "git@gitlab.com:itentialopensource/adapters/adapter-thruk_monitoring.git"
|
|
54
53
|
},
|
|
55
54
|
"author": "Itential",
|
|
56
|
-
"homepage": "https://gitlab.com/itentialopensource/adapters/
|
|
55
|
+
"homepage": "https://gitlab.com/itentialopensource/adapters/adapter-thruk_monitoring#readme",
|
|
57
56
|
"dependencies": {
|
|
58
57
|
"@itentialopensource/adapter-utils": "^5.3.10",
|
|
59
58
|
"acorn": "^8.10.0",
|
|
@@ -66,7 +65,6 @@
|
|
|
66
65
|
"mocha": "^10.3.0",
|
|
67
66
|
"mocha-param": "^2.0.1",
|
|
68
67
|
"mongodb": "^4.16.0",
|
|
69
|
-
"nyc": "^15.1.0",
|
|
70
68
|
"ping": "^0.4.4",
|
|
71
69
|
"prompts": "^2.4.2",
|
|
72
70
|
"readline-sync": "^1.4.10",
|
package/propertiesSchema.json
CHANGED
|
@@ -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
|
package/report/adapterInfo.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.3.
|
|
3
|
-
"configLines":
|
|
2
|
+
"version": "0.3.4",
|
|
3
|
+
"configLines": 5936,
|
|
4
4
|
"scriptLines": 1783,
|
|
5
5
|
"codeLines": 9928,
|
|
6
|
-
"testLines":
|
|
6
|
+
"testLines": 8250,
|
|
7
7
|
"testCases": 423,
|
|
8
|
-
"totalCodeLines":
|
|
8
|
+
"totalCodeLines": 19961,
|
|
9
9
|
"wfTasks": 121
|
|
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.3.10"
|
|
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": 4087
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"owner": "unitTestJS",
|
|
81
|
+
"description": "Number of unit tests",
|
|
82
|
+
"value": 248
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"owner": "integrationTestJS",
|
|
86
|
+
"description": "Number of lines of code in integration tests",
|
|
87
|
+
"value": 2911
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"owner": "integrationTestJS",
|
|
91
|
+
"description": "Number of integration tests",
|
|
92
|
+
"value": 105
|
|
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": 8451
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"owner": "Overall",
|
|
111
|
+
"description": "Total Tests",
|
|
112
|
+
"value": 353
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"owner": "Overall",
|
|
116
|
+
"description": "Total Files",
|
|
117
|
+
"value": 6
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
package/sampleProperties.json
CHANGED
|
@@ -118,30 +118,32 @@
|
|
|
118
118
|
}
|
|
119
119
|
},
|
|
120
120
|
"devicebroker": {
|
|
121
|
+
"enabled": false,
|
|
121
122
|
"getDevice": [
|
|
122
123
|
{
|
|
123
|
-
"path": "/
|
|
124
|
+
"path": "/not/mapped",
|
|
124
125
|
"method": "GET",
|
|
125
126
|
"query": {},
|
|
126
127
|
"body": {},
|
|
127
128
|
"headers": {},
|
|
128
129
|
"handleFailure": "ignore",
|
|
129
130
|
"requestFields": {
|
|
130
|
-
"
|
|
131
|
+
"insample": "{port}"
|
|
131
132
|
},
|
|
132
133
|
"responseDatakey": "",
|
|
133
134
|
"responseFields": {
|
|
134
|
-
"name": "
|
|
135
|
-
"ostype": "
|
|
136
|
-
"ostypePrefix": "
|
|
137
|
-
"
|
|
138
|
-
"
|
|
135
|
+
"name": "{this}{||}{that}",
|
|
136
|
+
"ostype": "{osfield}",
|
|
137
|
+
"ostypePrefix": "meraki-",
|
|
138
|
+
"port": "{port}",
|
|
139
|
+
"ipaddress": "{ip_addr}",
|
|
140
|
+
"serial" : "{serial}"
|
|
139
141
|
}
|
|
140
142
|
}
|
|
141
143
|
],
|
|
142
144
|
"getDevicesFiltered": [
|
|
143
145
|
{
|
|
144
|
-
"path": "/
|
|
146
|
+
"path": "/not/mapped",
|
|
145
147
|
"method": "GET",
|
|
146
148
|
"pagination": {
|
|
147
149
|
"offsetVar": "",
|
|
@@ -156,42 +158,44 @@
|
|
|
156
158
|
"requestFields": {},
|
|
157
159
|
"responseDatakey": "",
|
|
158
160
|
"responseFields": {
|
|
159
|
-
"name": "
|
|
160
|
-
"ostype": "
|
|
161
|
-
"ostypePrefix": "
|
|
162
|
-
"
|
|
163
|
-
"
|
|
161
|
+
"name": "{this}{||}{that}",
|
|
162
|
+
"ostype": "{osfield}",
|
|
163
|
+
"ostypePrefix": "meraki-",
|
|
164
|
+
"port": "{port}",
|
|
165
|
+
"ipaddress": "{ip_addr}",
|
|
166
|
+
"serial" : "{serial}",
|
|
167
|
+
"id": "{myid}"
|
|
164
168
|
}
|
|
165
169
|
}
|
|
166
170
|
],
|
|
167
171
|
"isAlive": [
|
|
168
172
|
{
|
|
169
|
-
"path": "/
|
|
173
|
+
"path": "/not/mapped/{devID}",
|
|
170
174
|
"method": "GET",
|
|
171
175
|
"query": {},
|
|
172
176
|
"body": {},
|
|
173
177
|
"headers": {},
|
|
174
178
|
"handleFailure": "ignore",
|
|
175
179
|
"requestFields": {
|
|
176
|
-
"
|
|
180
|
+
"devID": "{id}"
|
|
177
181
|
},
|
|
178
182
|
"responseDatakey": "",
|
|
179
183
|
"responseFields": {
|
|
180
|
-
"status": "
|
|
181
|
-
"statusValue": "
|
|
184
|
+
"status": "return2xx",
|
|
185
|
+
"statusValue": "AD.200"
|
|
182
186
|
}
|
|
183
187
|
}
|
|
184
188
|
],
|
|
185
189
|
"getConfig": [
|
|
186
190
|
{
|
|
187
|
-
"path": "/
|
|
191
|
+
"path": "/not/mapped/{devID}",
|
|
188
192
|
"method": "GET",
|
|
189
193
|
"query": {},
|
|
190
194
|
"body": {},
|
|
191
195
|
"headers": {},
|
|
192
196
|
"handleFailure": "ignore",
|
|
193
197
|
"requestFields": {
|
|
194
|
-
"
|
|
198
|
+
"devID": "{id}"
|
|
195
199
|
},
|
|
196
200
|
"responseDatakey": "",
|
|
197
201
|
"responseFields": {}
|
|
@@ -199,7 +203,7 @@
|
|
|
199
203
|
],
|
|
200
204
|
"getCount": [
|
|
201
205
|
{
|
|
202
|
-
"path": "/
|
|
206
|
+
"path": "/not/mapped",
|
|
203
207
|
"method": "GET",
|
|
204
208
|
"query": {},
|
|
205
209
|
"body": {},
|
|
@@ -215,15 +219,15 @@
|
|
|
215
219
|
"enabled": false,
|
|
216
220
|
"entities": [
|
|
217
221
|
{
|
|
218
|
-
"entityType": "",
|
|
219
|
-
"frequency":
|
|
222
|
+
"entityType": "device",
|
|
223
|
+
"frequency": 3600,
|
|
220
224
|
"flushOnFail": false,
|
|
221
|
-
"limit":
|
|
225
|
+
"limit": 10000,
|
|
222
226
|
"retryAttempts": 5,
|
|
223
227
|
"sort": true,
|
|
224
228
|
"populate": [
|
|
225
229
|
{
|
|
226
|
-
"path": "",
|
|
230
|
+
"path": "/not/mapped",
|
|
227
231
|
"method": "GET",
|
|
228
232
|
"pagination": {
|
|
229
233
|
"offsetVar": "",
|
|
@@ -237,7 +241,15 @@
|
|
|
237
241
|
"handleFailure": "ignore",
|
|
238
242
|
"requestFields": {},
|
|
239
243
|
"responseDatakey": "",
|
|
240
|
-
"responseFields": {
|
|
244
|
+
"responseFields": {
|
|
245
|
+
"name": "{this}{||}{that}",
|
|
246
|
+
"ostype": "{osfield}",
|
|
247
|
+
"ostypePrefix": "meraki-",
|
|
248
|
+
"port": "{port}",
|
|
249
|
+
"ipaddress": "{ip_addr}",
|
|
250
|
+
"serial" : "{serial}",
|
|
251
|
+
"id": "{myid}"
|
|
252
|
+
}
|
|
241
253
|
}
|
|
242
254
|
],
|
|
243
255
|
"cachedTasks": [
|
|
@@ -46,6 +46,7 @@ samProps.ssl.accept_invalid_cert = false;
|
|
|
46
46
|
if (samProps.request.attempt_timeout < 30000) {
|
|
47
47
|
samProps.request.attempt_timeout = 30000;
|
|
48
48
|
}
|
|
49
|
+
samProps.devicebroker.enabled = true;
|
|
49
50
|
const attemptTimeout = samProps.request.attempt_timeout;
|
|
50
51
|
const { stub } = samProps;
|
|
51
52
|
|
|
@@ -284,7 +284,6 @@ describe('[unit] Thruk_monitoring Adapter Test', () => {
|
|
|
284
284
|
assert.equal('mocha test/unit/adapterBaseTestUnit.js --LOG=error', packageDotJson.scripts['test:baseunit']);
|
|
285
285
|
assert.equal('mocha test/unit/adapterTestUnit.js --LOG=error', packageDotJson.scripts['test:unit']);
|
|
286
286
|
assert.equal('mocha test/integration/adapterTestIntegration.js --LOG=error', packageDotJson.scripts['test:integration']);
|
|
287
|
-
assert.equal('nyc --reporter html --reporter text mocha --reporter dot test/*', packageDotJson.scripts['test:cover']);
|
|
288
287
|
assert.equal('npm run test:baseunit && npm run test:unit && npm run test:integration', packageDotJson.scripts.test);
|
|
289
288
|
assert.equal('npm publish --registry=https://registry.npmjs.org --access=public', packageDotJson.scripts.deploy);
|
|
290
289
|
assert.equal('npm run deploy', packageDotJson.scripts.build);
|
|
@@ -321,7 +320,6 @@ describe('[unit] Thruk_monitoring Adapter Test', () => {
|
|
|
321
320
|
assert.equal('^11.1.1', packageDotJson.dependencies['fs-extra']);
|
|
322
321
|
assert.equal('^10.3.0', packageDotJson.dependencies.mocha);
|
|
323
322
|
assert.equal('^2.0.1', packageDotJson.dependencies['mocha-param']);
|
|
324
|
-
assert.equal('^15.1.0', packageDotJson.dependencies.nyc);
|
|
325
323
|
assert.equal('^0.4.4', packageDotJson.dependencies.ping);
|
|
326
324
|
assert.equal('^1.4.10', packageDotJson.dependencies['readline-sync']);
|
|
327
325
|
assert.equal('^7.5.3', packageDotJson.dependencies.semver);
|