✨
Intensive Network Automation Bootcamp
- Starting April 28th ➜
Secure Your Seat Today!
Training
Bootcamp
Courses
Tech Sessions
Resources
Blog
Tips
GitHub
YouTube
Newsletter
Playgrounds
Pricing
Sign In
Become Member
TextFSM Parser
Validate and test the parsing of your TextFSM templates
Tools
J2 Renderer
TTP Parser
TextFSM Parser
XPath Tester
Members Only
JMESPath Validator
JSON Schema Validator
Data Format Converter
TextFSM Template
Value mod (\d+) Value sensor ([\S\s]+) Value cur_temp (\d+) Value status (\S+) Value major_thres (\d+) Value minor_thres (\d+) Start ^\s*Chassis Temperature\s+=\s+${cur_temp}\s+degrees\s+Celsius ^\s*Chassis Over Temperature Threshold\s+=\s+${minor_thres}\s+degrees\s+Celsius ^\s*Chassis Critical Temperature Threshold\s+=\s+${major_thres}\s+degrees\s+Celsius -> Record ^\s*Module\s+Sensor\s+Temperature\s+Status -> BOCHK ^\s*Fantray\s+:\s+${status} -> Record BOCHK ^\s*${mod}\s+${sensor}\s+${cur_temp}C \(${minor_thres}C,${major_thres}C,\d+C\)\s+${status} -> Record
0
/ 20000
Raw Text
no temperature alarms Module Sensor Temperature Status ------+--------------------------+--------------------+------------ 1 air inlet 29C (49C,64C,67C) ok 1 air outlet 46C (69C,85C,88C) ok Power Fan Inline Supply Model No Type Status Sensor Status ------ ---------------- --------- ----------- ------- ------- PS1 PWR-C49E-300AC-R AC 300W good good n.a. PS2 PWR-C49E-300AC-R AC 300W good good n.a. Power supplies needed by system : 1 Power supplies currently available : 2 Chassis Type : WS-C4948E Power consumed by backplane : 0 Watts Switch Bandwidth Utilization : 0% Supervisor Led Color : Green Module 1 Status Led Color : Green Fantray : Good Fantray removal timeout : 120 Power consumed by Fantray : 30 Watts
0
/ 20000
Result
[ { "mod": "1", "sensor": "air inlet ", "cur_temp": "29", "status": "ok", "major_thres": "64", "minor_thres": "49" }, { "mod": "1", "sensor": "air outlet ", "cur_temp": "46", "status": "ok", "major_thres": "85", "minor_thres": "69" } ]
Parse
Share
Auto-Sync