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

cisco_ios_show_standby_brief.template support for interfaces and output in two lines #483

Closed
i-m-d opened this issue Oct 3, 2019 · 0 comments · Fixed by #503
Closed

Comments

@i-m-d
Copy link

i-m-d commented Oct 3, 2019

ISSUE TYPE
  • Feature Idea and upgrade
TEMPLATE USING

Value IFACE (\S+)
Value GROUP (\d+)
Value PRIORITY (\d+)
Value PREEMPT (.)
Value STATE (\w+)
Value ACTIVE (\S+)
Value STANDBY (\S+)
Value VIRTUALIP (\S+)

Start
^${IFACE}\s+${GROUP}\s+${PRIORITY}\s+${PREEMPT}\s+${STATE}\s+${ACTIVE}\s+${STANDBY}\s+${VIRTUALIP} -> Record
^${IFACE}$$
^\s+${GROUP}\s+${PRIORITY}\s+${PREEMPT}\s+${STATE}\s+${ACTIVE}\s+${STANDBY}\s+${VIRTUALIP} -> Record

SAMPLE COMMAND OUTPUT

same as original

SUMMARY

the original template only works with output in one line as this:

Interface Grp Pri P State Active Standby Virtual IP
Te0/0/0.230 1 100 P Active local 10.6.109.202 10.6.109.200

but with this modification also works this two lines:

Interface Grp Pri P State Active Standby Virtual IP
Te0/0/0.1731
1 100 P Active local 192.168.40.3 192.168.40.4

Also the index line only works with this command: "show standby brief" which list ALL interfaces, but some times you can only want ONE interface, so i change my index line from:

cisco_ios_show_standby_brief.template, .*, cisco_ios, sh[[ow]] standby br[[ief]]

to:

cisco_ios_show_standby_brief.template, ., cisco_ios, sh[[ow]] standby([ \S]) br[[ief]]

So i can use any os these forms:

show standby brief
show standby Te0/0/0.1731 brief

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants