system logging host

Enters into a sub-configuration mode for logging host parameter configuration.

Syntax

system logging host hostname address ip-address port port-number transport { udp | tcp } secure-forwarding { tls | none }
no system logging host hostname

Command Default

Default transport protocol: UDP

Default secure-forwarding encryption (host): none

Parameters

hostname
Specifies the name or label of the host. Valid length is 1 though 64 characters.
ip-address
Specifies the IP address for the host. Valid format is IPv4 dotted-decimal notation.
port-number
Specifies the number of the port number of the remote syslog server. Valid port-number range is 514 through 530.
udp
Sends syslogs to remote server using UDP protocol. This is the default protocol.
tcp
Sends syslogs to remote server using TCP protocol.
tls
Sends Syslogs to remote server using TLS encryption. Syslog CA certificates must be installed before configuring TLS encryption.
none
Sends Syslogs in plain text. This is the default configuration for the host.

Modes

Exec mode

Usage Guidelines

You can configure a maximum of 10 logging hosts.

If the no version of the command is without the hostname option, all hosts are removed.

Syslog CA certificates must be installed before configuring TLS encryption.

Syslog CA certificates can be imported using the crypto import command.

Table 1. Error messages
Message Reason
Host name is too long! Max limit is 64 characters Hostname cannot be longer than 64 characters. Example: device(config)# system logging host 12g3e2783etg82713eg823ge8723ge2b23bge32gbdg23ed3hi1nxriu2n13ir32rbxjewbfjbfjbfxbqefxbqwkefnwefw
% Command incomplete. Hostname must be specified. Example: device(config)# system logging host
Error(-5): Syslog CA certificate not found! Please use crypto command to import CA certificate You must import the before attempting to configure TLS encryption.

Examples

The following example configures the host H1 as the system logging host and uses the show command to confirm the configuration.

device# configure terminal
device(config)# system logging host sysLogHost1 
device(config-logging-host-sysLogHost1)# address 10.25.125.5
device(config-logging-host-sysLogHost1)# port 6154
device(config-logging-host-sysLogHost1)# transport TCP
device(config-logging-host-sysLogHost1)# secure-forwarding TLS

device# do show running-config system logging host
system logging host sysLogHost1
  address 10.25.125.5
  port 6514
  transport TCP
  secure-forwarding TLS

The following example configures transport TCP.

device(config-logging-host-H1)# transport TCP 
Warning: Existing Host configuration changed

device(config-logging-host-h1)# transport xyz 
Error(-1): Invalid parameter 

device(config-logging-host-h1)# transport TCPU 
Error(-1): Invalid parameter

The following example removes all system logging hosts.

device# configure terminal 
device(config)# no system logging host