diff options
author | Daniil Baturin <daniil@baturin.org> | 2013-12-21 08:35:36 +0100 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2013-12-21 08:35:36 +0100 |
commit | 3c40c48584eda801686a829defd73736bff34ca8 (patch) | |
tree | ad9fea4a3df42e0f0452ccfd448f8248044be514 /templates/monitor/firewall | |
parent | 3444459922f0e2b2ebb6de859f7e72ca178e9902 (diff) | |
download | vyatta-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 'templates/monitor/firewall')
8 files changed, 16 insertions, 8 deletions
diff --git a/templates/monitor/firewall/ipv6-name/node.tag/background/start/node.def b/templates/monitor/firewall/ipv6-name/node.tag/background/start/node.def index 6f80a81..0008aee 100644 --- a/templates/monitor/firewall/ipv6-name/node.tag/background/start/node.def +++ b/templates/monitor/firewall/ipv6-name/node.tag/background/start/node.def @@ -1,2 +1,3 @@ help: Start background monitoring of a specified firewall -run: ${vyatta_bindir}/vyatta-monitor-background Firewall-ipv6-$4 "\[$4-[0-9]*-[A,D,R]\]" +run: echo "Notice: monitoring information is displayed only for rules with enabled logging"; \ + ${vyatta_bindir}/vyatta-monitor-background Firewall-ipv6-$4 "\[$4-[0-9]*-[A,D,R]\]" diff --git a/templates/monitor/firewall/ipv6-name/node.tag/node.def b/templates/monitor/firewall/ipv6-name/node.tag/node.def index dfd71e8..9c6bd57 100644 --- a/templates/monitor/firewall/ipv6-name/node.tag/node.def +++ b/templates/monitor/firewall/ipv6-name/node.tag/node.def @@ -2,4 +2,5 @@ help: Monitor a specified firewall allowed: local -a ARR eval "ARR=($(cli-shell-api -- listEffectiveNodes firewall ipv6-name))" echo ${ARR[@]} -run: ${vyatta_bindir}/vyatta-monitor Firewall-ipv6-$4 "\[$4-[0-9]*-[A,D,R]\]" +run: echo "Notice: monitoring information is displayed only for rules with enabled logging"; \ + ${vyatta_bindir}/vyatta-monitor Firewall-ipv6-$4 "\[$4-[0-9]*-[A,D,R]\]" diff --git a/templates/monitor/firewall/ipv6-name/node.tag/rule/node.tag/background/start/node.def b/templates/monitor/firewall/ipv6-name/node.tag/rule/node.tag/background/start/node.def index 398f70b..cfbdcd8 100644 --- a/templates/monitor/firewall/ipv6-name/node.tag/rule/node.tag/background/start/node.def +++ b/templates/monitor/firewall/ipv6-name/node.tag/rule/node.tag/background/start/node.def @@ -1,2 +1,3 @@ help: Start background monitoring of the specified firewall -run: ${vyatta_bindir}/vyatta-monitor-background Firewall-ipv6-$4-rule-$6 "\[$4-$6-[A,D,R]\]" +run: ${vyatta_bindir}/vyatta-monitor-check-rule-log "firewall ipv6-name $4" $6; \ + ${vyatta_bindir}/vyatta-monitor-background Firewall-ipv6-$4-rule-$6 "\[$4-$6-[A,D,R]\]" diff --git a/templates/monitor/firewall/ipv6-name/node.tag/rule/node.tag/node.def b/templates/monitor/firewall/ipv6-name/node.tag/rule/node.tag/node.def index 0c1ecb6..aff5063 100644 --- a/templates/monitor/firewall/ipv6-name/node.tag/rule/node.tag/node.def +++ b/templates/monitor/firewall/ipv6-name/node.tag/rule/node.tag/node.def @@ -2,4 +2,5 @@ help: Monitor a rule in the specified firewall allowed: local -a ARR eval "ARR=($(cli-shell-api -- listEffectiveNodes firewall ipv6-name ${COMP_WORDS[3]} rule))" echo ${ARR[@]} -run: ${vyatta_bindir}/vyatta-monitor Firewall-ipv6-$4-rule-$6 "\[$4-$6-[A,D,R]\]" +run: ${vyatta_bindir}/vyatta-monitor-check-rule-log "firewall ipv6-name $4" $6; \ + ${vyatta_bindir}/vyatta-monitor Firewall-ipv6-$4-rule-$6 "\[$4-$6-[A,D,R]\]" diff --git a/templates/monitor/firewall/name/node.tag/background/start/node.def b/templates/monitor/firewall/name/node.tag/background/start/node.def index 8563b98..35beb23 100644 --- a/templates/monitor/firewall/name/node.tag/background/start/node.def +++ b/templates/monitor/firewall/name/node.tag/background/start/node.def @@ -1,2 +1,3 @@ help: Start background monitoring of a specified firewall -run: ${vyatta_bindir}/vyatta-monitor-background Firewall-$4 "\[$4-[0-9]*-[A,D,R]\]" +run: echo "Notice: monitoring information is displayed only for rules with enabled logging"; \ + ${vyatta_bindir}/vyatta-monitor-background Firewall-$4 "\[$4-[0-9]*-[A,D,R]\]" diff --git a/templates/monitor/firewall/name/node.tag/node.def b/templates/monitor/firewall/name/node.tag/node.def index 4b31405..16b9244 100644 --- a/templates/monitor/firewall/name/node.tag/node.def +++ b/templates/monitor/firewall/name/node.tag/node.def @@ -2,4 +2,5 @@ help: Monitor a specified firewall allowed: local -a ARR eval "ARR=($(cli-shell-api -- listEffectiveNodes firewall name))" echo ${ARR[@]} -run: ${vyatta_bindir}/vyatta-monitor Firewall-$4 "\[$4-[0-9]*-[A,D,R]\]" +run: echo "Notice: monitoring information is displayed only for rules with enabled logging"; \ + ${vyatta_bindir}/vyatta-monitor Firewall-$4 "\[$4-[0-9]*-[A,D,R]\]" diff --git a/templates/monitor/firewall/name/node.tag/rule/node.tag/background/start/node.def b/templates/monitor/firewall/name/node.tag/rule/node.tag/background/start/node.def index 310114a..3210a14 100644 --- a/templates/monitor/firewall/name/node.tag/rule/node.tag/background/start/node.def +++ b/templates/monitor/firewall/name/node.tag/rule/node.tag/background/start/node.def @@ -1,2 +1,3 @@ help: Start background monitoring of the specified firewall -run: ${vyatta_bindir}/vyatta-monitor-background Firewall-$4-rule-$6 "\[$4-$6-[A,D,R]\]" +run: ${vyatta_bindir}/vyatta-monitor-check-rule-log "firewall name $4" $6; \ + ${vyatta_bindir}/vyatta-monitor-background Firewall-$4-rule-$6 "\[$4-$6-[A,D,R]\]" diff --git a/templates/monitor/firewall/name/node.tag/rule/node.tag/node.def b/templates/monitor/firewall/name/node.tag/rule/node.tag/node.def index 7f15ed0..554bf70 100644 --- a/templates/monitor/firewall/name/node.tag/rule/node.tag/node.def +++ b/templates/monitor/firewall/name/node.tag/rule/node.tag/node.def @@ -2,4 +2,5 @@ help: Monitor a rule in the specified firewall allowed: local -a ARR eval "ARR=($(cli-shell-api -- listEffectiveNodes firewall name ${COMP_WORDS[3]} rule))" echo ${ARR[@]} -run: ${vyatta_bindir}/vyatta-monitor Firewall-$4-rule-$6 "\[$4-$6-[A,D,R]\]" +run: ${vyatta_bindir}/vyatta-monitor-check-rule-log "firewall name $4" $6; \ + ${vyatta_bindir}/vyatta-monitor Firewall-$4-rule-$6 "\[$4-$6-[A,D,R]\]" |