Logging for NFS and SMB (optional)
Logging for XCP NFS and SMB.
XCP supports configuring multiple optional features by using the xcpLogConfig.json
JSON configuration file. To enable only specific features, manually create the xcpLogConfig.json
configuration file. You can use the xcpLogConfig.json
configuration file to enable:
-
event log messages
-
syslog client for XCP
-
custom XCP logging
Event log messages and the syslog client are disabled in the default configuration. Configuration is common for both NFS and SMB.
Config JSON file location | NFS | SMB |
---|---|---|
Config file default location |
/opt/NetApp/xFiles/xcp/ |
C:\NetApp\XCP\ConfigFile |
Custom location requires the |
Use the location you have set against the |
N/A |
The JSON configuration file options are case sensitive. These options are the same for XCP NFS and XCP SMB.
Sub options name | JSON data type | Default | Description |
---|---|---|---|
logConfig |
Option to customize XCP logging. |
||
“level” |
String |
INFO |
Log message severity filter level. |
“maxBytes” |
Integer |
52428800 |
Size of each rotating log file. Max supported rotation files are 10. |
“name” |
String |
xcp.log |
Option to set custom log file name. |
eventlog |
Option to configure event log message. |
||
“isEnabled” |
Boolean |
true |
This boolean option is used to enable event messaging. Setting it to |
“level” |
String |
INFO |
Event message severity filter level. |
syslog |
Option to configure syslog messaging. |
||
“isEnabled” |
Boolean |
false |
This boolean option is used to enable syslog client in XCP. |
“level” |
String |
INFO |
Message severity filter level. |
“serverIp” |
String |
None |
Remote syslog server IP addresses or hostname. |
“port” |
Integer |
514 |
Remote syslog receiver port. |
“sanitize” |
Boolean |
false |
A common option for XCP support; setting its value to true hides sensitive information (IP and username) in the messages going to support (logging, events, syslog, and so on). |
Create the JSON configuration file
If you want to enable event log messages, the syslog client, or customer logging, complete the following steps.
-
Open any text editor, such as notepad or vi.
-
Create a new file with the following JSON template.
{ "logConfig": { "level": "INFO", "maxBytes": 52428800, "name": "xcp.log" }, "eventlog": { "isEnabled": false, "level": "INFO" }, "syslog": { "isEnabled": false, "level": "INFO", "serverIp": "10.234.219.87", "port": 514 }, "sanitize": false }
-
For any features that you want to enable, change the
isEnabled
value totrue
. -
Name the file
xcpLogConfig.json
and save it to the default location: /opt/NetApp/xFiles/xcp/If the
XCP_CONFIG_DIR
environment variable is set, save thexcpLogConfig.json
file in the same location that is set against theXCP_CONFIG_DIR
variable.
Default configuration | Example json configuration file |
---|---|
{ "logConfig": { "level": "INFO", "maxBytes": 52428800, "name": "xcp.log" }, "sanitize": false } |
{ "logConfig": { "level": "INFO", "maxBytes": 52428800, "name": "xcp.log" }, "eventlog": { "isEnabled": false, "level": "INFO" }, "syslog": { "isEnabled": false, "level": "INFO", "serverIp": "10.234.219.87", "port": 514 }, "sanitize": false } |