forked from networktocode/ntc-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New template: juniper_junos_show_system_uptime.textfsm (networktocode…
…#975) New template: juniper_junos_show_system_uptime.textfsm
- Loading branch information
1 parent
9bcf5e3
commit 0ec5074
Showing
6 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
ntc_templates/templates/juniper_junos_show_system_uptime.textfsm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
6 changes: 6 additions & 0 deletions
6
tests/juniper_junos/show_system_uptime/juniper_junos_show_system_uptime.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
28 changes: 28 additions & 0 deletions
28
tests/juniper_junos/show_system_uptime/juniper_junos_show_system_uptime.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
6 changes: 6 additions & 0 deletions
6
tests/juniper_junos/show_system_uptime/juniper_junos_show_system_uptime_2.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
28 changes: 28 additions & 0 deletions
28
tests/juniper_junos/show_system_uptime/juniper_junos_show_system_uptime_2.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |