summaryrefslogtreecommitdiff
path: root/templates/system/syslog/global
diff options
context:
space:
mode:
Diffstat (limited to 'templates/system/syslog/global')
-rw-r--r--templates/system/syslog/global/archive/files/node.def3
-rw-r--r--templates/system/syslog/global/archive/node.def8
-rw-r--r--templates/system/syslog/global/archive/size/node.def3
-rw-r--r--templates/system/syslog/global/facility/node.def11
-rw-r--r--templates/system/syslog/global/facility/node.tag/level/node.def3
-rw-r--r--templates/system/syslog/global/node.def1
6 files changed, 29 insertions, 0 deletions
diff --git a/templates/system/syslog/global/archive/files/node.def b/templates/system/syslog/global/archive/files/node.def
new file mode 100644
index 00000000..ca2bf175
--- /dev/null
+++ b/templates/system/syslog/global/archive/files/node.def
@@ -0,0 +1,3 @@
+type: u32
+help: "Number of saved files"
+default: 5
diff --git a/templates/system/syslog/global/archive/node.def b/templates/system/syslog/global/archive/node.def
new file mode 100644
index 00000000..dcfc2446
--- /dev/null
+++ b/templates/system/syslog/global/archive/node.def
@@ -0,0 +1,8 @@
+help: "Configure log file size and rotation characteristics"
+# need mandatory files & size
+create: "sh -c \"/opt/vyatta/sbin/vyatta_update_logrotate.pl \
+'$(files/@)' '$(size/@)' 1\" "
+update: "sh -c \"/opt/vyatta/sbin/vyatta_update_logrotate.pl \
+'$(files/@)' '$(size/@)' 1\" "
+delete: "sh -c \"/opt/vyatta/sbin/vyatta_update_logrotate.pl \
+'$(files/@)' '$(size/@)' 0\" "
diff --git a/templates/system/syslog/global/archive/size/node.def b/templates/system/syslog/global/archive/size/node.def
new file mode 100644
index 00000000..3c8da6e8
--- /dev/null
+++ b/templates/system/syslog/global/archive/size/node.def
@@ -0,0 +1,3 @@
+type: u32
+help: "Size of log files (kbytes)"
+default: 250
diff --git a/templates/system/syslog/global/facility/node.def b/templates/system/syslog/global/facility/node.def
new file mode 100644
index 00000000..cd037f6a
--- /dev/null
+++ b/templates/system/syslog/global/facility/node.def
@@ -0,0 +1,11 @@
+tag:
+type: txt
+help: "Configure facility for system logging"
+create: "sh -c \"LVL=`echo -n $(level/@) | tr '[a-z]' '[A-Z]'` && \
+/opt/vyatta/sbin/vyatta_update_syslog.pl '' '\\/var\\/log\\/messages' \
+\\\"$(@).\\\\\$LVL\t/var/log/messages \n\\\"\" "
+update: "sh -c \"LVL=`echo -n $(level/@) | tr '[a-z]' '[A-Z]'` && \
+/opt/vyatta/sbin/vyatta_update_syslog.pl '' '\\/var\\/log\\/messages' \
+\\\"$(@).\\\\\$LVL\t/var/log/messages \n\\\"\" "
+delete: "sh -c \"/opt/vyatta/sbin/vyatta_update_syslog.pl \
+'' '\\/var\\/log\\/messages' '*.warning\t/var/log/messages \n'\" "
diff --git a/templates/system/syslog/global/facility/node.tag/level/node.def b/templates/system/syslog/global/facility/node.tag/level/node.def
new file mode 100644
index 00000000..9be459c6
--- /dev/null
+++ b/templates/system/syslog/global/facility/node.tag/level/node.def
@@ -0,0 +1,3 @@
+type: txt
+help: "Configure the logging level"
+default: "err"
diff --git a/templates/system/syslog/global/node.def b/templates/system/syslog/global/node.def
new file mode 100644
index 00000000..b5166459
--- /dev/null
+++ b/templates/system/syslog/global/node.def
@@ -0,0 +1 @@
+help: "Configure system logging"