Set the eventlog option
XCP supports event messaging, which you can enable using the eventlog
option in the xcpLogConfig.json
JSON config file.
For NFS, all event messages are written to the xcp_event.log
file located in either the default location /opt/NetApp/xFiles/xcp/
or a custom location configured using the following environment variable:
XCP_CONFIG_DIR
When both locations are set, XCP_LOG_DIR is used.
|
For SMB, all event messages are written to the file xcp_event.log
located in the default location C:\NetApp\XCP\
.
JSON configuration for event messaging for NFS and SMB
In the following examples, the JSON configuration files enable event messaging for NFS and SMB.
{ "eventlog": { "isEnabled": true, "level": "INFO" }, "sanitize": false }
{ "logConfig": { "level": "INFO", "maxBytes": 52428800, "name": "xcp.log" }, "eventlog": { "isEnabled": true, "level": "INFO" }, "syslog": { "isEnabled": true, "level": "info", "serverIp": "10.101.101.10", "port": 514 }, "sanitize": false }
The following table shows the eventlog sub options and their description:
Sub option | JSON data type | Default value | Description |
---|---|---|---|
|
Boolean |
False |
This boolean option is used to enable event messaging. If set to false, it does not generate any event messages and no event logs are published to the event log file. |
|
String |
INFO |
Event message severity filter level. Event messaging support five severity levels in order of decreasing severity: CRITICAL, ERROR, WARNING, INFO, and DEBUG |
The following table shows a template and an example for an NFS event log message:
Template | Example |
---|---|
|
|
The following options are available for an eventlog message:
-
Event ID
: The unique identifier for each event log message. -
Event Category
: Explains the category of event type and event log message. -
Event Type
: This is a short string that describes the event message. Multiple event types can belong to one category. -
Description
: The description field contains the event log message generated by XCP. -
ExecutionId
: A unique identifier for each XCP command executed.