summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-10-10 17:46:51 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-10-27 17:11:30 -0500
commit099eebc479b832634bd8311de0676a9ca9233b99 (patch)
treec2047569729c08ecf60e848358119acba8eb70d2
parentde9a15fe4f2367e2c9bbd135a8b5afe24b5af685 (diff)
downloadvyatta-op-099eebc479b832634bd8311de0676a9ca9233b99.tar.gz
vyatta-op-099eebc479b832634bd8311de0676a9ca9233b99.zip
Allow log filtering similar to the way the monitor commands work
(cherry picked from commit 41dc415a0531e758bf4bb98399c963732a22a859)
-rw-r--r--templates/show/log/cluster/node.def2
-rw-r--r--templates/show/log/conntrack-sync/node.def3
-rw-r--r--templates/show/log/content-inspection/node.def2
-rw-r--r--templates/show/log/dhcp/node.def2
-rw-r--r--templates/show/log/dns/dynamic/node.def2
-rw-r--r--templates/show/log/dns/forwarding/node.def2
-rw-r--r--templates/show/log/dns/node.def1
-rw-r--r--templates/show/log/firewall/ipv6-name/node.def1
-rw-r--r--templates/show/log/firewall/ipv6-name/node.tag/node.def5
-rw-r--r--templates/show/log/firewall/ipv6-name/node.tag/rule/node.def1
-rw-r--r--templates/show/log/firewall/ipv6-name/node.tag/rule/node.tag/node.def4
-rw-r--r--templates/show/log/firewall/name/node.def1
-rw-r--r--templates/show/log/firewall/name/node.tag/node.def5
-rw-r--r--templates/show/log/firewall/name/node.tag/rule/node.def1
-rw-r--r--templates/show/log/firewall/name/node.tag/rule/node.tag/node.def5
-rw-r--r--templates/show/log/firewall/node.def1
-rw-r--r--templates/show/log/https/node.def2
-rw-r--r--templates/show/log/lldp/node.def2
-rw-r--r--templates/show/log/nat/node.def2
-rw-r--r--templates/show/log/openvpn/node.def2
-rw-r--r--templates/show/log/snmp/node.def2
-rw-r--r--templates/show/log/vpn/all/node.def2
-rw-r--r--templates/show/log/vpn/ipsec/node.def2
-rw-r--r--templates/show/log/vpn/l2tp/node.def2
-rw-r--r--templates/show/log/vpn/node.def1
-rw-r--r--templates/show/log/vpn/pptp/node.def3
-rw-r--r--templates/show/log/vrrp/node.def2
-rw-r--r--templates/show/log/webproxy/node.def2
28 files changed, 62 insertions, 0 deletions
diff --git a/templates/show/log/cluster/node.def b/templates/show/log/cluster/node.def
new file mode 100644
index 0000000..c91fbe6
--- /dev/null
+++ b/templates/show/log/cluster/node.def
@@ -0,0 +1,2 @@
+help: Show log for Cluster
+run: cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e heartbeat -e cl_status -e mach_down -e ha_log
diff --git a/templates/show/log/conntrack-sync/node.def b/templates/show/log/conntrack-sync/node.def
new file mode 100644
index 0000000..572d938
--- /dev/null
+++ b/templates/show/log/conntrack-sync/node.def
@@ -0,0 +1,3 @@
+help: Show log for Conntrack-sync
+run:
+ cat $(printf "%s\n" /var/log/messages* | sort -nr ) | grep -e conntrackd
diff --git a/templates/show/log/content-inspection/node.def b/templates/show/log/content-inspection/node.def
new file mode 100644
index 0000000..582de84
--- /dev/null
+++ b/templates/show/log/content-inspection/node.def
@@ -0,0 +1,2 @@
+help: Show log for Content-inspection
+run: cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e snort
diff --git a/templates/show/log/dhcp/node.def b/templates/show/log/dhcp/node.def
new file mode 100644
index 0000000..2c7ade6
--- /dev/null
+++ b/templates/show/log/dhcp/node.def
@@ -0,0 +1,2 @@
+help: Show log for Dynamic Host Control Protocol (DHCP)
+run: cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep dhcpd
diff --git a/templates/show/log/dns/dynamic/node.def b/templates/show/log/dns/dynamic/node.def
new file mode 100644
index 0000000..187c32f
--- /dev/null
+++ b/templates/show/log/dns/dynamic/node.def
@@ -0,0 +1,2 @@
+help: Show log for Dynamic DNS
+run: cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e "ddclient"
diff --git a/templates/show/log/dns/forwarding/node.def b/templates/show/log/dns/forwarding/node.def
new file mode 100644
index 0000000..f136e94
--- /dev/null
+++ b/templates/show/log/dns/forwarding/node.def
@@ -0,0 +1,2 @@
+help: Show log for DNS Forwarding
+run: cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e "dnsmasq"
diff --git a/templates/show/log/dns/node.def b/templates/show/log/dns/node.def
new file mode 100644
index 0000000..151b261
--- /dev/null
+++ b/templates/show/log/dns/node.def
@@ -0,0 +1 @@
+help: Show log for Domain Name Service (DNS)
diff --git a/templates/show/log/firewall/ipv6-name/node.def b/templates/show/log/firewall/ipv6-name/node.def
new file mode 100644
index 0000000..71a78b1
--- /dev/null
+++ b/templates/show/log/firewall/ipv6-name/node.def
@@ -0,0 +1 @@
+help: Show the log for the specifed ipv6 firewall
diff --git a/templates/show/log/firewall/ipv6-name/node.tag/node.def b/templates/show/log/firewall/ipv6-name/node.tag/node.def
new file mode 100644
index 0000000..0be0d86
--- /dev/null
+++ b/templates/show/log/firewall/ipv6-name/node.tag/node.def
@@ -0,0 +1,5 @@
+help: Show log for a specified firewall
+allowed: local -a ARR=$(cli-shell-api -- listEffectiveNodes firewall ipv6-name)
+ echo "${ARR[@]}"
+run: cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e "\[$5-[0-9]*-[A,D,R]\]"
+
diff --git a/templates/show/log/firewall/ipv6-name/node.tag/rule/node.def b/templates/show/log/firewall/ipv6-name/node.tag/rule/node.def
new file mode 100644
index 0000000..d897ee9
--- /dev/null
+++ b/templates/show/log/firewall/ipv6-name/node.tag/rule/node.def
@@ -0,0 +1 @@
+help: Show log for a rule in the specified firewall
diff --git a/templates/show/log/firewall/ipv6-name/node.tag/rule/node.tag/node.def b/templates/show/log/firewall/ipv6-name/node.tag/rule/node.tag/node.def
new file mode 100644
index 0000000..6034aa7
--- /dev/null
+++ b/templates/show/log/firewall/ipv6-name/node.tag/rule/node.tag/node.def
@@ -0,0 +1,4 @@
+help: Show log for a rule in the specified firewall
+allowed: local -a ARR=$(cli-shell-api -- listEffectiveNodes firewall ipv6-name ${COMP_WORDS[3]} rule)
+ echo "${ARR[@]}"
+run: cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e "\[$5-$7-[A,D,R]\]"
diff --git a/templates/show/log/firewall/name/node.def b/templates/show/log/firewall/name/node.def
new file mode 100644
index 0000000..f63c091
--- /dev/null
+++ b/templates/show/log/firewall/name/node.def
@@ -0,0 +1 @@
+help: Show log for the specified Firewall
diff --git a/templates/show/log/firewall/name/node.tag/node.def b/templates/show/log/firewall/name/node.tag/node.def
new file mode 100644
index 0000000..40d7d03
--- /dev/null
+++ b/templates/show/log/firewall/name/node.tag/node.def
@@ -0,0 +1,5 @@
+help: Show log for a specified firewall
+allowed: local -a ARR=$(cli-shell-api -- listEffectiveNodes firewall name)
+ echo "${ARR[@]}"
+run: cat $(printf "%s\n" /var/log/messages* | sort -nr ) | grep -e "\[$5-[0-9]*-[A,D,R]\]"
+
diff --git a/templates/show/log/firewall/name/node.tag/rule/node.def b/templates/show/log/firewall/name/node.tag/rule/node.def
new file mode 100644
index 0000000..d897ee9
--- /dev/null
+++ b/templates/show/log/firewall/name/node.tag/rule/node.def
@@ -0,0 +1 @@
+help: Show log for a rule in the specified firewall
diff --git a/templates/show/log/firewall/name/node.tag/rule/node.tag/node.def b/templates/show/log/firewall/name/node.tag/rule/node.tag/node.def
new file mode 100644
index 0000000..bac7f64
--- /dev/null
+++ b/templates/show/log/firewall/name/node.tag/rule/node.tag/node.def
@@ -0,0 +1,5 @@
+help: Show log for a rule in the specified firewall
+allowed: local -a ARR=$(cli-shell-api -- listEffectiveNodes firewall name ${COMP_WORDS[3]} rule)
+ echo "${ARR[@]}"
+run: cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e "\[$5-$7-[A,D,R]\]"
+
diff --git a/templates/show/log/firewall/node.def b/templates/show/log/firewall/node.def
new file mode 100644
index 0000000..dd9cadc
--- /dev/null
+++ b/templates/show/log/firewall/node.def
@@ -0,0 +1 @@
+help: Show log for Firewall
diff --git a/templates/show/log/https/node.def b/templates/show/log/https/node.def
new file mode 100644
index 0000000..3f38f42
--- /dev/null
+++ b/templates/show/log/https/node.def
@@ -0,0 +1,2 @@
+help: Show log for Https
+run: cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e lighttpd -e chuncker -e webgui
diff --git a/templates/show/log/lldp/node.def b/templates/show/log/lldp/node.def
new file mode 100644
index 0000000..34df713
--- /dev/null
+++ b/templates/show/log/lldp/node.def
@@ -0,0 +1,2 @@
+help: Show log for Lldp
+run: cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e lldpd
diff --git a/templates/show/log/nat/node.def b/templates/show/log/nat/node.def
new file mode 100644
index 0000000..22f70d3
--- /dev/null
+++ b/templates/show/log/nat/node.def
@@ -0,0 +1,2 @@
+help: Show log for Network Address Translation (NAT)
+run: cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e "\[NAT-[0-9]*-*\]"
diff --git a/templates/show/log/openvpn/node.def b/templates/show/log/openvpn/node.def
new file mode 100644
index 0000000..0206699
--- /dev/null
+++ b/templates/show/log/openvpn/node.def
@@ -0,0 +1,2 @@
+help: Show log for Openvpn
+run: cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e openvpn
diff --git a/templates/show/log/snmp/node.def b/templates/show/log/snmp/node.def
new file mode 100644
index 0000000..f292605
--- /dev/null
+++ b/templates/show/log/snmp/node.def
@@ -0,0 +1,2 @@
+help: Show log for Simple Network Monitoring Protocol (SNMP)
+run: cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e snmpd
diff --git a/templates/show/log/vpn/all/node.def b/templates/show/log/vpn/all/node.def
new file mode 100644
index 0000000..7ede375
--- /dev/null
+++ b/templates/show/log/vpn/all/node.def
@@ -0,0 +1,2 @@
+help: Show log for ALL
+run: cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e pluto -e xl2tpd -e pptpd -e ppp
diff --git a/templates/show/log/vpn/ipsec/node.def b/templates/show/log/vpn/ipsec/node.def
new file mode 100644
index 0000000..6dc4fbf
--- /dev/null
+++ b/templates/show/log/vpn/ipsec/node.def
@@ -0,0 +1,2 @@
+help: Show log for IPSEC
+run: cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e pluto
diff --git a/templates/show/log/vpn/l2tp/node.def b/templates/show/log/vpn/l2tp/node.def
new file mode 100644
index 0000000..0f05603
--- /dev/null
+++ b/templates/show/log/vpn/l2tp/node.def
@@ -0,0 +1,2 @@
+help: Show log for L2TP
+run: cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e remote-access-aaa-win -e remote-access-zzz-mac -e xl2tpd -e ppp
diff --git a/templates/show/log/vpn/node.def b/templates/show/log/vpn/node.def
new file mode 100644
index 0000000..c4a89e1
--- /dev/null
+++ b/templates/show/log/vpn/node.def
@@ -0,0 +1 @@
+help: Show log for Virtual Private Network (VPN)
diff --git a/templates/show/log/vpn/pptp/node.def b/templates/show/log/vpn/pptp/node.def
new file mode 100644
index 0000000..33585a0
--- /dev/null
+++ b/templates/show/log/vpn/pptp/node.def
@@ -0,0 +1,3 @@
+help: Show log for PPTP
+run: cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e pptpd -e ppp
+
diff --git a/templates/show/log/vrrp/node.def b/templates/show/log/vrrp/node.def
new file mode 100644
index 0000000..d6f695d
--- /dev/null
+++ b/templates/show/log/vrrp/node.def
@@ -0,0 +1,2 @@
+help: Show log for Virtual Router Redundancy Protocol (VRRP)
+run: cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e Keepalived_vrrp
diff --git a/templates/show/log/webproxy/node.def b/templates/show/log/webproxy/node.def
new file mode 100644
index 0000000..98b23c7
--- /dev/null
+++ b/templates/show/log/webproxy/node.def
@@ -0,0 +1,2 @@
+help: Show log for Webproxy
+run: cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e "squid"