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

New template: juniper_junos_show_system_uptime.textfsm #975

Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ juniper_junos_show_arp_no-resolve.textfsm, .*, juniper_junos, sh[[ow]] a[[rp]] n
juniper_junos_show_isis_adjacency.textfsm, .*, juniper_junos, sh[[ow]] is[[is]] ad[[jacency]]
juniper_junos_show_lldp_neighbors.textfsm, .*, juniper_junos, sh[[ow]] ll[[dp]] n[[eighbors]]
juniper_junos_show_ospf_neighbor.textfsm, .*, juniper_junos, sh[[ow]] ospf n[[eighbor]]
juniper_junos_show_system_uptime.textfsm, .*, juniper_junos, sh[[ow]] sys[[tem]] up[[time]]
juniper_junos_show_interfaces.textfsm, .*, juniper_junos, sh[[ow]] inte[[rfaces]]
juniper_junos_show_version.textfsm, .*, juniper_junos, sh[[ow]] ver[[sion]]

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Value TIME (\d+:\d+:\d+)
Value TIMEZONE (\S+)
Value MONTH (\w+)
Value DAY (\d+)
Value YEAR (\d+)
Value TIME_SOURCE (.*)
Value BOOT_TIME (\d+:\d+:\d+)
Value BOOT_TIMEZONE (\S+)
Value BOOT_MONTH (\w+)
Value BOOT_DAY (\d+)
Value BOOT_YEAR (\d+)
Value PROTOCOLS_TIME (\d+:\d+:\d+)
Value PROTOCOLS_TIMEZONE (\S+)
Value PROTOCOLS_MONTH (\w+)
Value PROTOCOLS_DAY (\d+)
Value PROTOCOLS_YEAR (\d+)
Value LAST_CONFIG_TIME (\d+:\d+:\d+)
Value LAST_CONFIG_TIMEZONE (\S+)
Value LAST_CONFIG_MONTH (\w+)
Value LAST_CONFIG_DAY (\d+)
Value LAST_CONFIG_YEAR (\d+)
Value LAST_CONFIG_USER (\w+)
Value USERS (\d+)
Value LOAD_AVERAGE_1MIN (\d+\.\d{2})
Value LOAD_AVERAGE_5MIN (\d+\.\d{2})
Value LOAD_AVERAGE_15MIN (\d+\.\d{2})

Start
^Current\s+time:\s*${YEAR}-${MONTH}-${DAY}\s+${TIME}\s+${TIMEZONE}
^Time\s+[Ss]ource:\s*${TIME_SOURCE}
^System\s+booted:\s*${BOOT_YEAR}-${BOOT_MONTH}-${BOOT_DAY}\s+${BOOT_TIME}\s+${BOOT_TIMEZONE}\s+\([^)]+\)
^Protocols\s+started:\s*${PROTOCOLS_YEAR}-${PROTOCOLS_MONTH}-${PROTOCOLS_DAY}\s+${PROTOCOLS_TIME}\s+${PROTOCOLS_TIMEZONE}\s+\([^)]+\)
^Last\s+configured:\s*${LAST_CONFIG_YEAR}-${LAST_CONFIG_MONTH}-${LAST_CONFIG_DAY}\s+${LAST_CONFIG_TIME}\s+${LAST_CONFIG_TIMEZONE}\s+\([^)]+\)\s+by\s+${LAST_CONFIG_USER}
^.*,\s*${USERS}\s+users?,\s*load\s+averages:\s*${LOAD_AVERAGE_1MIN},\s*${LOAD_AVERAGE_5MIN},\s*${LOAD_AVERAGE_15MIN}
^\s*$$
^. -> Error
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Current time: 2021-08-31 08:48:11 MSK
Time Source: NTP CLOCK
System booted: 2021-03-29 13:32:05 MSK (22w0d 19:16 ago)
Protocols started: 2021-03-29 13:37:11 MSK (22w0d 19:11 ago)
Last configured: 2021-07-13 16:35:35 MSK (6w6d 16:12 ago) by admin
8:48AM up 154 days, 19:16, 2 users, load averages: 0.04, 0.04, 0.01
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
parsed_sample:
- time: "08:48:11"
timezone: "MSK"
year: "2021"
month: "08"
day: "31"
time_source: "NTP CLOCK"
boot_time: "13:32:05"
boot_timezone: "MSK"
boot_year: "2021"
boot_month: "03"
boot_day: "29"
protocols_time: "13:37:11"
protocols_timezone: "MSK"
protocols_year: "2021"
protocols_month: "03"
protocols_day: "29"
last_config_time: "16:35:35"
last_config_timezone: "MSK"
last_config_year: "2021"
last_config_month: "07"
last_config_day: "13"
last_config_user: "admin"
users: "2"
load_average_1min: "0.04"
load_average_5min: "0.04"
load_average_15min: "0.01"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Current time: 2021-08-31 12:29:34 MSK
Time Source: NTP CLOCK
System booted: 2021-02-26 18:30:12 MSK (26w3d 17:59 ago)
Protocols started: 2021-02-26 18:34:06 MSK (26w3d 17:55 ago)
Last configured: 2021-07-13 16:35:18 MSK (6w6d 19:54 ago) by admin
12:29PM up 185 days, 17:59, 1 user, load averages: 0.11, 0.05, 0.01
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
parsed_sample:
- time: "12:29:34"
timezone: "MSK"
month: "08"
day: "31"
year: "2021"
time_source: "NTP CLOCK"
boot_time: "18:30:12"
boot_timezone: "MSK"
boot_month: "02"
boot_day: "26"
boot_year: "2021"
protocols_time: "18:34:06"
protocols_timezone: "MSK"
protocols_month: "02"
protocols_day: "26"
protocols_year: "2021"
last_config_time: "16:35:18"
last_config_timezone: "MSK"
last_config_month: "07"
last_config_day: "13"
last_config_year: "2021"
last_config_user: "admin"
users: "1"
load_average_1min: "0.11"
load_average_5min: "0.05"
load_average_15min: "0.01"