.. _vyos.rest.vyos_logging_global_module:
*****************************
vyos.rest.vyos_logging_global
*****************************
**Manage syslog configuration on VyOS devices using REST API**
Version added: 1.0.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- Manages syslog (logging) configuration on VyOS devices via the REST API.
- Supports console, file, host, user, and global logging targets with per-target facility and severity configuration.
- Uses REST API (``connection=httpapi``) instead of CLI.
Parameters
----------
.. raw:: html
| Parameter |
Choices/Defaults |
Comments |
|
config
dictionary
|
|
Logging configuration.
|
|
console
dictionary
|
|
Logging to serial console.
|
|
|
facilities
list
/ elements=dictionary
|
|
List of syslog facilities to log to the console.
|
|
|
|
facility
string
|
|
Syslog facility name (e.g. local7, all, kern).
|
|
|
|
severity
string
|
|
Minimum severity level to log (e.g. err, debug, all).
|
|
files
list
/ elements=dictionary
|
|
Logging to local files.
|
|
|
archive
dictionary
|
|
Log file archive/rotation settings.
|
|
|
|
file_num
integer
|
|
Number of archived log files to keep.
|
|
|
|
size
integer
|
|
Maximum size of log file in kilobytes before rotation.
|
|
|
facilities
list
/ elements=dictionary
|
|
List of syslog facilities to log to this file.
|
|
|
|
facility
string
|
|
Syslog facility name.
|
|
|
|
severity
string
|
|
Minimum severity level to log.
|
|
|
path
string
|
|
Path to the log file on the device.
|
|
global_params
dictionary
|
|
Global syslog parameters (maps to system syslog global).
|
|
|
archive
dictionary
|
|
Global log archive/rotation settings.
|
|
|
|
file_num
integer
|
|
Number of archived log files to keep.
|
|
|
|
size
integer
|
|
Maximum size of log file in kilobytes before rotation.
|
|
|
facilities
list
/ elements=dictionary
|
|
List of syslog facilities for global logging.
|
|
|
|
facility
string
|
|
Syslog facility name.
|
|
|
|
severity
string
|
|
Minimum severity level to log.
|
|
|
marker_interval
integer
|
|
Interval in seconds between marker log entries.
|
|
|
preserve_fqdn
boolean
|
|
Use the fully qualified domain name in syslog messages.
|
|
hosts
list
/ elements=dictionary
|
|
Logging to remote syslog hosts.
|
|
|
facilities
list
/ elements=dictionary
|
|
List of syslog facilities to forward to this host.
|
|
|
|
facility
string
|
|
Syslog facility name.
|
|
|
|
protocol
string
|
|
Per-facility protocol override (udp or tcp).
|
|
|
|
severity
string
|
|
Minimum severity level to forward.
|
|
|
hostname
string
|
|
IP address or hostname of the remote syslog server.
|
|
|
port
integer
|
|
UDP/TCP port on the remote syslog server (default 514).
|
|
|
protocol
string
|
|
Transport protocol (udp or tcp).
|
|
users
list
/ elements=dictionary
|
|
Logging to local user terminals.
|
|
|
facilities
list
/ elements=dictionary
|
|
List of syslog facilities to send to this user.
|
|
|
|
facility
string
|
|
Syslog facility name.
|
|
|
|
severity
string
|
|
Minimum severity level to send.
|
|
|
username
string
|
|
Local username whose terminal receives log messages.
|
|
running_config
string
|
|
Used only with state parsed.
|
|
state
string
|
Choices:
merged ←
- replaced
- overridden
- deleted
- gathered
- rendered
- parsed
|
Desired state of the logging configuration.
|