From edc46b564787ce60a642f1ee5794dcf22b453e2c Mon Sep 17 00:00:00 2001 From: John Southworth Date: Wed, 7 Sep 2011 17:38:24 -0500 Subject: Add firewall forground monitoring (cherry picked from commit c719d7bdefd748955d06fa29072f2f65a86e05e4) --- templates/monitor/firewall/name/node.def | 3 +++ templates/monitor/firewall/name/node.tag/node.def | 4 ++++ templates/monitor/firewall/name/node.tag/rule/node.def | 1 + templates/monitor/firewall/name/node.tag/rule/node.tag/node.def | 4 ++++ 4 files changed, 12 insertions(+) create mode 100644 templates/monitor/firewall/name/node.def create mode 100644 templates/monitor/firewall/name/node.tag/node.def create mode 100644 templates/monitor/firewall/name/node.tag/rule/node.def create mode 100644 templates/monitor/firewall/name/node.tag/rule/node.tag/node.def (limited to 'templates') diff --git a/templates/monitor/firewall/name/node.def b/templates/monitor/firewall/name/node.def new file mode 100644 index 0000000..4390e73 --- /dev/null +++ b/templates/monitor/firewall/name/node.def @@ -0,0 +1,3 @@ +help: Monitor the specifed firewall +allowed: local -a ARR=$(cli-shell-api -- listEffectiveNodes firewall name) + echo "${ARR[@]}" diff --git a/templates/monitor/firewall/name/node.tag/node.def b/templates/monitor/firewall/name/node.tag/node.def new file mode 100644 index 0000000..3bb9d7f --- /dev/null +++ b/templates/monitor/firewall/name/node.tag/node.def @@ -0,0 +1,4 @@ +help: Monitor a specified firewall +allowed: local -a ARR=$(cli-shell-api -- listEffectiveNodes firewall name) + echo "${ARR[@]}" +run: ${vyatta_bindir}/vyatta-monitor Firewall-$4 "\[$4-[0-9]*-[A,D,R]\]" diff --git a/templates/monitor/firewall/name/node.tag/rule/node.def b/templates/monitor/firewall/name/node.tag/rule/node.def new file mode 100644 index 0000000..d046d5b --- /dev/null +++ b/templates/monitor/firewall/name/node.tag/rule/node.def @@ -0,0 +1 @@ +help: Monitor a rule in the specified firewall 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 new file mode 100644 index 0000000..ccd865d --- /dev/null +++ b/templates/monitor/firewall/name/node.tag/rule/node.tag/node.def @@ -0,0 +1,4 @@ +help: Monitor a rule in the specified firewall +allowed: local -a 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]\]" -- cgit v1.2.3