Closed ericspacket closed 1 month ago
@ericspacket can you put in a PR to fix this?
@ericspacket Are you going to work up a PR on this?
It's been two weeks so if I don't see a response from you on this thread in a few hours I'll probably work up a fix.
@ericspacket
I added a rule so that once under a minute
is hit the Record
action is triggered (similar to when a normal minute value was present).
^.*under\s+a\s+minute -> Record
I submitted PR #1858 Thank you!
Edit: Actually there is a larger uptime parsing issue that I'm working to identify and fix. :confounded:
Update: Essentially if the time value was greater than a single digit the first digit was being lopped off (probably regex greediness). It appears this issue has been there since the template was created, but was just not caught. :man_shrugging:
I compressed things down to a single long regex for the time line.
Not only does it match the under a minute
, but it also has the correct digits captured now.
I updated PR #1858 with the fix for the incorrect time digit capturing in addition to the under a minute
text.
https://github.com/networktocode/ntc-templates/pull/1858/files
@ericspacket @afly007
ISSUE TYPE
TEMPLATE USING
SAMPLE COMMAND OUTPUT
SUMMARY
On Aruba AOSCX the show system command has the string 'under a minute' as part of the Up Time output which breaks the current template. It is just chance someone will run into this.
STEPS TO REPRODUCE
EXPECTED RESULTS
The output to be parsed successfully
ACTUAL RESULTS