PSImportClientSettings
The PSImportClientSettings.json file holds all settings for how PSImportClient should handle logging, dependencies, notifications and archiving CSV/TXT-files.
Overview
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 | {
"$schema": "schemas\\psImportClientSettings.schema.json",
"defaultModules":[
"Easit.PSImportClient.Commons",
"Easit.GO.Webservice"
],
"dependencyModules":{
"jdbcConfiguration":"Easit.PSImportClient.Jdbc"
},
"loggerSettings": {
"LoggingLevel": "INFO",
"LogName": "psImportClient",
"LogDirectory": "logs",
"RotationInterval": 10,
"LogNonOkImportResults":false
},
"archiveSettings": {
"directory":"archive",
"rotationInterval":15
},
"notificationSettings": {
"enabled": false,
"type":"smtp",
"smtpServer": "",
"To": "",
"From": "",
"Subject": "",
"username" : "",
"password" : ""
}
}
|
Details
Name |
Description |
Mandatory |
defaultModules |
List of modules imported during initialization of PSImportClient. |
x |
dependencyModules |
Modules imported upon invocation of the corresponding handler in Easit.PSImportClient.Commons. |
x |
loggerSettings |
Settings used by Write-CustomLog. |
x |
archiveSettings |
Settings used by Update-Archive. |
x |
notificationSettings |
Settings used by Send-Notification. |
|
dependencyModules
Name |
Description |
Mandatory |
jdbcConfiguration |
Module needed for handling ImportClient configurations of type jdbcConfiguration. |
x |
loggerSettings
Name |
Description |
Mandatory |
LoggingLevel |
Base level for all logging. |
x |
LogName |
Name of log file, appended to todays date. |
x |
LogDirectory |
Directory to write logs to, relative to PSImportClient.ps1. |
x |
RotationInterval |
For how many days should log files be kept. |
x |
LogNonOkImportResults |
If set to true and if Easit GO returns a NON OK response, the following line will be written to the log for each object (Import object with uid xxx returned with the result: yyy). |
|
archiveSettings
Name |
Description |
Mandatory |
directory |
Base directory for archive, relative to PSImportClient.ps1. |
x |
rotationInterval |
For how many days should files be kept in the archive. |
x |
notificationSettings
PSImportClient uses Send-Notification to send a notification in form of an mail if an error occurs. Under the hood, Send-Notification uses Send-MailMessage to perform this. Microsoft have issued a warning that "The Send-MailMessage cmdlet is obsolete. This cmdlet doesn't guarantee secure connections to SMTP servers.", we have an open issue on the Github repository, Replace implementation of Send-MailMessage to address this.
Name |
Description |
Mandatory |
enabled |
Should PSImportClient attempt to send an mail including the log file if an error occurs, true or false. |
x |
type |
smtp is the only supported type. |
x |
SmtpServer |
URL to SMTP server used to send the notification. |
x |
Port |
Specifies the port to use when connecting to the SMTP server. |
x |
To |
Address to send notification to. |
x |
From |
Address to send notification from. |
x |
Subject |
Subject of notification. |
x |
username |
Used for authenticating. |
x |
password |
Used for authenticating. |
x |
JSON Schema
psImportClientSettings.schema.json