aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-03-27 21:49:03 +0100
committerGravatar Christian Hesse <mail@eworm.de>2020-03-27 22:12:49 +0100
commit222fe8fd54c6cfa9b4a3d0cd545178659f331bfe (patch)
tree75fa46ce81b91e161a46ca85fe8cff121e740f77
parentf482c565c79e9413e45806dc4043ea4d6e1859a9 (diff)
add doc/netwatch-syslog.md
-rw-r--r--doc/netwatch-syslog.md34
-rw-r--r--netwatch-syslog1
2 files changed, 35 insertions, 0 deletions
diff --git a/doc/netwatch-syslog.md b/doc/netwatch-syslog.md
new file mode 100644
index 0000000..9a28bb9
--- /dev/null
+++ b/doc/netwatch-syslog.md
@@ -0,0 +1,34 @@
+Manage remote logging
+=====================
+
+[◀ Go back to main README](../README.md)
+
+Description
+-----------
+
+RouterOS supports sending log messages via network to a remote syslog server.
+If the server is not available no log messages (with potentially sensitive
+information) should be sent. This script disables remote logging by
+availability.
+
+Requirements and installation
+-----------------------------
+
+Let's assume there is a remote log action and associated logging rule:
+
+ / system logging action set remote=10.0.0.1 [ find where name="remote" ];
+ / system logging add action=remote topics=info;
+
+Just install the script:
+
+ $ScriptInstallUpdate netwatch-syslog;
+
+... and create a netwatch matching the IP address from logging action above:
+
+ / tool netwatch add down-script=netwatch-syslog host=10.0.0.1 up-script=netwatch-syslog;
+
+All logging rules are disabled when host is down.
+
+---
+[◀ Go back to main README](../README.md)
+[▲ Go back to top](#top)
diff --git a/netwatch-syslog b/netwatch-syslog
index b76d31d..81ef4d5 100644
--- a/netwatch-syslog
+++ b/netwatch-syslog
@@ -5,6 +5,7 @@
# requires: dont-require-permissions=yes
#
# manage remote logging facilities
+# https://git.eworm.de/cgit/routeros-scripts/about/doc/netwatch-syslog.md
:local Remote [ /system logging action get ([ find where target=remote ]->0) remote ];