@itentialopensource/adapter-meraki 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
package/AUTH.md ADDED
@@ -0,0 +1,40 @@
1
+ # Authenticating Meraki Adapter
2
+
3
+ This document will go through the steps for authenticating the Meraki adapter with Basic Authentication. Properly configuring the properties for an adapter in IAP is critical for getting the adapter online. You can read more about adapter authentication [HERE](https://www.itential.com/automation-platform/integrations/adapters-resources/authentication/).
4
+
5
+ ## Basic Authentication
6
+ The Meraki adapter requires Basic Authentication.
7
+
8
+ STEPS
9
+ 1. Ensure you have access to a Meraki server and that it is running
10
+ 2. Follow the steps in the main [README.md](./README.md) to import the adapter into IAP if you have not already done so
11
+ 3. Use the properties below for the ```properties.authentication``` field
12
+ ```json
13
+ "authentication": {
14
+ "auth_method": "basic user_password",
15
+ "username": "<username>",
16
+ "password": "<password>",
17
+ "token": "",
18
+ "token_timeout": 1800000,
19
+ "token_cache": "local",
20
+ "invalid_token_error": 401,
21
+ "auth_field": "header.headers.Authorization",
22
+ "auth_field_format": "Basic {b64}{username}:{password}{/b64}",
23
+ "auth_logging": false,
24
+ "client_id": "",
25
+ "client_secret": "",
26
+ "grant_type": ""
27
+ }
28
+ ```
29
+ 4. Restart the adapter. If your properties were set correctly, the adapter should go online.
30
+
31
+ ![Adapter Connected](./images/adapter_connected.png)
32
+
33
+ ## Troubleshooting
34
+ * Make sure you copied over the correct username and password.
35
+ * Turn on debug level logs for the adapter in IAP Admin Essentials.
36
+ * Turn on auth_logging for the adapter in IAP Admin Essentials (adapter properties).
37
+ * Investigate the logs - in particular:
38
+ ** The FULL REQUEST log to make sure the proper headers are being sent with the request.
39
+ ** The FULL BODY log
40
+ ** The CALL RETURN log to see what the other system is telling us.
package/CALLS.md ADDED
@@ -0,0 +1,100 @@
1
+ ## Using this Adapter
2
+
3
+ The `adapter.js` file contains the calls the adapter makes available to the rest of the Itential Platform. The API detailed for these calls should be available through JSDOC. The following is a brief summary of the calls.
4
+
5
+ ### Generic Adapter Calls
6
+
7
+ The `connect` call is run when the Adapter is first loaded by he Itential Platform. It validates the properties have been provided correctly.
8
+ ```js
9
+ connect()
10
+ ```
11
+
12
+ The `healthCheck` call ensures that the adapter can communicate with Meraki. The actual call that is used is defined in the adapter properties.
13
+ ```js
14
+ healthCheck(callback)
15
+ ```
16
+
17
+ The `refreshProperties` call provides the adapter the ability to accept property changes without having to restart the adapter.
18
+ ```js
19
+ refreshProperties(properties)
20
+ ```
21
+
22
+ The `encryptProperty` call will take the provided property and technique, and return the property encrypted with the technique. This allows the property to be used in the adapterProps section for the credential password so that the password does not have to be in clear text. The adapter will decrypt the property as needed for communications with Meraki.
23
+ ```js
24
+ encryptProperty(property, technique, callback)
25
+ ```
26
+
27
+ The `addEntityCache` call will take the entities and add the list to the entity cache to expedite performance.
28
+ ```js
29
+ addEntityCache(entityType, entities, key, callback)
30
+ ```
31
+
32
+ The `capabilityResults` call will take the results from a verifyCompatibility and put them in the format to be passed back to the Itential Platform.
33
+ ```js
34
+ capabilityResults(results, callback)
35
+ ```
36
+
37
+ The `hasEntity` call verifies the adapter has the specific entity.
38
+ ```js
39
+ hasEntity(entityType, entityId, callback)
40
+ ```
41
+
42
+ The `verifyCapability` call verifies the adapter can perform the provided action on the specific entity.
43
+ ```js
44
+ verifyCapability(entityType, actionType, entityId, callback)
45
+ ```
46
+
47
+ The `updateEntityCache` call will update the entity cache.
48
+ ```js
49
+ updateEntityCache()
50
+ ```
51
+
52
+ The `updateAdapterConfiguration` call provides the ability to update the adapter configuration from IAP - includes actions, schema, mockdata and other configurations.
53
+ ```js
54
+ updateAdapterConfiguration(configFile, changes, entity, type, action, callback)
55
+ ```
56
+
57
+ The `suspend` call provides the ability to suspend the adapter and either have requests rejected or put into a queue to be processed after the adapter is resumed.
58
+ ```js
59
+ suspend(mode, callback)
60
+ ```
61
+
62
+ The `unsuspend` call provides the ability to resume a suspended adapter. Any requests in queue will be processed before new requests.
63
+ ```js
64
+ unsuspend(callback)
65
+ ```
66
+
67
+ The `findPath` call provides the ability to see if a particular API path is supported by the adapter.
68
+ ```js
69
+ findPath(apiPath, callback)
70
+ ```
71
+
72
+ The `troubleshoot` call can be used to check on the performance of the adapter - it checks connectivity, healthcheck and basic get calls.
73
+ ```js
74
+ troubleshoot(props, persistFlag, adapter, callback)
75
+ ```
76
+
77
+ The `runHealthcheck` call will return the results of a healthcheck.
78
+ ```js
79
+ runHealthcheck(adapter, callback)
80
+ ```
81
+
82
+ The `runConnectivity` call will return the results of a connectivity check.
83
+ ```js
84
+ runConnectivity(callback)
85
+ ```
86
+
87
+ The `runBasicGet` call will return the results of running basic get API calls.
88
+ ```js
89
+ runBasicGet(callback)
90
+ ```
91
+
92
+ The `getQueue` call will return the requests that are waiting in the queue if throttling is enabled.
93
+ ```js
94
+ getQueue(callback)
95
+ ```
96
+
97
+ ### Specific Adapter Calls
98
+
99
+ Specific adapter calls are built based on the API of the Meraki. The Adapter Builder creates the proper method comments for generating JS-DOC for the adapter. This is the best way to get information on the calls.
100
+
package/CHANGELOG.md CHANGED
@@ -1,4 +1,12 @@
1
1
 
2
+ ## 0.8.1 [04-13-2022]
3
+
4
+ * added properties for broker calls and new documentation
5
+
6
+ See merge request itentialopensource/adapters/sd-wan/adapter-meraki!16
7
+
8
+ ---
9
+
2
10
  ## 0.8.0 [01-21-2022]
3
11
 
4
12
  * migration to the latest foundation and broker ready
package/ENHANCE.md ADDED
@@ -0,0 +1,69 @@
1
+ ### Enhancements
2
+
3
+ #### Adding a Second Instance of an Adapter
4
+
5
+ You can add a second instance of this adapter without adding new code on the file system. To do this go into the IAP Admin Essentials and add a new service config for this adapter. The two instances of the adapter should have unique ids. In addition, they should point to different instances of the other system. For example, they should be configured to talk to different hosts.
6
+
7
+ #### Adding Adapter Calls
8
+
9
+ There are multiple ways to add calls to an existing adapter.
10
+
11
+ The easiest way would be to use the Adapter Builder update process. This process takes in a Swagger or OpenAPI document, allows you to select the calls you want to add and then generates a zip file that can be used to update the adapter. Once you have the zip file simple put it in the adapter direcctory and execute `npm run adapter:update`.
12
+
13
+ ```bash
14
+ mv updatePackage.zip adapter-meraki
15
+ cd adapter-meraki
16
+ npm run adapter:update
17
+ ```
18
+
19
+ If you do not have a Swagger or OpenAPI document, you can use a Postman Collection and convert that to an OpenAPI document using APIMatic and then follow the first process.
20
+
21
+ If you want to manually update the adapter that can also be done the key thing is to make sure you update all of the right files. Within the entities directory you will find 1 or more entities. You can create a new entity or add to an existing entity. Each entity has an action.json file, any new call will need to be put in the action.json file. It will also need to be added to the enum for the ph_request_type in the appropriate schema files. Once this configuration is complete you will need to add the call to the adapter.js file and in order to make it available as a workflow task in IAP, it should also be added to the pronghorn.json file. You can optionally add it to the unit and integration test files. There is more information on how to work on each of these files in the Adapter Technical Resources on Dev Site [HERE](https://developer.itential.io/adapters-resources/)
22
+
23
+ ```text
24
+ Files to update
25
+ * entities/<entity>/action.json: add an action
26
+ * entities/<entity>/schema.json (or the schema defined on the action): add action to the enum for ph_request_type
27
+ * adapter.js: add the new method and make sure it calls the proper entity and action
28
+ * pronghorn.json: add the new method
29
+ * test/unit/adapterTestUnit.js (optional but best practice): add unit test(s) - function is there, any required parameters error when not passed in
30
+ * test/integration/adapterTestIntegration.js (optional but best practice): add integration test
31
+ ```
32
+
33
+ #### Adding Adapter Properties
34
+
35
+ While changing adapter properties is done in the service instance configuration section of IAP, adding properties has to be done in the adapter. To add a property you should edit the propertiesSchema.json with the proper information for the property. In addition, you should modify the sampleProperties to have the new property in it.
36
+
37
+ ```text
38
+ Files to update
39
+ * propertiesSchema.json: add the new property and how it is defined
40
+ * sampleProperties: add the new property with a default value
41
+ * test/unit/adapterTestUnit.js (optional but best practice): add the property to the global properties
42
+ * test/integration/adapterTestIntegration.js (optional but best practice): add the property to the global properties
43
+ ```
44
+
45
+ #### Changing Adapter Authentication
46
+
47
+ Often an adapter is built before knowing the authentication and authentication process can also change over time. The adapter supports many different kinds of authentication but it does require configuration. Some forms of authentication can be defined entirely with the adapter properties but others require configuration.
48
+
49
+ ```text
50
+ Files to update
51
+ * entities/<entity>/action.json: change the getToken action as needed
52
+ * entities/<entity>/schemaTokenReq.json: add input parameters (external name is name in other system)
53
+ * entities/<entity>/schemaTokenResp.json: add response parameters (external name is name in other system)
54
+ * propertiesSchema.json: add any new property and how it is defined
55
+ * sampleProperties: add any new property with a default value
56
+ * test/unit/adapterTestUnit.js (optional but best practice): add the property to the global properties
57
+ * test/integration/adapterTestIntegration.js (optional but best practice): add the property to the global properties
58
+ ```
59
+
60
+ #### Enhancing Adapter Integration Tests
61
+
62
+ The adapter integration tests are written to be able to test in either stub (standalone) mode or integrated to the other system. However, if integrating to the other system, you may need to provide better data than what the adapter provides by default as that data is likely to fail for create and update. To provide better data, edit the adapter integration test file. Make sure you do not remove the marker and keep custom code below the marker so you do not impact future migrations. Once the edits are complete, run the integration test as it instructs you to above. When you run integrated to the other system, you can also save mockdata for future use by changing the isSaveMockData flag to true.
63
+
64
+ ```text
65
+ Files to update
66
+ * test/integration/adapterTestIntegration.js: add better data for the create and update calls so that they will not fail.
67
+ ```
68
+
69
+ As mentioned previously, for most of these changes as well as other possible changes, there is more information on how to work on an adapter in the Adapter Technical Resources on Dev Site [HERE](https://developer.itential.io/adapters-resources/)
package/PROPERTIES.md ADDED
@@ -0,0 +1,247 @@
1
+ ## Configuration
2
+
3
+ This section defines **all** the properties that are available for the adapter, including detailed information on what each property is for. If you are not using certain capabilities with this adapter, you do not need to define all of the properties. An example of how the properties for this adapter can be used with tests or IAP are provided in the sampleProperties.
4
+
5
+ ```json
6
+ {
7
+ "id": "ALL ADAPTER PROPERTIES!!!",
8
+ "properties": {
9
+ "host": "system.access.resolved",
10
+ "port": 443,
11
+ "base_path": "/",
12
+ "version": "v1",
13
+ "cache_location": "local",
14
+ "encode_pathvars": true,
15
+ "save_metric": true,
16
+ "stub": false,
17
+ "protocol": "https",
18
+ "authentication": {
19
+ "auth_method": "basic user_password",
20
+ "username": "username",
21
+ "password": "password",
22
+ "token": "token",
23
+ "invalid_token_error": 401,
24
+ "token_timeout": 0,
25
+ "token_cache": "local",
26
+ "auth_field": "header.headers.X-AUTH-TOKEN",
27
+ "auth_field_format": "{token}",
28
+ "auth_logging": false,
29
+ "client_id": "",
30
+ "client_secret": "",
31
+ "grant_type": ""
32
+ },
33
+ "healthcheck": {
34
+ "type": "startup",
35
+ "frequency": 300000,
36
+ "query_object": {}
37
+ },
38
+ "request": {
39
+ "number_redirects": 0,
40
+ "number_retries": 3,
41
+ "limit_retry_error": [401],
42
+ "failover_codes": [404, 405],
43
+ "attempt_timeout": 5000,
44
+ "global_request": {
45
+ "payload": {},
46
+ "uriOptions": {},
47
+ "addlHeaders": {},
48
+ "authData": {}
49
+ },
50
+ "healthcheck_on_timeout": false,
51
+ "return_raw": false,
52
+ "archiving": false,
53
+ "return_request": false
54
+ },
55
+ "ssl": {
56
+ "ecdhCurve": "",
57
+ "enabled": false,
58
+ "accept_invalid_cert": false,
59
+ "ca_file": "",
60
+ "key_file": "",
61
+ "cert_file": "",
62
+ "secure_protocol": "",
63
+ "ciphers": ""
64
+ },
65
+ "throttle": {
66
+ "throttle_enabled": false,
67
+ "number_pronghorns": 1,
68
+ "sync_async": "sync",
69
+ "max_in_queue": 1000,
70
+ "concurrent_max": 1,
71
+ "expire_timeout": 0,
72
+ "avg_runtime": 200,
73
+ "priorities": []
74
+ },
75
+ "proxy": {
76
+ "enabled": false,
77
+ "host": "localhost",
78
+ "port": 9999,
79
+ "protocol": "http",
80
+ "username": "",
81
+ "password": "",
82
+ },
83
+ "mongo": {
84
+ "host": "",
85
+ "port": 0,
86
+ "database": "",
87
+ "username": "",
88
+ "password": "",
89
+ "replSet": "",
90
+ "db_ssl": {
91
+ "enabled": false,
92
+ "accept_invalid_cert": false,
93
+ "ca_file": "",
94
+ "key_file": "",
95
+ "cert_file": ""
96
+ }
97
+ }
98
+ },
99
+ "type": "YOUR ADAPTER CLASS"
100
+ }
101
+ ```
102
+
103
+ ### Connection Properties
104
+
105
+ These base properties are used to connect to Meraki upon the adapter initially coming up. It is important to set these properties appropriately.
106
+
107
+ | Property | Description |
108
+ | ------- | ------- |
109
+ | host | Required. A fully qualified domain name or IP address.|
110
+ | port | Required. Used to connect to the server.|
111
+ | base_path | Optional. Used to define part of a path that is consistent for all or most endpoints. It makes the URIs easier to use and maintain but can be overridden on individual calls. An example **base_path** might be `/rest/api`. Default is ``.|
112
+ | version | Optional. Used to set a global version for action endpoints. This makes it faster to update the adapter when endpoints change. As with the base-path, version can be overridden on individual endpoints. Default is ``.|
113
+ | cache\_location | Optional. Used to define where the adapter cache is located. The cache is used to maintain an entity list to improve performance. Storage locally is lost when the adapter is restarted. Storage in Redis is preserved upon adapter restart. Default is none which means no caching of the entity list.|
114
+ | encode\_pathvars | Optional. Used to tell the adapter to encode path variables or not. The default behavior is to encode them so this property can b e used to stop that behavior.|
115
+ | save\_metric | Optional. Used to tell the adapter to save metric information (this does not impact metrics returned on calls). This allows the adapter to gather metrics over time. Metric data can be stored in a database or on the file system.|
116
+ | stub | Optional. Indicates whether the stub should run instead of making calls to Meraki (very useful during basic testing). Default is false (which means connect to Meraki).|
117
+ | protocol | Optional. Notifies the adapter whether to use HTTP or HTTPS. Default is HTTP.|
118
+
119
+ A connectivity check tells IAP the adapter has loaded successfully.
120
+
121
+ ### Authentication Properties
122
+
123
+ The following properties are used to define the authentication process to Meraki.
124
+
125
+ >**Note**: Depending on the method that is used to authenticate with Meraki, you may not need to set all of the authentication properties.
126
+
127
+ | Property | Description |
128
+ | ------- | ------- |
129
+ | auth\_method | Required. Used to define the type of authentication currently supported. Authentication methods currently supported are: `basic user_password`, `static_token`, `request_token`, and `no_authentication`.|
130
+ | username | Used to authenticate with Meraki on every request or when pulling a token that will be used in subsequent requests.|
131
+ | password | Used to authenticate with Meraki on every request or when pulling a token that will be used in subsequent requests.|
132
+ | token | Defines a static token that can be used on all requests. Only used with `static_token` as an authentication method (auth\_method).|
133
+ | invalid\_token\_error | Defines the HTTP error that is received when the token is invalid. Notifies the adapter to pull a new token and retry the request. Default is 401.|
134
+ | token\_timeout | Defines how long a token is valid. Measured in milliseconds. Once a dynamic token is no longer valid, the adapter has to pull a new token. If the token\_timeout is set to -1, the adapter will pull a token on every request to Meraki. If the timeout\_token is 0, the adapter will use the expiration from the token response to determine when the token is no longer valid.|
135
+ | token\_cache | Used to determine where the token should be stored (local memory or in Redis).|
136
+ | auth\_field | Defines the request field the authentication (e.g., token are basic auth credentials) needs to be placed in order for the calls to work.|
137
+ | auth\_field\_format | Defines the format of the auth\_field. See examples below. Items enclosed in {} inform the adapter to perofrm an action prior to sending the data. It may be to replace the item with a value or it may be to encode the item. |
138
+ | auth\_logging | Setting this true will add some additional logs but this should only be done when trying to debug an issue as certain credential information may be logged out when this is true. |
139
+ | client\_id | Provide a client id when needed, this is common on some types of OAuth. |
140
+ | client\_secret | Provide a client secret when needed, this is common on some types of OAuth. |
141
+ | grant\_type | Provide a grant type when needed, this is common on some types of OAuth. |
142
+
143
+ #### Examples of authentication field format
144
+
145
+ ```json
146
+ "{token}"
147
+ "Token {token}"
148
+ "{username}:{password}"
149
+ "Basic {b64}{username}:{password}{/b64}"
150
+ ```
151
+
152
+ ### Healthcheck Properties
153
+
154
+ The healthcheck properties defines the API that runs the healthcheck to tell the adapter that it can reach Meraki. There are currently three types of healthchecks.
155
+
156
+ - None - Not recommended. Adapter will not run a healthcheck. Consequently, unable to determine before making a request if the adapter can reach Meraki.
157
+ - Startup - Adapter will check for connectivity when the adapter initially comes up, but it will not check afterwards.
158
+ - Intermittent - Adapter will check connectivity to Meraki at a frequency defined in the `frequency` property.
159
+
160
+ | Property | Description |
161
+ | ------- | ------- |
162
+ | type | Required. The type of health check to run. |
163
+ | frequency | Required if intermittent. Defines how often the health check should run. Measured in milliseconds. Default is 300000.|
164
+ | query_object | Query parameters to be added to the adapter healthcheck call.|
165
+
166
+ ### Request Properties
167
+
168
+ The request section defines properties to help handle requests.
169
+
170
+ | Property | Description |
171
+ | ------- | ------- |
172
+ | number\_redirects | Optional. Tells the adapter that the request may be redirected and gives it a maximum number of redirects to allow before returning an error. Default is 0 - no redirects.|
173
+ | number\_retries | Tells the adapter how many times to retry a request that has either aborted or reached a limit error before giving up and returning an error.|
174
+ | limit\_retry\_error | Optional. Can be either an integer or an array. Indicates the http error status number to define that no capacity was available and, after waiting a short interval, the adapter can retry the request. If an array is provvided, the array can contain integers or strings. Strings in the array are used to define ranges (e.g. "502-506"). Default is [0].|
175
+ | failover\_codes | An array of error codes for which the adapter will send back a failover flag to IAP so that the Platform can attempt the action in another adapter.|
176
+ | attempt\_timeout | Optional. Tells how long the adapter should wait before aborting the attempt. On abort, the adapter will do one of two things: 1) return the error; or 2) if **healthcheck\_on\_timeout** is set to true, it will abort the request and run a Healthcheck until it re-establishes connectivity to Meraki, and then will re-attempt the request that aborted. Default is 5000 milliseconds.|
177
+ | global\_request | Optional. This is information that the adapter can include in all requests to the other system. This is easier to define and maintain than adding this information in either the code (adapter.js) or the action files.|
178
+ | global\_request -> payload | Optional. Defines any information that should be included on all requests sent to the other system that have a payload/body.|
179
+ | global\_request -> uriOptions | Optional. Defines any information that should be sent as untranslated query options (e.g. page, size) on all requests to the other system.|
180
+ | global\_request -> addlHeaders | Optioonal. Defines any headers that should be sent on all requests to the other system.|
181
+ | global\_request -> authData | Optional. Defines any additional authentication data used to authentice with the other system. This authData needs to be consistent on every request.|
182
+ | healthcheck\_on\_timeout | Required. Defines if the adapter should run a health check on timeout. If set to true, the adapter will abort the request and run a health check until it re-establishes connectivity and then it will re-attempt the request.|
183
+ | return\_raw | Optional. Tells the adapter whether the raw response should be returned as well as the IAP response. This is helpful when running integration tests to save mock data. It does add overhead to the response object so it is not ideal from production.|
184
+ | archiving | Optional flag. Default is false. It archives the request, the results and the various times (wait time, Meraki time and overall time) in the `adapterid_results` collection in MongoDB. Although archiving might be desirable, be sure to develop a strategy before enabling this capability. Consider how much to archive and what strategy to use for cleaning up the collection in the database so that it does not become too large, especially if the responses are large.|
185
+ | return\_request | Optional flag. Default is false. Will return the actual request that is made including headers. This should only be used during debugging issues as there could be credentials in the actual request.|
186
+
187
+ ### SSL Properties
188
+
189
+ The SSL section defines the properties utilized for ssl authentication with Meraki. SSL can work two different ways: set the `accept\_invalid\_certs` flag to true (only recommended for lab environments), or provide a `ca\_file`.
190
+
191
+ | Property | Description |
192
+ | ------- | ------- |
193
+ | enabled | If SSL is required, set to true. |
194
+ | accept\_invalid\_certs | Defines if the adapter should accept invalid certificates (only recommended for lab environments). Required if SSL is enabled. Default is false.|
195
+ | ca\_file | Defines the path name to the CA file used for SSL. If SSL is enabled and the accept invalid certifications is false, then ca_file is required.|
196
+ | key\_file | Defines the path name to the Key file used for SSL. The key_file may be needed for some systems but it is not required for SSL.|
197
+ | cert\_file | Defines the path name to the Certificate file used for SSL. The cert_file may be needed for some systems but it is not required for SSL.|
198
+ | secure\_protocol | Defines the protocol (e.g., SSLv3_method) to use on the SSL request.|
199
+ | ciphers | Required if SSL enabled. Specifies a list of SSL ciphers to use.|
200
+ | ecdhCurve | During testing on some Node 8 environments, you need to set `ecdhCurve` to auto. If you do not, you will receive PROTO errors when attempting the calls. This is the only usage of this property and to our knowledge it only impacts Node 8 and 9. |
201
+
202
+ ### Throttle Properties
203
+
204
+ The throttle section is used when requests to Meraki must be queued (throttled). All of the properties in this section are optional.
205
+
206
+ | Property | Description |
207
+ | ------- | ------- |
208
+ | throttle\_enabled | Default is false. Defines if the adapter should use throttling o rnot. |
209
+ | number\_pronghorns | Default is 1. Defines if throttling is done in a single Itential instance or whether requests are being throttled across multiple Itential instances (minimum = 1, maximum = 20). Throttling in a single Itential instance uses an in-memory queue so there is less overhead. Throttling across multiple Itential instances requires placing the request and queue information into a shared resource (e.g. database) so that each instance can determine what is running and what is next to run. Throttling across multiple instances requires additional I/O overhead.|
210
+ | sync-async | This property is not used at the current time (it is for future expansion of the throttling engine).|
211
+ | max\_in\_queue | Represents the maximum number of requests the adapter should allow into the queue before rejecting requests (minimum = 1, maximum = 5000). This is not a limit on what the adapter can handle but more about timely responses to requests. The default is currently 1000.|
212
+ | concurrent\_max | Defines the number of requests the adapter can send to Meraki at one time (minimum = 1, maximum = 1000). The default is 1 meaning each request must be sent to Meraki in a serial manner. |
213
+ | expire\_timeout | Default is 0. Defines a graceful timeout of the request session. After a request has completed, the adapter will wait additional time prior to sending the next request. Measured in milliseconds (minimum = 0, maximum = 60000).|
214
+ | average\_runtime | Represents the approximate average of how long it takes Meraki to handle each request. Measured in milliseconds (minimum = 50, maximum = 60000). Default is 200. This metric has performance implications. If the runtime number is set too low, it puts extra burden on the CPU and memory as the requests will continually try to run. If the runtime number is set too high, requests may wait longer than they need to before running. The number does not need to be exact but your throttling strategy depends heavily on this number being within reason. If averages range from 50 to 250 milliseconds you might pick an average run-time somewhere in the middle so that when Meraki performance is exceptional you might run a little slower than you might like, but when it is poor you still run efficiently.|
215
+ | priorities | An array of priorities and how to handle them in relation to the throttle queue. Array of objects that include priority value and percent of queue to put the item ex { value: 1, percent: 10 }|
216
+
217
+ ### Proxy Properties
218
+
219
+ The proxy section defines the properties to utilize when Meraki is behind a proxy server.
220
+
221
+ | Property | Description |
222
+ | ------- | ------- |
223
+ | enabled | Required. Default is false. If Meraki is behind a proxy server, set enabled flag to true. |
224
+ | host | Host information for the proxy server. Required if `enabled` is true.|
225
+ | port | Port information for the proxy server. Required if `enabled` is true.|
226
+ | protocol | The protocol (i.e., http, https, etc.) used to connect to the proxy. Default is http.|
227
+ | username | If there is authentication for the proxy, provide the username here.|
228
+ | password | If there is authentication for the proxy, provide the password here.|
229
+
230
+ ### Mongo Properties
231
+
232
+ The mongo section defines the properties used to connect to a Mongo database. Mongo can be used for throttling as well as to persist metric data. If not provided, metrics will be stored in the file system.
233
+
234
+ | Property | Description |
235
+ | ------- | ------- |
236
+ | host | Optional. Host information for the mongo server.|
237
+ | port | Optional. Port information for the mongo server.|
238
+ | database | Optional. The database for the adapter to use for its data.|
239
+ | username | Optional. If credentials are required to access mongo, this is the user to login as.|
240
+ | password | Optional. If credentials are required to access mongo, this is the password to login with.|
241
+ | replSet | Optional. If the database is set up to use replica sets, define it here so it can be added to the database connection.|
242
+ | db\_ssl | Optional. Contains information for SSL connectivity to the database.|
243
+ | db\_ssl -> enabled | If SSL is required, set to true.|
244
+ | db\_ssl -> accept_invalid_cert | Defines if the adapter should accept invalid certificates (only recommended for lab environments). Required if SSL is enabled. Default is false.|
245
+ | db\_ssl -> ca_file | Defines the path name to the CA file used for SSL. If SSL is enabled and the accept invalid certifications is false, then ca_file is required.|
246
+ | db\_ssl -> key_file | Defines the path name to the Key file used for SSL. The key_file may be needed for some systems but it is not required for SSL.|
247
+ | db\_ssl -> cert_file | Defines the path name to the Certificate file used for SSL. The cert_file may be needed for some systems but it is not required for SSL.|