Enable the syslog client
XCP supports a syslog client to send XCP event log messages to a remote syslog receiver for NFS and SMB. It supports the UDP protocol using the default port 514.
Configure the syslog client for NFS and SMB
Enabling the syslog client requires configuring the syslog
option in the the xcpLogConfig.json
configuration file for NFS and SMB.
The following example configuration for the syslog client for NFS and SMB:
{ "syslog":{ "isEnabled":true, "level":"INFO", "serverIp":"10.101.101.d", "port":514 }, "sanitize":false }
Syslog options
The following table shows the syslog sub options and their description:
Sub option | JSON data type | Default value | Description |
---|---|---|---|
|
Boolean |
False |
This Boolean option enables the syslog client in XCP. Setting it to |
|
String |
INFO |
Event message severity filter level. Event messaging support five severity levels in order of decreasing severity: CRITICAL, ERROR, WARNING, INFO, and DEBUG |
|
String |
None |
This option lists the remote syslog server IP addresses or hostnames. |
|
Integar |
514 |
This option is the remote syslog receiver port. You can configure syslog receivers to accept syslog datagrams on a different port with this option.The default UDP port is 514. |
The sanitize option should not be specified within “syslog” configuration. This option has a global scope and is common to logging, event log, and syslog within JSON config. Setting this value to “true” will hide sensitive information in syslog messages posted to the syslog server.
|
Syslog message format
Every syslog messages sent to the remote syslog server over UDP is formatted as per the RFC 5424 format for NFS and SMB.
The following table shows the severity level as per RFC 5424 supported for syslog messages for XCP:
Severity values | Severity level |
---|---|
3 |
Error: error conditions |
4 |
Warning: warning conditions |
6 |
Informational: informational messages |
7 |
Debug: debug-level messages |
In the syslog header for NFS and SMB, version has a value of 1 and the facility value for all messages for XCP is set to 1 (user-level messages):
<PRI> = syslog facility * 8 + severity value
The following table shows a template and example of the syslog message format with a syslog header for NFS:
Template | Example |
---|---|
|
|
The following table shows a template and example of the syslog message format without a syslog header for NFS:
Template | Example |
---|---|
|
|
The following table shows a template and example of the syslog message format with a syslog header for SMB:
Template | Example |
---|---|
|
|
The following table shows a template and example of the syslog message format without a syslog header for SMB:
Template | Example |
---|---|
|
|