diff options
author | Daniil Baturin <daniil@vyos.io> | 2024-09-30 16:22:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-30 16:22:32 +0100 |
commit | b191ea3bc68e37289c42a4bd5c2ef323514bf5ae (patch) | |
tree | d141854c6d004cf86caf85c5a740f8d026281b22 /src | |
parent | e961fcbca3dffd9de36b342aad57341999e44a11 (diff) | |
parent | 9a7d920ab7a9542fc3f3a4cddf50e6413a3c0198 (diff) | |
download | vyos-1x-b191ea3bc68e37289c42a4bd5c2ef323514bf5ae.tar.gz vyos-1x-b191ea3bc68e37289c42a4bd5c2ef323514bf5ae.zip |
Merge pull request #4115 from vyos/mergify/bp/circinus/pr-4061
syslog: T5367: add format option to include timezone in message (backport #4061)
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/system_syslog.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/conf_mode/system_syslog.py b/src/conf_mode/system_syslog.py index 476f403bd..eb2f02eb3 100755 --- a/src/conf_mode/system_syslog.py +++ b/src/conf_mode/system_syslog.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2018-2023 VyOS maintainers and contributors +# Copyright (C) 2018-2024 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as @@ -18,6 +18,7 @@ import os from sys import exit +from vyos.base import Warning from vyos.config import Config from vyos.configdict import is_node_changed from vyos.configverify import verify_vrf @@ -69,6 +70,12 @@ def verify(syslog): if not syslog: return None + if 'host' in syslog: + for host, host_options in syslog['host'].items(): + if 'protocol' in host_options and host_options['protocol'] == 'udp': + if 'format' in host_options and 'octet_counted' in host_options['format']: + Warning(f'Syslog UDP transport for "{host}" should not use octet-counted format!') + verify_vrf(syslog) def generate(syslog): |