Skip to main content
XCP

Set the eventlog option

Contributors netapp-aoife

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

Note 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.

Example JSON configuration file with the eventlog option enabled
{
"eventlog": {
"isEnabled": true,
"level": "INFO"
},
"sanitize": false
}
Example JSON configuration file with eventlog and other options enabled
{
"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

isEnabled

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.

level

String

INFO

Event message severity filter level. Event messaging support five severity levels in order of decreasing severity: CRITICAL, ERROR, WARNING, INFO, and DEBUG

Template for an NFS event log message

The following table shows a template and an example for an NFS event log message:

Template Example

<Time stamp> - <Severity level> {"Event ID": <ID>, "Event
Category":<category of xcp event log>, "Event Type": <type of event
log>, "ExecutionId": < unique ID for each xcp command execution >,
"Event Source": <host name>, "Description": <XCP event log message>}

2020-07-14 07:07:07,286 - ERROR {"Event ID": 51, "Event Category":
"Application failure", "Event Type": "No space left on destination
error", " ExecutionId ": 408252316712, "Event Source": "NETAPP-01",
"Description": "Target volume is left with no free space while executing
: copy {}. Please increase the size of target volume
10.101.101.101:/cat_vol"}

Eventlog message options

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.