summaryrefslogtreecommitdiff
path: root/scripts/vyatta-monitor-check-rule-log
blob: bc49491145adf73f625b3c9025d80b927cb47e69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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