From 1ca732305a1f3cea854b1c9ed182f547982145a6 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Wed, 3 Jun 2020 17:24:07 +0200 Subject: T2546: migrate "show log" to vyos-1x --- op-mode-definitions/show-log.xml | 133 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 op-mode-definitions/show-log.xml diff --git a/op-mode-definitions/show-log.xml b/op-mode-definitions/show-log.xml new file mode 100644 index 000000000..35e89aed2 --- /dev/null +++ b/op-mode-definitions/show-log.xml @@ -0,0 +1,133 @@ + + + + + + + Show contents of current master log file + + /bin/journalctl + + + + Show contents of all master log files + + eval $(lesspipe); less $_vyatta_less_options --prompt=".log?m, file %i of %m., page %dt of %D" -- `printf "%s\n" /var/log/messages* | sort -nr` + + + + Show listing of authorization attempts + + /bin/journalctl -q SYSLOG_FACILITY=10 SYSLOG_FACILITY=4 + + + + Show log for Cluster + + cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e heartbeat -e cl_status -e mach_down -e ha_log + + + + Show log for Conntrack-sync + + cat $(printf "%s\n" /var/log/messages* | sort -nr ) | grep -e conntrackd + + + + Show log for Dynamic Host Control Protocol (DHCP) + + cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep dhcpd + + + + Show log for HTTPs + + cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e nginx + + + + Show log for LLDP + + cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e lldpd + + + + Show log for Network Address Translation (NAT) + + egrep -i "kernel:.*\[NAT-[A-Z]{3,}-[0-9]+(-MASQ)?\]" $(find /var/log -maxdepth 1 -type f -name messages\* | sort -t. -k2nr) + + + + Show log for OpenVPN + + cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e openvpn + + + + Show log for Simple Network Monitoring Protocol (SNMP) + + cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e snmpd + + + + Show last n changes to messages + + <NUMBER> + + + tail -n "$4" /var/log/messages | ${VYATTA_PAGER:-cat} + + + + Show last 10 lines of /var/log/messages file + + tail -n 10 /var/log/messages + + + + Show log for Virtual Private Network (VPN) + + + + + Show log for ALL + + cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e charon -e xl2tpd -e pptpd -e ppp + + + + Show log for IPSec + + cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e charon + + + + Show log for L2TP + + cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e remote-access-aaa-win -e remote-access-zzz-mac -e xl2tpd -e ppp + + + + Show log for PPTP + + cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e pptpd -e ppp + + + + + + Show log for Virtual Router Redundancy Protocol (VRRP) + + cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e Keepalived_vrrp + + + + Show log for Webproxy + + cat $(printf "%s\n" /var/log/messages* | sort -nr) | grep -e "squid" + + + + + + -- cgit v1.2.3