System Logs

Log to a Remote Server

The Cisco Nexus 3550-T Programmable Switch Platform supports remote logging by using the syslog protocol. To configure remote logging, use the logging command.

The first step is to configure a remote target for log messages. Both TCP and UDP modes of syslog are supported. As an example, to log all error messages by using UDP to a host at 192.168.220.13, use the following command:

admin@NX-3550-T# configure logging host 192.168.220.13 protocol udp
Enabled remote logging to 192.168.220.13 using UDP

To remove all remote logging targets use the no form of the logging command:

admin@NX-3550-T# configure no logging host 0.0.0.0 protocol udp
Disabled remote logging to 0.0.0.0 using UDP

To change the global remote logging level, configure the trap by using the following command:

admin@NX-3550-T# configure logging trap error
Set remote logging level to 3 (error)

Audit Logs

With the configuration of remote logging, the Nexus 3550-T L3 also sends an audit log of configuration changes to the remote syslog server.

Configuration change logging is done at the API layer. Commands on the CLI are internally implemented by using the API. This implementation captures all configuration changes from the command line as well as from the API.

Example configuration change message:

Oct  1 11:27:26 NX-3550-T AUDIT: { "username": "admin", "method": "set_interface_enable", "params": { "interface": "ethernet1", "enable": true }, "result": true }

Each message contains the details of an API command encoded in the JSON format with the following fields:

Field Description
username User that made the change
method Name of API command
params API parameters
result Result of API command
error Error code and message

The error field will not be present if the API command was successful. Similarly, the result field will not be present if the API command failed.

For details about the API commands, see the API documentation.

View System Logs Locally

From bash, you can view local logs via the standard Unix utility journalctl.

admin@NX-3550-T# bash
admin@NX-3550-T~$ journalctl
-- Logs begin at Tue 2020-09-01 00:25:36 UTC, end at Tue 2020-09-01 00:43:27 UTC. --
   Sep 01 00:25:36 NX-3550-T kernel: Linux version 4.19.0-10-amd64 (debian-kernel@lists.debian.org) (gcc version 8.3.0 (Debian 8.3.0-6))
...

Note

You cannot view the audit log messages by using journalctl. Only system log messages are available.

This page was last updated on Mar-23-2021.