Skip to content

Logging

Logging provides comprehensive event recording and monitoring capabilities that capture, categorize, and distribute system messages based on configurable severity levels from emergency to debugging. It supports multiple output destinations including console, buffer, file storage, and remote syslog servers with flexible transport options including UDP, TCP, and secure TLS connections. Logging configuration enables centralized log collection, real-time monitoring, forensic analysis, and compliance reporting by providing detailed visibility into device operations, security events, and network behavior patterns.

Diagram

Diagram

Classes

configuration (iosxe.devices)

NameTypeConstraintMandatoryDefault Value
loggingClass[logging]No

logging (iosxe.devices.configuration)

NameTypeConstraintMandatoryDefault Value
monitor_severityStringNo
buffered_sizeIntegermin: 4096, max: 2147483647No
buffered_severityStringNo
console_severityStringNo
facilityChoiceauth, cron, daemon, kern, local0, local1, local2, local3, local4, local5, local6, local7, lpr, mail, news, sys10, sys11, sys12, sys13, sys14, sys9, syslog, user, uucpNo
history_sizeIntegermin: 0, max: 65535No
history_severityStringNo
trapBooleantrue, falseNo
trap_severityStringNo
origin_id_typeChoicehostname, ip, ipv6No
origin_id_nameStringNo
file_nameStringNo
file_max_sizeIntegermin: 0, max: 4294967295No
file_min_sizeIntegermin: 0, max: 4294967295No
file_severityStringNo
source_interface_typeChoiceLoopback, Vlan, GigabitEthernet, TwoGigabitEthernet, FiveGigabitEthernet, TenGigabitEthernet, TwentyFiveGigabitEthernet, FortyGigabitEthernet, HundredGigabitEthernetNo
source_interface_idStringNo
source_interfaces_vrfList[source_interfaces_vrf]No
hostsList[hosts]No

source_interfaces_vrf (iosxe.devices.configuration.logging)

NameTypeConstraintMandatoryDefault Value
vrfStringYes
interface_typeChoiceLoopback, Vlan, GigabitEthernet, TwoGigabitEthernet, FiveGigabitEthernet, TenGigabitEthernet, TwentyFiveGigabitEthernet, FortyGigabitEthernet, HundredGigabitEthernetNo
interface_idStringNo

hosts (iosxe.devices.configuration.logging)

NameTypeConstraintMandatoryDefault Value
ipIPYes
vrfStringNo
transport_udp_portsListInteger[min: 1, max: 65535]No
transport_tcp_portsListInteger[min: 1, max: 65535]No
transport_tls_portsList[transport_tls_ports]No

transport_tls_ports (iosxe.devices.configuration.logging.hosts)

NameTypeConstraintMandatoryDefault Value
portIntegermin: 1025, max: 65535Yes
profileStringNo

Examples

iosxe:
devices:
- name: Device1
configuration:
logging:
monitor_severity: informational
buffered_size: 16000
buffered_severity: informational
console_severity: warnings
facility: local0
history_size: 100
history_severity: informational
trap: true
trap_severity: informational
origin_id_type: hostname
origin_id_name: CORE-SW-01
source_interface_type: Loopback
source_interface_id: "0"
file_name: device-logs.txt
file_max_size: 1000000
file_severity: debugging
source_interfaces_vrf:
- vrf: MGMT
interface_type: Vlan
interface_id: "100"
hosts:
- ip: 2001::1
transport_udp_ports:
- 514
- 10000
transport_tcp_ports:
- 10001
- 10003
transport_tls_ports:
- port: 6514
profile: TLS-PROFILE-1
- ip: 192.168.5.24
vrf: MGMT
transport_udp_ports:
- 514