diff options
-rw-r--r-- | data/templates/rsyslog/rsyslog.conf.j2 | 2 | ||||
-rw-r--r-- | interface-definitions/system_syslog.xml.in | 1 | ||||
-rwxr-xr-x | smoketest/scripts/cli/test_system_syslog.py | 6 |
3 files changed, 8 insertions, 1 deletions
diff --git a/data/templates/rsyslog/rsyslog.conf.j2 b/data/templates/rsyslog/rsyslog.conf.j2 index c6eb6430c..e2ff334ff 100644 --- a/data/templates/rsyslog/rsyslog.conf.j2 +++ b/data/templates/rsyslog/rsyslog.conf.j2 @@ -40,7 +40,7 @@ global(workDirectory="/var/spool/rsyslog") # Send emergency messages to all logged-in users *.emerg action(type="omusrmsg" users="*") -{% if marker is vyos_defined %} +{% if marker is vyos_defined and marker.disable is not vyos_defined %} # Load the immark module for periodic --MARK-- message capability module(load="immark" interval="{{ marker.interval }}") {% endif %} diff --git a/interface-definitions/system_syslog.xml.in b/interface-definitions/system_syslog.xml.in index 32dcf65ff..8b2d9cab7 100644 --- a/interface-definitions/system_syslog.xml.in +++ b/interface-definitions/system_syslog.xml.in @@ -80,6 +80,7 @@ <help>Mark messages sent to syslog</help> </properties> <children> + #include <include/generic-disable-node.xml.i> <leafNode name="interval"> <properties> <help>Mark message interval</help> diff --git a/smoketest/scripts/cli/test_system_syslog.py b/smoketest/scripts/cli/test_system_syslog.py index c3b14e1c0..e642b5660 100755 --- a/smoketest/scripts/cli/test_system_syslog.py +++ b/smoketest/scripts/cli/test_system_syslog.py @@ -120,6 +120,12 @@ class TestRSYSLOGService(VyOSUnitTestSHIM.TestCase): self.assertIn( ' rotation.sizeLimit="524288"', config) self.assertIn( ' rotation.sizeLimitCommand="/usr/sbin/logrotate /etc/logrotate.d/vyos-rsyslog"', config) + self.cli_set(base_path + ['marker', 'disable']) + self.cli_commit() + + config = get_config('') + self.assertNotIn('module(load="immark"', config) + def test_remote(self): rhosts = { '169.254.0.1': { |