diff options
Diffstat (limited to 'scripts/vyatta-monitor-check-rule-log')
-rw-r--r-- | scripts/vyatta-monitor-check-rule-log | 13 |
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 |