.. _cisco.ios.ios_logging_global_module:
****************************
cisco.ios.ios_logging_global
****************************
**Resource module to configure logging.**
Version added: 2.2.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- This module manages the logging attributes of Cisco IOS network devices
Parameters
----------
.. raw:: html
| Parameter |
Choices/Defaults |
Comments |
|
config
dictionary
|
|
A dictionary of logging options
|
|
buffered
dictionary
|
|
Set buffered logging parameters
|
|
|
discriminator
string
|
|
Establish MD-Buffer association
|
|
|
filtered
boolean
|
|
Enable filtered logging
|
|
|
severity
string
|
Choices:
- alerts
- critical
- debugging
- emergencies
- errors
- informational
- notifications
- warnings
|
Logging severity level
Idempotency is not maintained for this attribute for the value 'debugging' since this value is not shown in running-config.
|
|
|
size
integer
|
|
Logging buffer size
|
|
|
xml
boolean
|
|
Enable logging in XML to XML logging buffer
|
|
buginf
boolean
|
|
Enable buginf logging for debugging
|
|
cns_events
string
|
Choices:
- alerts
- critical
- debugging
- emergencies
- errors
- informational
- notifications
- warnings
|
Set CNS Event logging level
|
|
console
dictionary
|
|
Set console logging parameters
|
|
|
discriminator
string
|
|
Establish MD-Buffer association
|
|
|
filtered
boolean
|
|
Enable filtered logging
|
|
|
severity
string
|
Choices:
- alerts
- critical
- debugging
- emergencies
- errors
- informational
- notifications
- warnings
- guaranteed
|
Logging severity level
|
|
|
xml
boolean
|
|
Enable logging in XML to XML logging buffer
|
|
count
boolean
|
|
Count every log message and timestamp last occurrence
|
|
delimiter
dictionary
|
|
Append delimiter to syslog messages
|
|
|
tcp
boolean
|
|
Append delimiter to syslog messages over TCP
|
|
discriminator
list
/ elements=string
|
|
Create or modify a message discriminator
|
|
dmvpn
dictionary
|
|
DMVPN Configuration
|
|
|
rate_limit
integer
|
|
rate in messages/minute, default is 600 messages/minute (1-10000)
|
|
esm
dictionary
|
|
Set ESM filter restrictions
|
|
|
config
boolean
|
|
Permit/Deny configuration changes from ESM filters
|
|
exception
integer
|
|
Limit size of exception flush output (4096-2147483647)
|
|
facility
string
|
Choices:
- auth
- cron
- daemon
- kern
- local0
- local1
- local2
- local3
- local4
- local5
- local6
- local7
- lpr
- mail
- news
- sys10
- sys11
- sys12
- sys13
- sys14
- sys9
- syslog
- user
- uucp
|
Facility parameter for syslog messages
|
|
filter
list
/ elements=dictionary
|
|
Specify logging filter
|
|
|
args
string
|
|
Arguments passed to filter module.
|
|
|
order
integer
|
|
Order of filter execution
|
|
|
url
string
|
|
Filter Uniform Resource Locator
|
|
history
dictionary
|
|
Configure syslog history table
|
|
|
severity
string
|
Choices:
- alerts
- critical
- debugging
- emergencies
- errors
- informational
- notifications
- warnings
|
Logging severity level
Idempotency is not maintained for this attribute for the value 'debugging' since this value is not shown in running-config.
|
|
|
size
integer
|
|
Logging buffer size
|
|
hosts
list
/ elements=dictionary
|
|
Set syslog server IP address and parameters
|
|
|
discriminator
string
|
|
Establish MD-Buffer association
|
|
|
filtered
boolean
|
|
Enable filtered logging
|
|
|
host
string
|
|
IP address of the syslog server
aliases: hostname
|
|
|
ipv6
string
|
|
Configure IPv6 syslog server
|
|
|
sequence_num_session
boolean
|
|
Include session sequence number tag in syslog message
|
|
|
session_id
dictionary
|
|
Specify syslog message session ID tagging
|
|
|
|
tag
string
|
Choices:
- hostname
- ipv4
- ipv6
|
Include hostname in session ID tag
|
|
|
|
text
string
|
|
Include custom string in session ID tag
|
|
|
stream
integer
|
|
This server should only receive messages from a numbered stream
|
|
|
transport
dictionary
|
|
Specify the transport protocol (default=UDP)
|
|
|
|
tcp
dictionary
|
|
Transport Control Protocol
|
|
|
|
|
audit
boolean
|
|
Set this host for IOS firewall audit logging
|
|
|
|
|
discriminator
string
|
|
Establish MD-Buffer association
|
|
|
|
|
filtered
boolean
|
|
Enable filtered logging
|
|
|
|
|
port
integer
|
|
Specify the TCP port number (default=601) (1 - 65535)
|
|
|
|
|
sequence_num_session
boolean
|
|
Include session sequence number tag in syslog message
|
|
|
|
|
session_id
dictionary
|
|
Specify syslog message session ID tagging
|
|
|
|
|
|
tag
string
|
Choices:
- hostname
- ipv4
- ipv6
|
Include hostname in session ID tag
|
|
|
|
|
|
text
string
|
|
Include custom string in session ID tag
|
|
|
|
|
stream
integer
|
|
This server should only receive messages from a numbered stream
|
|
|
|
|
xml
boolean
|
|
Enable logging in XML to XML logging buffer
|
|
|
|
udp
dictionary
|
|
User Datagram Protocol
|
|
|
|
|
discriminator
string
|
|
Establish MD-Buffer association
|
|
|
|
|
filtered
boolean
|
|
Enable filtered logging
|
|
|
|
|
port
integer
|
|
Specify the UDP port number (default=514) (1 - 65535)
|
|
|
|
|
sequence_num_session
boolean
|
|
Include session sequence number tag in syslog message
|
|
|
|
|
session_id
dictionary
|
|
Specify syslog message session ID tagging
|
|
|
|
|
|
tag
string
|
Choices:
- hostname
- ipv4
- ipv6
|
Include hostname in session ID tag
|
|
|
|
|
|
text
string
|
|
Include custom string in session ID tag
|
|
|
|
|
stream
integer
|
|
This server should only receive messages from a numbered stream
|
|
|
|
|
xml
boolean
|
|
Enable logging in XML to XML logging buffer
|
|
|
vrf
string
|
|
Set VRF option
|
|
|
xml
boolean
|
|
Enable logging in XML to XML logging buffer
|
|
logging_on
string
|
|
Enable logging to all enabled destinations
|
|
message_counter
list
/ elements=string
|
Choices:
- log
- debug
- syslog
|
Configure log message to include certain counter value
|
|
monitor
dictionary
|
|
Set terminal line (monitor) logging parameters
|
|
|
discriminator
string
|
|
Establish MD-Buffer association
|
|
|
filtered
boolean
|
|
Enable filtered logging
|
|
|
severity
string
|
Choices:
- alerts
- critical
- debugging
- emergencies
- errors
- informational
- notifications
- warnings
|
Logging severity level
Idempotency is not maintained for this attribute for the value 'debugging' since this value is not shown in running-config.
|
|
|
xml
boolean
|
|
Enable logging in XML to XML logging buffer
|
|
origin_id
dictionary
|
|
Add origin ID to syslog messages
|
|
|
tag
string
|
Choices:
- hostname
- ip
- ipv6
|
Include hostname in session ID tag
|
|
|
text
string
|
|
Include custom string in session ID tag
|
|
persistent
dictionary
|
|
Set persistent logging parameters
|
|
|
batch
integer
|
|
Set batch size for writing to persistent storage (4096-2142715904)
|
|
|
filesize
integer
|
|
Set size of individual log files (4096-2142715904)
|
|
|
immediate
boolean
|
|
Write log entry to storage immediately (no buffering).
|
|
|
notify
boolean
|
|
Notify when show logging [persistent] is activated.
|
|
|
protected
boolean
|
|
Eliminates manipulation on logging-persistent files.
|
|
|
size
integer
|
|
Set disk space for writing log messages (4096-2142715904)
|
|
|
threshold
integer
|
|
Set threshold for logging persistent
|
|
|
url
string
|
|
URL to store logging messages
|
|
policy_firewall
dictionary
|
|
Firewall configuration
|
|
|
rate_limit
integer
|
|
(0-3600) value in seconds, default is 30 Sec.
|
|
queue_limit
dictionary
|
|
Set logger message queue size
|
|
|
esm
integer
|
|
(100-2147483647) set new queue size
|
|
|
size
integer
|
|
(100-2147483647) set new queue size
|
|
|
trap
integer
|
|
(100-2147483647) set new queue size
|
|
rate_limit
dictionary
|
|
Set messages per second limit
|
|
|
all
boolean
|
|
(1-10000) message per second
|
|
|
console
boolean
|
|
(1-10000) message per second
|
|
|
except_severity
string
|
Choices:
- alerts
- critical
- debugging
- emergencies
- errors
- informational
- notifications
- warnings
|
Messages of this severity or higher
|
|
|
size
integer
/ required
|
|
(1-10000) message per second
|
|
reload
dictionary
|
|
Set reload logging level
|
|
|
message_limit
integer
|
|
Number of messages (1-4294967295)
|
|
|
severity
string
|
Choices:
- alerts
- critical
- debugging
- emergencies
- errors
- informational
- notifications
- warnings
|
Logging severity level
Idempotency is not maintained for this attribute for the value 'debugging' since this value is not shown in running-config.
|
|
server_arp
boolean
|
|
Enable sending ARP requests for syslog servers when first configured
|
|
snmp_trap
list
/ elements=string
|
Choices:
- alerts
- critical
- debugging
- emergencies
- errors
- informational
- notifications
- warnings
|
Set syslog level for sending snmp trap
|
|
source_interface
list
/ elements=dictionary
|
|
Specify interface for source address in logging transactions
|
|
|
interface
string
|
|
Interface name with number
|
|
|
vrf
string
|
|
VPN Routing/Forwarding instance name
|
|
trap
string
|
Choices:
- alerts
- critical
- debugging
- emergencies
- errors
- informational
- notifications
- warnings
|
Set syslog server logging level
|
|
userinfo
boolean
|
|
Enable logging of user info on privileged mode enabling
|
|
running_config
string
|
|
This option is used only with state parsed.
The value of this option should be the output received from the IOS device by executing the command show running-config | include logging.
The state parsed reads the configuration from running_config option and transforms it into Ansible structured data as per the resource module's argspec and the value is then returned in the parsed key within the result.
|
|
state
string
|
Choices:
merged ←
- replaced
- overridden
- deleted
- gathered
- parsed
- rendered
|
The state the configuration should be left in
With state replaced, for the listed logging configurations, that are in running-config and can have multiple set of commands but not in the task are negated.
With state overridden, all configurations that are in running-config but not in the task are negated.
Please refer to examples for more details.
|