summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2013-12-21 08:35:36 +0100
committerDaniil Baturin <daniil@baturin.org>2013-12-21 08:35:36 +0100
commit3c40c48584eda801686a829defd73736bff34ca8 (patch)
treead9fea4a3df42e0f0452ccfd448f8248044be514 /scripts
parent3444459922f0e2b2ebb6de859f7e72ca178e9902 (diff)
downloadvyatta-op-3c40c48584eda801686a829defd73736bff34ca8.tar.gz
vyatta-op-3c40c48584eda801686a829defd73736bff34ca8.zip
Bug #95: Issue warnings on attempts to monitor rules with disabled logging.
Additionally notify when monitoring firewall/NAT instances that only rules with logging enabled are monitored.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/vyatta-monitor-check-rule-log13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/vyatta-monitor-check-rule-log b/scripts/vyatta-monitor-check-rule-log
new file mode 100644
index 0000000..bc49491
--- /dev/null
+++ b/scripts/vyatta-monitor-check-rule-log
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+API=/bin/cli-shell-api
+RULE_PATH=$1
+RULE_NUM=$2
+
+LOG=`cli-shell-api returnEffectiveValue $RULE_PATH rule $RULE_NUM log`
+
+if [ "$LOG" != "enable" ]; then
+ echo "Warning: logging is not enabled for rule $RULE_NUM"
+ echo "For proper monitor operation enable logging before issuing this command:"
+ echo "set $RULE_PATH rule $RULE_NUM log enable"
+fi