summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/templates/rsyslog/rsyslog.conf.j22
-rw-r--r--interface-definitions/system_syslog.xml.in5
-rwxr-xr-xsmoketest/scripts/cli/test_system_syslog.py6
3 files changed, 10 insertions, 3 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 91fb680e0..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>
@@ -88,9 +89,9 @@
<description>Time in seconds</description>
</valueHelp>
<constraint>
- <validator name="numeric" argument="--range 1-86400"/>
+ <validator name="numeric" argument="--range 1-65535"/>
</constraint>
- <constraintErrorMessage>Port number must be in range 1 to 86400</constraintErrorMessage>
+ <constraintErrorMessage>Port number must be in range 1 to 65535</constraintErrorMessage>
</properties>
<defaultValue>1200</defaultValue>
</leafNode>
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': {