Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates based on hung sessions and different command output #631

Merged
merged 5 commits into from
Mar 25, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions templates/cisco_asa_show_interface.textfsm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Value Required INTERFACE (\S+)
Value INTERFACE_ZONE (.+?)
Value LINK_STATUS (\w+)
Value INTERFACE_ZONE (.*)
jmcgill298 marked this conversation as resolved.
Show resolved Hide resolved
Value LINK_STATUS (.*)
jmcgill298 marked this conversation as resolved.
Show resolved Hide resolved
Value PROTOCOL_STATUS (.*)
Value HARDWARE_TYPE ([\w ]+)
Value BANDWIDTH (\d+\s+\w+)
Expand All @@ -25,12 +25,12 @@ Value FIVEMIN_DROP_RATE (\d+)

Start
^Interface.* -> Continue.Record
^.*Interface ${INTERFACE} "${INTERFACE_ZONE}", is ${LINK_STATUS}.*protocol is ${PROTOCOL_STATUS}
^.*Interface ${INTERFACE} "${INTERFACE_ZONE}", is ${LINK_STATUS},\s+line\s+protocol is ${PROTOCOL_STATUS}
jmcgill298 marked this conversation as resolved.
Show resolved Hide resolved
^\s+Hardware is ${HARDWARE_TYPE} -> Continue
^.*BW ${BANDWIDTH}.*DLY ${DELAY}
^.*\(${DUPLEX}.*Auto-Speed\(${SPEED}\)
^.*Description: ${DESCRIPTION}
^.*MAC address ${ADDRESS}.*MTU ${MTU}
^\s*MAC\s+address\s+${ADDRESS},\s+MTU ${MTU}$$
jmcgill298 marked this conversation as resolved.
Show resolved Hide resolved
^.*IP address ${IP_ADDRESS}, .*subnet mask ${NET_MASK}
^.*1 minute input rate ${ONEMIN_IN_PPS} pkts/sec,\s+${ONEMIN_IN_RATE} bytes/sec
^.*1 minute output rate ${ONEMIN_OUT_PPS} pkts/sec,\s+${ONEMIN_OUT_RATE} bytes/sec
Expand Down
4 changes: 4 additions & 0 deletions templates/cisco_asa_show_vpn-sessiondb_anyconnect.textfsm
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,16 @@ Start
Connection
^\s*Username\s*:\s+${USERNAME}\s+Index\s+:\s*${INDEX}$$
^\s*Assigned\s+IP\s*:\s+${ASSIGNED_IP}\s+Public\s*IP\s*:\s*${PUBLIC_IP}$$
^\s*Assigned\s+IP\s*:\s+${ASSIGNED_IP}$$
^\s*Public\s+IP\s*:\s+${PUBLIC_IP}$$
^\s*Protocol\s+:\s+${PROTOCOL}$$
^\s*License\s+:\s*${LICENSE}$$
^\s*Encryption\s+:\s*${ENCRYPTION}$$
^\s*Hashing\s+:\s*${HASHING}$$
^\s*Bytes\s+Tx\s+:\s+${BYTES_TX}\s+Bytes\s+Rx\s+:\s+${BYTES_RX}$$
^\s*Group\s+Policy\s+:\s+${GROUP_POLICY}\s+Tunnel\s+Group\s+:\s+${TUNNEL_GROUP}$$
^\s*Group\s+Policy\s+:\s+${GROUP_POLICY}$$
^\s*Tunnel\s+Group\s+:\s+${TUNNEL_GROUP}$$
^\s*Login\s+Time\s+:\s+${LOGIN_TIME}\s+${LOGIN_TIME_ZONE}\s+${LOGIN_WEEKDAY}\s+${LOGIN_MONTH}\s+${LOGIN_DAY}\s+${LOGIN_YEAR}$$
^\s*Duration\s+:\s+${DURATION}$$
^\s*Inactivity\s+:\s+${INACTIVITY}$$
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Session Type: AnyConnect

Username : smithj Index : 57045
Assigned IP : 10.1.2.3 Public IP : 1.2.3.4
Protocol : AnyConnect-Parent SSL-Tunnel DTLS-Tunnel
License : AnyConnect Premium
Encryption : AnyConnect-Parent: (1)none SSL-Tunnel: (1)AES256 DTLS-Tunnel: (1)AES256
Hashing : AnyConnect-Parent: (1)none SSL-Tunnel: (1)SHA1 DTLS-Tunnel: (1)SHA1
Bytes Tx : 177836286 Bytes Rx : 12615185
Group Policy : GroupPolicy_duo-vpn-users
Tunnel Group : duo-vpn-users
Login Time : 10:14:19 EDT Wed Mar 25 2020
Duration : 0h:23m:58s
Inactivity : 0h:00m:00s
VLAN Mapping : N/A VLAN : none
Audt Sess ID : 0ae60f140ded50005e7b673b
Security Grp : none

Username : smithj Index : 47520
Public IP : 1.2.3.4
Protocol : AnyConnect-Parent
License : AnyConnect Premium
Encryption : AnyConnect-Parent: (1)none
Hashing : AnyConnect-Parent: (1)none
Bytes Tx : 0 Bytes Rx : 0
Group Policy : GroupPolicy_duo-vpn-users
Tunnel Group : duo-vpn-users
Login Time : 10:13:49 EDT Wed Mar 25 2020
Duration : 0h:24m:28s
Inactivity : 0h:00m:00s
VLAN Mapping : N/A VLAN : none
Audt Sess ID : 0ae60f140b9a00005e7b671d
Security Grp : none
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
parsed_sample:
- session_type: "AnyConnect"
username: "smithj"
index: "57045"
assigned_ip: "10.1.2.3"
public_ip: "1.2.3.4"
protocol: "AnyConnect-Parent SSL-Tunnel DTLS-Tunnel"
license: "AnyConnect Premium"
encryption: "AnyConnect-Parent: (1)none SSL-Tunnel: (1)AES256 DTLS-Tunnel: (1)AES256"
hashing: "AnyConnect-Parent: (1)none SSL-Tunnel: (1)SHA1 DTLS-Tunnel: (1)SHA1"
bytes_tx: "177836286"
bytes_rx: "12615185"
group_policy: "GroupPolicy_duo-vpn-users"
tunnel_group: "duo-vpn-users"
login_time: "10:14:19"
login_time_zone: "EDT"
login_weekday: "Wed"
login_month: "Mar"
login_day: "25"
login_year: "2020"
duration: "0h:23m:58s"
inactivity: "0h:00m:00s"
vlan_mapping: "N/A"
vlan: "none"
audt_sess_id: "0ae60f140ded50005e7b673b"
security_grp: "none"
- session_type: "AnyConnect"
username: "smithj"
index: "47520"
assigned_ip: ""
public_ip: "1.2.3.4"
protocol: "AnyConnect-Parent"
license: "AnyConnect Premium"
encryption: "AnyConnect-Parent: (1)none"
hashing: "AnyConnect-Parent: (1)none"
bytes_tx: "0"
bytes_rx: "0"
group_policy: "GroupPolicy_duo-vpn-users"
tunnel_group: "duo-vpn-users"
login_time: "10:13:49"
login_time_zone: "EDT"
login_weekday: "Wed"
login_month: "Mar"
login_day: "25"
login_year: "2020"
duration: "0h:24m:28s"
inactivity: "0h:00m:00s"
vlan_mapping: "N/A"
vlan: "none"
audt_sess_id: "0ae60f140b9a00005e7b671d"
security_grp: "none"