diff --git a/README.md b/README.md index 7d2b9fc..f1a20e0 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ This idea was born because of the need for a simple tool in order to automate the execution of simple log analysis obtained from Nokia SROS routers. The tool reads the content of a log in `txt` or `json` format, parses only pre defined variables and does the comparison, thus verifying if there are changes in such variables . The logs are generated by the use of [taskAutom](https://github.com/laimaretto/taskAutom). -## Setup ## +# Setup ## #### System Libraries These libraries have been tested under Ubuntu 20.04 and Python3.8. @@ -19,17 +19,34 @@ python3 -m nuitka logAnalizer.py ``` Compiling has been tested succesfully under Ubuntu. Don't know if this is directly supported under Windows. If it fails, let me know. Nevertheless, as mentioned, you can run `logAnalyzer_win` directly from the CLI using Python -## Usage +# Usage The program needs two mandatory inputs: - a folder which contains the parsing templates, either in `textFSM` or `ttp` format; - - a folder, which contains the logs obtained a router, via [`taskAutom`](https://github.com/laimaretto/taskAutom). Though not mandatory, `taskAutom` is suggested as a way of obtaining the logs, because these can be stored in a json file. + - a folder, which contains the logs obtained a router, via [`taskAutom`](https://github.com/laimaretto/taskAutom). Though not mandatory, `taskAutom` is suggested as a way of obtaining the logs, because these can be stored in a `json` file. ### Templates -The templates are stored by default under the `Templates/` folder. The script reads the CSV and uses the indicated templates to perform the function of parsing. +The templates are stored by default under the `Templates/` folder. logAnalyzer reads either the CSV or the template folder to perform the function of parsing. -##### CSV +Inside each template file, one can include control variables. Also, some mandatory comments are needed. + +#### - Mandatory +```#Command: /show router bgp summary``` + +The above is neede in each template file to let logAnalyzer know which command we are trying to parse. We could use some variables as well, suche as `#Command: /show router \S+ interface`. + +#### - Optional +``` +#filterAction:exclude or include-only +#filterColumns:Var1,Var2,Var3 +#majorDown:String1,String2 +``` +These are control keywords. The control keyword `#filterAction` allows only the actions `exclude` or `include-only`. This will modify the resulting columns of the report. The resulting columns sholud be declared under the control keyword `#filterColumns`. + +The keyword `#majorDown` allows us to declared a number of template-specific keywords that logAnalyzer will look for when processing the outputs. So, for example, if our output should be considerd as `down` when the string `connect` is seen, then `connect` should be placed in `#majorDown`. + +### CSV It is possible to use a CSV file, that includes the specific templates to be used in the analysys. @@ -40,7 +57,7 @@ show_service_sdp.template ``` If omitted, all the templates insisde the templates folder, will be used. -## Results +# Results If `logAnalyzer` is invoked only with option `-pre`, reads the specific content in the log folder for a given command and then saves the results in an Excel report. We need to specify format of the logs, either `-json yes|no` and also the parsing engine, either `-te textFSM|ttp`. Also, the folder where the templates are located, with `-tf Folder`. @@ -99,7 +116,7 @@ optional arguments: If set, use this folder of templates for POST logs. Default=Templates/ -te {ttp,textFSM}, --templateEngine {ttp,textFSM} Engine for parsing. Default=textFSM. + -ri {name,ip,both}, --routerId {name,ip,both} + Router Id to be used within the tables in the Excel report. Default=name. -v, --version Version - - ``` diff --git a/Templates/nokia_sros_Name.template b/Templates/nokia_sros_Name.template index ade6fb3..08c00eb 100755 --- a/Templates/nokia_sros_Name.template +++ b/Templates/nokia_sros_Name.template @@ -2,8 +2,7 @@ #Description: This template is an example to find out the router name #Variables: Router_Name #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Fillup NAME (\S+) Start - ^\w:${NAME}(#|>) echo SCRIPT_NONO_START - ^.\w:${NAME}(#|>) echo SCRIPT_NONO_START + ^\w:\S+(#|>) echo SCRIPT_NONO_START + ^.\w:\S+(#|>) echo SCRIPT_NONO_START diff --git a/Templates/nokia_sros_Ping.template b/Templates/nokia_sros_Ping.template index 143ec75..ea6ba70 100755 --- a/Templates/nokia_sros_Ping.template +++ b/Templates/nokia_sros_Ping.template @@ -2,7 +2,6 @@ #Description: This template is used to see the result of ping #Variables: Router_Name IP_TO_HOST DATA_BYTES PACKETS_TRANSMITTED PACKETS_RECEIVED PERC_PACKET_LOSS #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required IP_TO_HOST ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}) Value Required DATA_BYTES (\w{1,3}) Value PACKETS_TRANSMITTED (\w+) @@ -10,7 +9,7 @@ Value PACKETS_RECEIVED (\w+) Value PERC_PACKET_LOSS (\w+.) Start - ^\w:${NAME}(#|>) /ping [0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3} - ^.\w:${NAME}(#|>) /ping [0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3} + ^\w:\S+(#|>) /ping [0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3} + ^.\w:\S+(#|>) /ping [0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3} ^PING\s${IP_TO_HOST}\s${DATA_BYTES} -> Continue ^${PACKETS_TRANSMITTED}\spackets\stransmitted.\s${PACKETS_RECEIVED}\spackets\sreceived.\s${PERC_PACKET_LOSS} -> Record diff --git a/Templates/nokia_sros_admin_display_config_match_telnet_server.template b/Templates/nokia_sros_admin_display_config_match_telnet_server.template index 3f445e7..cd03367 100755 --- a/Templates/nokia_sros_admin_display_config_match_telnet_server.template +++ b/Templates/nokia_sros_admin_display_config_match_telnet_server.template @@ -2,10 +2,9 @@ #Description: This template is used to find out the telnet option on router's configuration #Variables: Router_Name Telnet-Server #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value telnet_activo (telnet-server) Start - ^\w:${NAME}(#|>) /admin display config - ^.\w:${NAME}(#|>) /admin display config + ^\w:\S+(#|>) /admin display config + ^.\w:\S+(#|>) /admin display config ^\s+${telnet_activo} diff --git a/Templates/nokia_sros_config-policy_Etapa2_Seam.template b/Templates/nokia_sros_config-policy_Etapa2_Seam.template index fc47a8a..3f5bfd5 100755 --- a/Templates/nokia_sros_config-policy_Etapa2_Seam.template +++ b/Templates/nokia_sros_config-policy_Etapa2_Seam.template @@ -2,7 +2,6 @@ #Description: This template is used to find out seamless policy configuration, this template was created for a specific configuration #Variables: Router_Name Prefix-list Prefix Community_Inter Community_Area #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value prefix_list (\S+) Value prefix ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}) Value communityINTER (\S+.\S+) @@ -21,8 +20,8 @@ Value next-hop-self (next-hop-self) Value default-action (\S+) Start - ^\w:${NAME}(#|>) /configure router policy-options - ^.\w:${NAME}(#|>) /configure router policy-options + ^\w:\S+(#|>) /configure router policy-options + ^.\w:\S+(#|>) /configure router policy-options ^\s+begin ^\s+prefix-list\s${prefix_list} ^\s+prefix\s${prefix}/32\sexact diff --git a/Templates/nokia_sros_etapa1seamless.template b/Templates/nokia_sros_etapa1seamless.template index f9cad9d..92d528c 100755 --- a/Templates/nokia_sros_etapa1seamless.template +++ b/Templates/nokia_sros_etapa1seamless.template @@ -2,7 +2,6 @@ #Description: This template is used to find out version of TiMOS and BGP configuration, this template was created for a specific BGP configuration #Variables: Router_Name Version group family type import export bfd_7250 peer_as add_paths add_paths_conf add_paths_conf1 aigp neighbor description advertise_label family_label next_hop bfd_enable #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Filldown Version (TiMOS\S+) Value group (\S+) Value family (ipv4) @@ -23,8 +22,8 @@ Value next_hop (next-hop-self) Value bfd_enable (bfd-enable) Start - ^\w:${NAME}(#|>) /show version - ^.\w:${NAME}(#|>) /show version + ^\w:\S+(#|>) /show version + ^.\w:\S+(#|>) /show version ^${Version} ^\s+group\s${group} ^\s+family\s${family} @@ -43,5 +42,5 @@ Start ^\s+family\s${family_label} -> Continue ^\s+${next_hop} -> Continue ^\s+${bfd_enable} -> Continue - ^\w:${NAME}#>config>router>bgp# exit -> Record + ^\w:\S+#>config>router>bgp# exit -> Record diff --git a/Templates/nokia_sros_oam_svc-ping.template b/Templates/nokia_sros_oam_svc-ping.template index d9a130b..79b0d6c 100755 --- a/Templates/nokia_sros_oam_svc-ping.template +++ b/Templates/nokia_sros_oam_svc-ping.template @@ -2,7 +2,6 @@ #Description: This template is used to see the result of ping over sdp tunnel #Variables: Router_Name Service_ID_INIT Type_Local Type_Remote Admin_State_Local Admin_State_Remoto Oper_State_Local Admin_State_Remoto Service_MTU_Local Service_MTU_Remoto IP_Interface_State Actual_IP_Addr_Local Actual_IP_Addr_Remoto SDP_Path_Used_Local SDP_ID_Local SDP_ID_Remoto SDP_Admin_State_Local SDP_Admin_State_Remoto SDP_Oper_State_Local SDP_Oper_State_Remoto Binding_VC_ID_Local Binding_VC_ID_Remoto Request_Result #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Key,Required Service_ID_INIT ([0-9]{1,15}) Value Type_Local (\S+) Value Type_Remote (\S+) @@ -28,8 +27,8 @@ Value Binding_VC_ID_Remoto (\S+) Value Request_Result (.+) Start - ^\w:${NAME}(#|>) oam svc-ping [0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3} service \S+ local-sdp remote-sdp - ^.\w:${NAME}(#|>) oam svc-ping [0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3} service \S+ local-sdp remote-sdp + ^\w:\S+(#|>) oam svc-ping [0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3} service \S+ local-sdp remote-sdp + ^.\w:\S+(#|>) oam svc-ping [0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3} service \S+ local-sdp remote-sdp ^Service-ID:\s${Service_ID_INIT} ^\s+Type:\s+${Type_Local}\s+${Type_Remote} ^\s+Admin\sState:\s+${Admin_State_Local}\s+${Admin_State_Remoto} -> Continue diff --git a/Templates/nokia_sros_show_port_.template b/Templates/nokia_sros_show_port_.template index 5873b45..a7c5201 100644 --- a/Templates/nokia_sros_show_port_.template +++ b/Templates/nokia_sros_show_port_.template @@ -2,7 +2,6 @@ #Description: This template is used to see the information about physical port #Variables: NAME, port, Description, OperSpeed, ConfigSpeed, AdminState, OperDuplex, OperState, ConfigDuplex, PhysicalLink, MTU, SingleFiberMode, ConfiguredMode, EncapType, AutoNegotiate, MDI_MDX, EgressRate, IngressRate, TransceiverType, ModelNumber, TXLaserWavelength, ConnectorCode, SerialNumber, PartNumber, OpticalCompliance, LinkLengthsupport, SFPSyncECapable, TxOutPwr_dBm_VALUE, TxOutPwr_dBm_HighAlarm, TxOutPwr_dBm_HighWarn, TxOutPwr_dBm_LowWarn, TxOutPwr_dBm_LowAlarm, RxInPwr_dBm_VALUE, RxInPwr_dBm_HighAlarm, RxInPwr_dBm_HighWarn, RxInPwr_dBm_LowWarn, RxInPwr_dBm_LowAlarm #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required port (\S+) Value Description (.+) Value OperSpeed (.+) @@ -41,8 +40,8 @@ Value RxInPwr_dBm_LowWarn (\S+) Value RxInPwr_dBm_LowAlarm (\S+) Start - ^\w:${NAME}(#|>) /show port \S+ - ^.\w:${NAME}(#|>) /show port \S+ + ^\w:\S+(#|>) /show port \S+ + ^.\w:\S+(#|>) /show port \S+ ^Description\s+:\s${Description} ^Interface\s+:\s${port}\s+Oper\sSpeed\s+:\s${OperSpeed} ^Link.level\s+:\s\S+\s+Config\sSpeed\s+:\s${ConfigSpeed} diff --git a/Templates/nokia_sros_show_port_v2.template b/Templates/nokia_sros_show_port_v2.template new file mode 100644 index 0000000..fa83bd4 --- /dev/null +++ b/Templates/nokia_sros_show_port_v2.template @@ -0,0 +1,18 @@ +#Command: /show port +Value Filldown Slot (\S+) +Value Required Port_ID (\S+) +Value Adm_State ([uU][pP]|[Dd][oO][wW][nN]) +Value Link (\S+) +Value Port_State ([uU][pP]|[Dd][oO][wW][nN]) +Value Cfg_MTU (\S+) +Value Oper_MTU (\S+) +Value LAG_Bndl (\S+|\-) +Value Port_Mode (\S+) +Value Port_Encp (\S+) +Value Port_Type (\S+) +Value C_QS_S_XP (.+) + +Start + ^.?\w:\S+(#|>) /?show port + ^Ports on Slot ${Slot} -> Continue.Record + ^${Port_ID}\s+${Adm_State}\s+${Link}\s+${Port_State}\s+${Cfg_MTU}\s+${Oper_MTU}\s+${LAG_Bndl}\s+${Port_Mode}\s+${Port_Encp}\s+${Port_Type}\s+${C_QS_S_XP} -> Continue.Record \ No newline at end of file diff --git a/Templates/nokia_sros_show_router-table_match_no_routes.template b/Templates/nokia_sros_show_router-table_match_no_routes.template index 85d8dff..5938068 100755 --- a/Templates/nokia_sros_show_router-table_match_no_routes.template +++ b/Templates/nokia_sros_show_router-table_match_no_routes.template @@ -2,13 +2,12 @@ #Description: This template is used to see the number of base routes #Variables: Router_Name NO_OF_ROUTES #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required command (router\sroute-table) Value Required NO_OF_ROUTES ([0-9]{0,10}) Start - ^\w:${NAME}(#|>) /show router route-table | match No. - ^.\w:${NAME}(#|>) /show router route-table | match No. + ^\w:\S+(#|>) /show router route-table | match No. + ^.\w:\S+(#|>) /show router route-table | match No. ^/show\s${command} | match No. ^No.\sof\sRoutes:\s${NO_OF_ROUTES} -> Record diff --git a/Templates/nokia_sros_show_router_bgp_routes_hunt_ipv4_matchpostlines5.template b/Templates/nokia_sros_show_router_bgp_routes_hunt_ipv4_matchpostlines5.template index cf092ac..353ee4c 100755 --- a/Templates/nokia_sros_show_router_bgp_routes_hunt_ipv4_matchpostlines5.template +++ b/Templates/nokia_sros_show_router_bgp_routes_hunt_ipv4_matchpostlines5.template @@ -2,13 +2,12 @@ #Description: This template is used to see bgp routes ipv4 to CSR nexthop #Variables: Router_Name IP_CSR Nexthop Res_Nexhop #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Filldown IP_CSR ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}) Value Required Nexthop ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}) Value Res_Nexhop ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}) Start - ^\w:${NAME}(#|>)\s/show\srouter\sbgp\sroutes\shunt\sipv4\s.\smatch\s${IP_CSR}\spost-lines\s5\s|\smatch\sNexthop - ^.\w:${NAME}(#|>)\s/show\srouter\sbgp\sroutes\shunt\sipv4\s.\smatch\s${IP_CSR}\spost-lines\s5\s|\smatch\sNexthop + ^\w:\S+(#|>)\s/show\srouter\sbgp\sroutes\shunt\sipv4\s.\smatch\s${IP_CSR}\spost-lines\s5\s|\smatch\sNexthop + ^.\w:\S+(#|>)\s/show\srouter\sbgp\sroutes\shunt\sipv4\s.\smatch\s${IP_CSR}\spost-lines\s5\s|\smatch\sNexthop ^Nexthop\s+:\s${Nexthop} -> Continue ^Res.\sNexthop\s+:\s${Res_Nexhop} -> Continue.Record diff --git a/Templates/nokia_sros_show_router_bgp_routes_varFamily.template b/Templates/nokia_sros_show_router_bgp_routes_varFamily.template index 1a981c0..d5f0258 100644 --- a/Templates/nokia_sros_show_router_bgp_routes_varFamily.template +++ b/Templates/nokia_sros_show_router_bgp_routes_varFamily.template @@ -1,7 +1,6 @@ #Command: /show router bgp routes \S+ #Variables Router_Name family BGP_Router_ID AS Local_AS Flag Network LocalPref MED Next_Hop Path_id Label As_Path #Autor Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Filldown family (\S+) Value Filldown BGP_Router_ID ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}) Value Filldown AS (\S+) @@ -16,8 +15,8 @@ Value Label (\S+) Value As_Path (\S+\s\S+|\S+) Start - ^\w:${NAME}(#|>)\s/show router bgp routes\s\S+ -> Continue - ^.\w:${NAME}(#|>)\s/show router bgp routes\s\S+ -> Continue + ^\w:\S+(#|>)\s/show router bgp routes\s\S+ -> Continue + ^.\w:\S+(#|>)\s/show router bgp routes\s\S+ -> Continue ^\sBGP\sRouter\sID:${BGP_Router_ID}\s+AS:${AS}\s+Local\sAS:${Local_AS} -> Continue.Record ^${Flag}\s+${Network}\s+${LocalPref}\s+${MED} ^\s+${Next_Hop}\s+${Path_id}\s+${Label} diff --git a/Templates/nokia_sros_show_router_bgp_routes_varIPMask_varFamily_detail.template b/Templates/nokia_sros_show_router_bgp_routes_varIPMask_varFamily_detail.template index b64cdcd..b152d67 100644 --- a/Templates/nokia_sros_show_router_bgp_routes_varIPMask_varFamily_detail.template +++ b/Templates/nokia_sros_show_router_bgp_routes_varIPMask_varFamily_detail.template @@ -2,7 +2,6 @@ #Variables Router_Name family IP_Prefix_Mask family AS Local_AS Attributes Network Nexthop Route_Dist VPN_Label Path_Id From Res_Nexthop Local_Pref Interface_Name Aggregator_AS Aggregator Atomic_Aggr MED AIGP_Metric Connector Community Cluster Originator_Id Peer_Router_Id Fwd_Class Priority Flags Route_Source AS_Path Route_Tag Neighbor_AS Orig_Validation Source_Class Dest_Class Add_Paths_Send VPRN_Imported #Autor Manuel Saldivar manuelsaldivar@outlook.com.ar #Notes: If you try to execute on the same proof family label-ipv4 and vpn-ipv4 maybe will have some errors with the value VPRN_Imported, because label-ipv4 don't have this value, I recommend execute the proof separated, or execute first vpn-ipv4 and then label-ipv4 for best results. -Value Filldown NAME (\S+) Value Filldown IP_Prefix_Mask ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}/[0-9]{1,2}) Value Filldown family (\S+) Value Filldown BGP_Router_ID ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}) @@ -43,8 +42,8 @@ Value Fillup,Key VPRN_Imported (\S+) Start - ^\w:${NAME}(#|>)\s/show router bgp routes\s${IP_Prefix_Mask}\s${family}\sdetail -> Continue - ^.\w:${NAME}(#|>)\s/show router bgp routes\s${IP_Prefix_Mask}\s${family}\sdetail -> Continue + ^\w:\S+(#|>)\s/show router bgp routes\s${IP_Prefix_Mask}\s${family}\sdetail -> Continue + ^.\w:\S+(#|>)\s/show router bgp routes\s${IP_Prefix_Mask}\s${family}\sdetail -> Continue ^\s+BGP\sRouter\sID:${BGP_Router_ID}\s+AS:${AS}\s+Local\sAS:${Local_AS} ^${Attributes} ^Network\s+:\s${Network} diff --git a/Templates/nokia_sros_show_router_bgp_summary.template b/Templates/nokia_sros_show_router_bgp_summary.template index 609ad65..828c52d 100755 --- a/Templates/nokia_sros_show_router_bgp_summary.template +++ b/Templates/nokia_sros_show_router_bgp_summary.template @@ -1,8 +1,8 @@ #Command: /show router bgp summary #Description: This template is used to see BGP summary -#Variables: Router_Name BGP_ROUTER_ID BGP_AS BGP_LOCAL_AS BGP_ADMIN_STATE BGP_OPER_STATE BGP_TOTAL_PEERS_GROUPS BGP_TOTAL_PEERS BGP_NEIGHBOR NEIGHBOR_NAME BGP_STATE BGP_STATUS_NEIGHBOR #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) +#filterAction:exclude +#filterColumns: Value BGP_ROUTER_ID ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}) Value BGP_AS ([0-9]{1,1500}) Value BGP_LOCAL_AS ([0-9]{1,1500}) @@ -16,8 +16,8 @@ Value Required BGP_STATE (\S+) Value BGP_STATUS_NEIGHBOR (\S+) Start - ^\w:${NAME}(#|>) /show router bgp summary - ^.\w:${NAME}(#|>) /show router bgp summary + ^\w:\S+(#|>) /show router bgp summary + ^.\w:\S+(#|>) /show router bgp summary ^\sBGP\sRouter\sID:${BGP_ROUTER_ID}\s+AS:${BGP_AS}\s+Local\sAS:${BGP_LOCAL_AS} ^BGP\sAdmin\sState\s+:\s${BGP_ADMIN_STATE}\s+BGP\sOper\sState\s+:\s${BGP_OPER_STATE} ^Total\sPeer\sGroups\s+:\s${BGP_TOTAL_PEERS_GROUPS}\s+Total\sPeers\s+:\s${BGP_TOTAL_PEERS} diff --git a/Templates/nokia_sros_show_router_interface.template b/Templates/nokia_sros_show_router_interface.template index 7bd180e..974d551 100755 --- a/Templates/nokia_sros_show_router_interface.template +++ b/Templates/nokia_sros_show_router_interface.template @@ -2,7 +2,8 @@ #Description: This template is used to see the interfaces over plane Base #Variables: Router_Name INTERFACE_NAME PLANE INTERFACE_ADM INTERFACE_OPR_IPV4 INTERFACE_OPR_IPV6 INTERFACE_MODE INTERFACE_PORT INTERFACE_IP #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) +#filterAction: exclude +#filterColumns: Value Required INTERFACE_NAME (\S+) Value Filldown PLANE (Base) Value Required INTERFACE_ADM ([uU][pP]|[Dd][oO][wW][nN]) @@ -13,8 +14,8 @@ Value Required INTERFACE_PORT (\d{1,2}\/\d{1,2}\/\d{1,2}|\S+) Value Required INTERFACE_IP ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}/[0-9]{1,2}) Start - ^\w:${NAME}(#|>) /show router interface - ^.\w:${NAME}(#|>) /show router interface + ^\w:\S+(#|>) /show router interface + ^.\w:\S+(#|>) /show router interface ^Interface\sTable\s.Router.\s${PLANE}. ^${INTERFACE_NAME}\s+${INTERFACE_ADM}\s+${INTERFACE_OPR_IPV4}.${INTERFACE_OPR_IPV6}\s+${INTERFACE_MODE}\s+${INTERFACE_PORT} -> Continue ^\s+${INTERFACE_IP} -> Record diff --git a/Templates/nokia_sros_show_router_ldp_bindings_and_show_router-table.template b/Templates/nokia_sros_show_router_ldp_bindings_and_show_router-table.template index c1207d5..09d3501 100755 --- a/Templates/nokia_sros_show_router_ldp_bindings_and_show_router-table.template +++ b/Templates/nokia_sros_show_router_ldp_bindings_and_show_router-table.template @@ -2,12 +2,11 @@ #Description: This template is used to see the number of routes and active ldp bindings #Variables: Router_Name NO_PREFIX_ACTIVE_BINDINGS NO_OF_ROUTES #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Fillup NAME (\S+) Value NO_PREFIX_ACTIVE_BINDINGS ([0-9]{0,12}) Value NO_OF_ROUTES ([0-9]{0,12}) Start - ^\w:${NAME}(#|>) /show router route-table | match No - ^.\w:${NAME}(#|>) /show router route-table | match No + ^\w:\S+(#|>) /show router route-table | match No + ^.\w:\S+(#|>) /show router route-table | match No ^No.\sof\sPrefix\sActive\sBindings:\s${NO_PREFIX_ACTIVE_BINDINGS} ^No.\sof\sRoutes:\s${NO_OF_ROUTES} <- Record diff --git a/Templates/nokia_sros_show_router_ldp_bindings_match_no_active_bindings.template b/Templates/nokia_sros_show_router_ldp_bindings_match_no_active_bindings.template index 364259c..f05633d 100755 --- a/Templates/nokia_sros_show_router_ldp_bindings_match_no_active_bindings.template +++ b/Templates/nokia_sros_show_router_ldp_bindings_match_no_active_bindings.template @@ -2,12 +2,11 @@ #Description: This template is used to see number of prefix active ldp bindings #Variables: Router_Name NO_PREFIX_ACTIVE_BINDINGS #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required NO_PREFIX_ACTIVE_BINDINGS ([0-9]{0,12}) Start - ^\w:${NAME}(#|>) /show router ldp bindings active | match No -> Record - ^.\w:${NAME}(#|>) /show router ldp bindings active | match No -> Continue.Record + ^\w:\S+(#|>) /show router ldp bindings active | match No -> Record + ^.\w:\S+(#|>) /show router ldp bindings active | match No -> Continue.Record ^\sNo.\sof\sPrefix\sActive\sBindings:\s${NO_PREFIX_ACTIVE_BINDINGS} ^No.\sof\sPrefix\sActive\sBindings:\s${NO_PREFIX_ACTIVE_BINDINGS} ^\sNo.\sof\sIPv4\sPrefix\sActive\sBindings:\s${NO_PREFIX_ACTIVE_BINDINGS} diff --git a/Templates/nokia_sros_show_router_ldp_interface_detail.template b/Templates/nokia_sros_show_router_ldp_interface_detail.template index 765e96c..b33ca3b 100755 --- a/Templates/nokia_sros_show_router_ldp_interface_detail.template +++ b/Templates/nokia_sros_show_router_ldp_interface_detail.template @@ -2,7 +2,6 @@ #Description: This template is used to see detail of ldp interface #Variables: Router_Name Interface Admin_State Oper_State IPv4_Admin_State IPv4_Oper_State Transport_Addr Active_Adjacencies Local_LSR_Type Local_LSR #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Key,Required Interface (\S+) Value Admin_State ([uU][pP]|[Dd][oO][wW][nN]) Value Oper_State ([uU][pP]|[Dd][oO][wW][nN]) @@ -14,8 +13,8 @@ Value Local_LSR_Type (\S+) Value Local_LSR (\S+) Start - ^\w:${NAME}(#|>) /show router ldp interface detail - ^.\w:${NAME}(#|>) /show router ldp interface detail + ^\w:\S+(#|>) /show router ldp interface detail + ^.\w:\S+(#|>) /show router ldp interface detail ^Interface\s${Interface} ^Admin\sState\s+:\s${Admin_State}\s+Oper\sState\s+:\s${Oper_State} ^IPv4\sAdmin\sState\s+:\s${IPv4_Admin_State}\s+IPv4\sOper\sState\s+:\s${IPv4_Oper_State} diff --git a/Templates/nokia_sros_show_router_ldp_session.template b/Templates/nokia_sros_show_router_ldp_session.template index 52e8f46..73fdfb2 100755 --- a/Templates/nokia_sros_show_router_ldp_session.template +++ b/Templates/nokia_sros_show_router_ldp_session.template @@ -2,7 +2,6 @@ #Description: This template is used to see ldp session #Variables: Router_Name PEER_LDP_ID ADJ_TYPE STATE MSG_SENT MSG_RECV UP_TIME #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required PEER_LDP_ID ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}.[0-9]{1,2}) Value Required ADJ_TYPE (\S+) Value Required STATE (\S+) @@ -11,7 +10,7 @@ Value Required MSG_RECV (\S+) Value Required UP_TIME ([0-9]{1,10}\S+\s[0-9]{2}.[0-9]{2}.[0-9]{2}) Start - ^\w:${NAME}(#|>) /show router ldp session - ^.\w:${NAME}(#|>) /show router ldp session + ^\w:\S+(#|>) /show router ldp session + ^.\w:\S+(#|>) /show router ldp session ^${PEER_LDP_ID}\s+${ADJ_TYPE}\s+${STATE}\s+${MSG_SENT}\s+${MSG_RECV}\s+${UP_TIME} -> Continue.Record diff --git a/Templates/nokia_sros_show_router_ldp_status.template b/Templates/nokia_sros_show_router_ldp_status.template index 3b56724..57a29dd 100755 --- a/Templates/nokia_sros_show_router_ldp_status.template +++ b/Templates/nokia_sros_show_router_ldp_status.template @@ -2,10 +2,9 @@ #Description: This template is used to see the redistribute and export policies in ldp lsr #Variables: Router_Name Export_Policies #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required Export_Policies (redistribute-loopback0|export-loopback0) Start - ^\w:${NAME}(#|>) /show router ldp status - ^.\w:${NAME}(#|>) /show router ldp status + ^\w:\S+(#|>) /show router ldp status + ^.\w:\S+(#|>) /show router ldp status ^\s+\S+\s+${Export_Policies} diff --git a/Templates/nokia_sros_show_router_ospf_interface.template b/Templates/nokia_sros_show_router_ospf_interface.template index 3011807..8b86a69 100755 --- a/Templates/nokia_sros_show_router_ospf_interface.template +++ b/Templates/nokia_sros_show_router_ospf_interface.template @@ -2,7 +2,6 @@ #Description: This template is used to see interface OSPF and interface OSPF over other instance (not only 0) #Variables: Router_Name INSTANCE INTERFACE_NAME AREA_ID DESIGNATED_RTR BKUP_DESIG_RTR ADM OPER #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Filldown INSTANCE (\S+) Value Key,Required INTERFACE_NAME (\S+) Value AREA_ID ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}) @@ -12,10 +11,10 @@ Value ADM ([uU][pP]|[Dd][oO][wW][nN]) Value OPER (\w{1,4}) Start - ^\w:${NAME}(#|>) /show router ospf interface - ^.\w:${NAME}(#|>) /show router ospf interface - ^\w:${NAME}(#|>) /show router ospf\s${INSTANCE} interface - ^.\w:${NAME}(#|>) /show router ospf\s${INSTANCE} interface + ^\w:\S+(#|>) /show router ospf interface + ^.\w:\S+(#|>) /show router ospf interface + ^\w:\S+(#|>) /show router ospf\s${INSTANCE} interface + ^.\w:\S+(#|>) /show router ospf\s${INSTANCE} interface ^Rtr Base OSPFv2 Instance\s${INSTANCE} Interfaces ^OSPFv2 .${INSTANCE}. all interfaces ^${INTERFACE_NAME}\s+${AREA_ID}\s+${DESIGNATED_RTR}\s+${BKUP_DESIG_RTR}\s+${ADM}\s+${OPER} -> Record diff --git a/Templates/nokia_sros_show_router_ospf_neighbor.template b/Templates/nokia_sros_show_router_ospf_neighbor.template index ecce684..1355629 100755 --- a/Templates/nokia_sros_show_router_ospf_neighbor.template +++ b/Templates/nokia_sros_show_router_ospf_neighbor.template @@ -2,7 +2,6 @@ #Description: This template is used to see OSPF's neighbor in all instance if you invoke instance from command #Variables: Router_Name INSTANCE INTERFACE_NAME RTR_ID STATE PRI RETXQ TTL AREA_ID #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Filldown INSTANCE (\S+) Value Required INTERFACE_NAME (\S+) Value Required RTR_ID ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}) @@ -13,10 +12,10 @@ Value Required TTL ([0-9]{1,10}) Value AREA_ID ([0][.][0][.][0-9]{1,3}[.][0-9]{1,3}) Start - ^\w:${NAME}(#|>) /show router ospf neighbor - ^.\w:${NAME}(#|>) /show router ospf neighbor - ^\w:${NAME}(#|>) /show router ospf\s${INSTANCE} neighbor - ^.\w:${NAME}(#|>) /show router ospf\s${INSTANCE} neighbor + ^\w:\S+(#|>) /show router ospf neighbor + ^.\w:\S+(#|>) /show router ospf neighbor + ^\w:\S+(#|>) /show router ospf\s${INSTANCE} neighbor + ^.\w:\S+(#|>) /show router ospf\s${INSTANCE} neighbor ^Rtr Base OSPFv2 Instance\s${INSTANCE} Neighbors ^OSPFv2 .${INSTANCE}. all neighbors ^${INTERFACE_NAME}\s+${RTR_ID}\s+${STATE}\s+${PRI}\s+${RETXQ}\s+${TTL} -> Continue diff --git a/Templates/nokia_sros_show_router_policy.template b/Templates/nokia_sros_show_router_policy.template index cb43682..d000417 100755 --- a/Templates/nokia_sros_show_router_policy.template +++ b/Templates/nokia_sros_show_router_policy.template @@ -2,10 +2,9 @@ #Description: This template is used to see policies seamless redistribute_loopback0 export_to_BGP_areaXXXX aigpImportToBGPxxx export_to_BGP_LU export_loopback0 this comman was created for specific configuration #Variables: Router_Name policy #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required policy (seamless.+|redistribute.loopback0|export_to_BGP_area.+|aigpImportToBGP.+|export.to.BGP.LU|export.loopback0) Start - ^\w:${NAME}(#|>) /show router policy community - ^.\w:${NAME}(#|>) /show router policy community + ^\w:\S+(#|>) /show router policy community + ^.\w:\S+(#|>) /show router policy community ^${policy} -> Record diff --git a/Templates/nokia_sros_show_router_policy_community.template b/Templates/nokia_sros_show_router_policy_community.template index ba90060..1d5b1d0 100755 --- a/Templates/nokia_sros_show_router_policy_community.template +++ b/Templates/nokia_sros_show_router_policy_community.template @@ -2,10 +2,9 @@ #Description: This template is used to see community policies and name start with seamless, this template was created for specific configuration #Variables: Router_Name community #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required community (seamless.+) Start - ^\w:${NAME}(#|>)\s/show router policy community - ^.\w:${NAME}(#|>)\s/show router policy community + ^\w:\S+(#|>)\s/show router policy community + ^.\w:\S+(#|>)\s/show router policy community ^${community} -> Record diff --git a/Templates/nokia_sros_show_router_policy_community_members.template b/Templates/nokia_sros_show_router_policy_community_members.template index 3a61b7b..256aeda 100755 --- a/Templates/nokia_sros_show_router_policy_community_members.template +++ b/Templates/nokia_sros_show_router_policy_community_members.template @@ -2,11 +2,10 @@ #Description: This template is used to see the community members #Variables: Router_Name Community Members #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required Community (.+) Value Required Members (.+) Start - ^\w:${NAME}(#|>)\s/show router policy community\s\S+ -> Continue.Record - ^.\w:${NAME}(#|>)\s/show router policy community\s\S+ -> Continue.Record + ^\w:\S+(#|>)\s/show router policy community\s\S+ -> Continue.Record + ^.\w:\S+(#|>)\s/show router policy community\s\S+ -> Continue.Record ^community\s"${Community}"\smembers\s"${Members}" -> Continue.Record diff --git a/Templates/nokia_sros_show_router_policy_policy_statement.template b/Templates/nokia_sros_show_router_policy_policy_statement.template index 984b941..bf998f3 100755 --- a/Templates/nokia_sros_show_router_policy_policy_statement.template +++ b/Templates/nokia_sros_show_router_policy_policy_statement.template @@ -2,12 +2,11 @@ #Description: This template is used to see entry of policy statement, this template was created for specific configuration #Variables: Router_Name Policy_Statement entry #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Filldown Policy_Statement (\S+) Value Required entry (\d+) Start - ^\w:${NAME}(#|>)\s/show router policy\s${Policy_Statement} -> Continue.Record - ^.\w:${NAME}(#|>)\s/show router policy\s${Policy_Statement} -> Continue.Record + ^\w:\S+(#|>)\s/show router policy\s${Policy_Statement} -> Continue.Record + ^.\w:\S+(#|>)\s/show router policy\s${Policy_Statement} -> Continue.Record ^\s+entry\s${entry} -> Continue.Record diff --git a/Templates/nokia_sros_show_router_policy_prefix-list.template b/Templates/nokia_sros_show_router_policy_prefix-list.template index 2693747..ef6aa12 100755 --- a/Templates/nokia_sros_show_router_policy_prefix-list.template +++ b/Templates/nokia_sros_show_router_policy_prefix-list.template @@ -2,11 +2,10 @@ #Description: This template is used to see policies prefix-list for loopback0 and system #Variables: Router_Name prefix_list prefix #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required prefix_list (loopback0|system) Value prefix ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}/[0-9]{1,2}) Start - ^\w:${NAME}(#|>)\s/show\srouter\spolicy\sprefix-list\s${prefix_list} - ^.\w:${NAME}(#|>)\s/show\srouter\spolicy\sprefix-list\s${prefix_list} + ^\w:\S+(#|>)\s/show\srouter\spolicy\sprefix-list\s${prefix_list} + ^.\w:\S+(#|>)\s/show\srouter\spolicy\sprefix-list\s${prefix_list} ^prefix\s${prefix}\sexact -> Record diff --git a/Templates/nokia_sros_show_router_varVPRN_op_bgp_neighbor_varIP_neighbor_varFamily_received_routes.template b/Templates/nokia_sros_show_router_varVPRN_op_bgp_neighbor_varIP_neighbor_varFamily_received_routes.template index f0da87a..26de146 100644 --- a/Templates/nokia_sros_show_router_varVPRN_op_bgp_neighbor_varIP_neighbor_varFamily_received_routes.template +++ b/Templates/nokia_sros_show_router_varVPRN_op_bgp_neighbor_varIP_neighbor_varFamily_received_routes.template @@ -1,7 +1,6 @@ #Command: /show router |\d+ bgp neighbor \S+ \S+ received-routes #Variables Router_Name VPRN IP_neighbor family BGP_Router_ID AS Local_AS Flag Network LocalPref MED Next_Hop Path_id Label As_Path #Autor Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Key,Filldown VPRN (\s|\S+) Value Filldown IP_neighbor ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}) Value Filldown family (\S+) @@ -18,10 +17,10 @@ Value Label (\S+) Value As_Path (\S+\s\S+|\S+) Start - ^\w:${NAME}(#|>)\s/show router ${VPRN} bgp neighbor ${IP_neighbor} ${family} received-routes -> Continue - ^.\w:${NAME}(#|>)\s/show router ${VPRN} bgp neighbor ${IP_neighbor} ${family} received-routes -> Continue - ^\w:${NAME}(#|>)\s/show router bgp neighbor ${IP_neighbor} ${family} received-routes -> Continue - ^.\w:${NAME}(#|>)\s/show router bgp neighbor ${IP_neighbor} ${family} received-routes -> Continue + ^\w:\S+(#|>)\s/show router ${VPRN} bgp neighbor ${IP_neighbor} ${family} received-routes -> Continue + ^.\w:\S+(#|>)\s/show router ${VPRN} bgp neighbor ${IP_neighbor} ${family} received-routes -> Continue + ^\w:\S+(#|>)\s/show router bgp neighbor ${IP_neighbor} ${family} received-routes -> Continue + ^.\w:\S+(#|>)\s/show router bgp neighbor ${IP_neighbor} ${family} received-routes -> Continue ^\sBGP\sRouter\sID:${BGP_Router_ID}\s+AS:${AS}\s+Local\sAS:${Local_AS} -> Continue.Record ^${Flag}\s+${Network}\s+${LocalPref}\s+${MED} ^\s+${Next_Hop}\s+${Path_id}\s+${Label} diff --git a/Templates/nokia_sros_show_router_vprnBase_route-table.template b/Templates/nokia_sros_show_router_vprnBase_route-table.template index 1b2c8b7..25bdc52 100755 --- a/Templates/nokia_sros_show_router_vprnBase_route-table.template +++ b/Templates/nokia_sros_show_router_vprnBase_route-table.template @@ -2,7 +2,6 @@ #Description: This template is used to see routes Base and VPRN #Variables: Router_Name Service Dest_Prefix Type Proto Age Pref Next_Hop NO_OF_ROUTES #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Filldown Service ([0-9]{1,12}|Base) Value Required Dest_Prefix ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}/[0-9]{1,2}\s+\S+|[0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}/[0-9]{1,2}) Value Type (\S+) @@ -13,8 +12,8 @@ Value Required Next_Hop ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}\s+.\S Value Fillup NO_OF_ROUTES (\S+) Start - ^\w:${NAME}(#|>)\s/show\srouter\s|\S+\sroute-table -> Continue - ^.\w:${NAME}(#|>)\s/show\srouter\s|\S+\sroute-table -> Continue + ^\w:\S+(#|>)\s/show\srouter\s|\S+\sroute-table -> Continue + ^.\w:\S+(#|>)\s/show\srouter\s|\S+\sroute-table -> Continue ^Route\sTable\s.(Service:|Router:)\s${Service}. -> Continue.Record ^${Dest_Prefix}\s+${Type}\s+${Proto}\s+${Age}\s+${Pref} ^\s+${Next_Hop} -> Continue.Record diff --git a/Templates/nokia_sros_show_router_vprnBase_router-table_match_no_routes.template b/Templates/nokia_sros_show_router_vprnBase_router-table_match_no_routes.template index 42179c3..5e8ce0b 100755 --- a/Templates/nokia_sros_show_router_vprnBase_router-table_match_no_routes.template +++ b/Templates/nokia_sros_show_router_vprnBase_router-table_match_no_routes.template @@ -2,13 +2,12 @@ #Description: This template is used to see the number of routes Base and VPRN #Variables: Router_Name Service NO_OF_ROUTES #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Service (\S+) Value Required NO_OF_ROUTES ([0-9]{0,10}|Invalid) Start - ^\w:${NAME}(#|>) /show\srouter\s\S+\sroute-table | match No. - ^.\w:${NAME}(#|>) /show\srouter\s\S+\sroute-table | match No. + ^\w:\S+(#|>) /show\srouter\s\S+\sroute-table | match No. + ^.\w:\S+(#|>) /show\srouter\s\S+\sroute-table | match No. ^/show\srouter\s${Service}\sroute-table | match No. ^MINOR: CLI ${NO_OF_ROUTES} router \S+. -> Record ^No.\sof\sRoutes:\s${NO_OF_ROUTES} -> Record diff --git a/Templates/nokia_sros_show_router_vprn_interface.template b/Templates/nokia_sros_show_router_vprn_interface.template index 73f499d..6a77a4e 100755 --- a/Templates/nokia_sros_show_router_vprn_interface.template +++ b/Templates/nokia_sros_show_router_vprn_interface.template @@ -2,7 +2,6 @@ #Description: This template is used to see VPRN interfaces #Variables: Router_Name INTERFACE_NAME VPRN INTERFACE_ADM INTERFACE_OPR_IPV4 INTERFACE_OPR_IPV6 INTERFACE_MODE INTERFACE_PORT INTERFACE_IP #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required INTERFACE_NAME (\S+) Value Filldown VPRN (\S+) Value Required INTERFACE_ADM ([uU][pP]|[Dd][oO][wW][nN]) @@ -13,8 +12,8 @@ Value INTERFACE_PORT (\S+) Value Required INTERFACE_IP ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}/[0-9]{1,2}) Start - ^\w:${NAME}(#|>) /show router ${VPRN} interface - ^.\w:${NAME}(#|>) /show router ${VPRN} interface + ^\w:\S+(#|>) /show router ${VPRN} interface + ^.\w:\S+(#|>) /show router ${VPRN} interface ^Interface\sTable\s.Service.\s${VPRN}. ^${INTERFACE_NAME}\s+${INTERFACE_ADM}\s+${INTERFACE_OPR_IPV4}.${INTERFACE_OPR_IPV6}\s+${INTERFACE_MODE}\s+${INTERFACE_PORT} -> Continue ^\s+${INTERFACE_IP} -> Record diff --git a/Templates/nokia_sros_show_service_id_all.template b/Templates/nokia_sros_show_service_id_all.template index 796d7f5..ca8bd4a 100755 --- a/Templates/nokia_sros_show_service_id_all.template +++ b/Templates/nokia_sros_show_service_id_all.template @@ -2,15 +2,14 @@ #Description: This template is used to see the state of service id and auto-bind resolution configuration #Variables: Router_Name Service_ID_INIT Type_Local Type_Remote Admin_State_Local Admin_State_Remoto Oper_State_Local Admin_State_Remoto Service_MTU_Local Service_MTU_Remoto IP_Interface_State Actual_IP_Addr_Local Actual_IP_Addr_Remoto SDP_Path_Used_Local SDP_ID_Local SDP_ID_Remoto SDP_Admin_State_Local SDP_Admin_State_Remoto SDP_Oper_State_Local SDP_Oper_State_Remoto Binding_VC_ID_Local Binding_VC_ID_Remoto Request_Result #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required id (\S+) Value Admin_State ([uU][pP]|[Dd][oO][wW][nN]) Value Oper_State ([uU][pP]|[Dd][oO][wW][nN]) Value Required AutoBind (\S+) Start - ^\w:${NAME}(#|>) /show service id\s\S+ all -> Continue - ^.\w:${NAME}(#|>) /show service id\s\S+ all -> Continue + ^\w:\S+(#|>) /show service id\s\S+ all -> Continue + ^.\w:\S+(#|>) /show service id\s\S+ all -> Continue ^Service\sId\s+:\s${id} ^Admin\sState\s+:\s${Admin_State}\s+Oper\sState\s+:\s${Oper_State} -> Continue ^Max\sIPv4\sRoutes\s+:\s\S+\sLimit\s+Auto\sBind\s+:\s${AutoBind} -> Continue.Record diff --git a/Templates/nokia_sros_show_service_sap-using.template b/Templates/nokia_sros_show_service_sap-using.template index 64acff1..217dfd9 100644 --- a/Templates/nokia_sros_show_service_sap-using.template +++ b/Templates/nokia_sros_show_service_sap-using.template @@ -2,7 +2,6 @@ #Description: This template is used to see sap's services, their status and configuration #Variables: Router_Name PortId SvcId IngQoS IngFltr EgrQoS EgrFltr Adm Opr #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required PortId (\S+) Value Required SvcId ([0-9]{1,15}) Value Required IngQoS (\S+) @@ -13,8 +12,8 @@ Value Required Adm ([uU][pP]|[Dd][oO][wW][nN]) Value Required Opr ([uU][pP]|[Dd][oO][wW][nN]) Start - ^\w:${NAME}(#|>) /show service sap-using - ^.\w:${NAME}(#|>) /show service sap-using + ^\w:\S+(#|>) /show service sap-using + ^.\w:\S+(#|>) /show service sap-using ^${PortId}\s+${SvcId}\s+${IngQoS}\s+${IngFltr}\s+${EgrFltr}\s+${Adm}\s+${Opr} -> Record ^${PortId}\s+${SvcId}\s+${IngQoS}\s+${IngFltr}\s+${EgrQoS}\s+${EgrFltr}\s+${Adm}\s+${Opr} -> Record diff --git a/Templates/nokia_sros_show_service_sdp-using.template b/Templates/nokia_sros_show_service_sdp-using.template index 515265c..ec77eab 100755 --- a/Templates/nokia_sros_show_service_sdp-using.template +++ b/Templates/nokia_sros_show_service_sdp-using.template @@ -2,7 +2,6 @@ #Description: This template is used to see sdp-using #Variables: Router_Name SDP_SVC_ID SDP_IDU SDP_TYPE SDP_FAR_END SDP_OPR_STATE #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required SDP_SVC_ID ([0-9]{1,12}) Value Required SDP_IDU ([0-9]{1,12}:[0-9]{1,12}) Value Required SDP_TYPE (\S+) @@ -10,8 +9,8 @@ Value Required SDP_FAR_END ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}) Value Required SDP_OPR_STATE ([uU][pP]|[Dd][oO][wW][nN]) Start - ^\w:${NAME}(#|>) /show service sdp-using - ^.\w:${NAME}(#|>) /show service sdp-using + ^\w:\S+(#|>) /show service sdp-using + ^.\w:\S+(#|>) /show service sdp-using ^${SDP_SVC_ID}\s+${SDP_IDU}\s+${SDP_TYPE}\s+${SDP_FAR_END}\s+${SDP_OPR_STATE} -> Record EOF diff --git a/Templates/nokia_sros_show_service_sdp.template b/Templates/nokia_sros_show_service_sdp.template index fc9bb08..4934597 100755 --- a/Templates/nokia_sros_show_service_sdp.template +++ b/Templates/nokia_sros_show_service_sdp.template @@ -2,7 +2,6 @@ #Description: This template is used to see sdp service #Variables: Router_Name SDP_ID ADM_MTU OPR_MTU FAR_END ADM_SDP OPR_SDP DEL LSP SIG #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required SDP_ID ([0-9]{1,10}) Value Required ADM_MTU ([0-9]{1,10}) Value Required OPR_MTU ([0-9]{1,10}) @@ -14,8 +13,8 @@ Value Required LSP (\S+.\S+|\S+) Value Required SIG (\S+) Start - ^\w:${NAME}(#|>) /show service sdp - ^.\w:${NAME}(#|>) /show service sdp + ^\w:\S+(#|>) /show service sdp + ^.\w:\S+(#|>) /show service sdp ^${SDP_ID}\s+${ADM_MTU}\s+${OPR_MTU}\s+${FAR_END}\s+${ADM_SDP}\s+${OPR_SDP}\s+${DEL}\s+${LSP}\s+${SIG} -> Record EOF diff --git a/Templates/nokia_sros_show_service_sdp_detail.template b/Templates/nokia_sros_show_service_sdp_detail.template index e81f98c..337d03d 100755 --- a/Templates/nokia_sros_show_service_sdp_detail.template +++ b/Templates/nokia_sros_show_service_sdp_detail.template @@ -2,7 +2,6 @@ #Description: This template is used to see the detail of sdp service #Variables: Router_Name sdp_id Far_End LSP_Types Admin_State Oper_State Signaling Mixed_LSP_Mode Active_LSP_Type #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required sdp_id (\S+) Value Far_End ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}) Value LSP_Types (\S+|\S+.\S+) @@ -13,8 +12,8 @@ Value Mixed_LSP_Mode (\S+) Value Active_LSP_Type (\S+) Start - ^\w:${NAME}(#|>) /show service sdp detail -> Continue - ^.\w:${NAME}(#|>) /show service sdp detail -> Continue + ^\w:\S+(#|>) /show service sdp detail -> Continue + ^.\w:\S+(#|>) /show service sdp detail -> Continue ^SDP\sId\s+:\s${sdp_id} ^Far\sEnd\s+:\s${Far_End} -> Continue ^LSP\sTypes\s+:\s${LSP_Types} -> Continue diff --git a/Templates/nokia_sros_show_service_sdp_detail_system.template b/Templates/nokia_sros_show_service_sdp_detail_system.template index a411cb3..702de6c 100755 --- a/Templates/nokia_sros_show_service_sdp_detail_system.template +++ b/Templates/nokia_sros_show_service_sdp_detail_system.template @@ -3,7 +3,6 @@ #Variables: System Router_Name sdp_id Far_End LSP_Types Admin_State Oper_State Signaling Mixed_LSP_Mode Active_LSP_Type #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar Value Filldown System ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}) -Value Filldown NAME (\S+) Value Required sdp_id (\S+) Value Far_End ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}) Value LSP_Types (\S+|\S+.\S+) @@ -15,8 +14,8 @@ Value Active_LSP_Type (\S+) Start ^\s+${System}/32 - ^\w:${NAME}(#|>) /show service sdp ${sdp_id} detail -> Continue - ^.\w:${NAME}(#|>) /show service sdp ${sdp_id} detail -> Continue + ^\w:\S+(#|>) /show service sdp ${sdp_id} detail -> Continue + ^.\w:\S+(#|>) /show service sdp ${sdp_id} detail -> Continue ^Far\sEnd\s+:\s${Far_End} -> Continue ^LSP\sTypes\s+:\s${LSP_Types} -> Continue ^Admin\sState\s+:\s${Admin_State}\s+Oper\sState\s+:\s${Oper_State} -> Continue diff --git a/Templates/nokia_sros_show_service_service-using.template b/Templates/nokia_sros_show_service_service-using.template index 72f28fa..09b36b1 100755 --- a/Templates/nokia_sros_show_service_service-using.template +++ b/Templates/nokia_sros_show_service_service-using.template @@ -2,7 +2,6 @@ #Description: This template is used to see service-using #Variables: Router_Name ServiceId Type Adm Opr CustomerId #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required ServiceId ([0-9]{1,15}) Value Type (\S+) Value Adm ([uU][pP]|[Dd][oO][wW][nN]) @@ -10,6 +9,6 @@ Value Opr ([uU][pP]|[Dd][oO][wW][nN]) Value CustomerId ([0-9]{1,15}) Start - ^\w:${NAME}(#|>) /show service service-using - ^.\w:${NAME}(#|>) /show service service-using + ^\w:\S+(#|>) /show service service-using + ^.\w:\S+(#|>) /show service service-using ^${ServiceId}\s+${Type}\s+${Adm}\s+${Opr}\s+${CustomerId} -> Record diff --git a/Templates/nokia_sros_show_system_cpu.template b/Templates/nokia_sros_show_system_cpu.template index c85f4ad..23f8d21 100644 --- a/Templates/nokia_sros_show_system_cpu.template +++ b/Templates/nokia_sros_show_system_cpu.template @@ -1,7 +1,6 @@ #Command /show system cpu #Variables Router_Name CPU_Total_Time_uSec CPU_Usage_Total CPU_Idle_uSec CPU_Idle CPU_Usage_uSec CPU_Usage Port Busiest_Core_Utilization_uSec Busiest_Core_Utilization_Usage #Autor Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required CPU_Total_Time_uSec (\S+) Value Required CPU_Usage_Total (\S+) Value Required CPU_Idle_uSec (\S+) @@ -12,8 +11,8 @@ Value Required Busiest_Core_Utilization_uSec (\S+) Value Required Busiest_Core_Utilization_Usage (\S+) Start - ^\w:${NAME}(#|>) /show system cpu - ^.\w:${NAME}(#|>) /show system cpu + ^\w:\S+(#|>) /show system cpu + ^.\w:\S+(#|>) /show system cpu ^Total\s+${CPU_Total_Time_uSec}\s+${CPU_Usage_Total} ^\s+Idle\s+${CPU_Idle_uSec}\s+${CPU_Idle} ^\s+Usage\s+${CPU_Usage_uSec}\s+${CPU_Usage} diff --git a/Templates/nokia_sros_show_system_ntp.template b/Templates/nokia_sros_show_system_ntp.template index 57b36cd..b1295cf 100755 --- a/Templates/nokia_sros_show_system_ntp.template +++ b/Templates/nokia_sros_show_system_ntp.template @@ -2,7 +2,6 @@ #Description: This template is used to see router's ntp configuration #Variables: Router_Name Configured Stratum Admin_Status Oper_Status Server_Enabled Server_Authenticate Clock_Source Auth_Check Auth_Check MDA_Timestamp DateAndTime #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Configured (\S+) Value Stratum (\S+) Value Admin_Status ([uU][pP]|[Dd][oO][wW][nN]) @@ -15,8 +14,8 @@ Value MDA_Timestamp (\S+) Value Required DateAndTime (\S+.\S+.\S+\s\S+.\S+.\S+\s\S+) Start - ^\w:${NAME}(#|>) /show system ntp - ^.\w:${NAME}(#|>) /show system ntp + ^\w:\S+(#|>) /show system ntp + ^.\w:\S+(#|>) /show system ntp ^Configured\s+:\s${Configured}\s+Stratum\s+:\s${Stratum} ^Admin\sStatus\s+:\s${Admin_Status}\s+Oper\sStatus\s+:\s${Oper_Status} ^Server\sEnabled\s+:\s${Server_Enabled}\s+Server\sAuthenticate\s+:\s${Server_Authenticate} diff --git a/Templates/nokia_sros_show_system_ntp_peers.template b/Templates/nokia_sros_show_system_ntp_peers.template index 7ed51e8..4834726 100644 --- a/Templates/nokia_sros_show_system_ntp_peers.template +++ b/Templates/nokia_sros_show_system_ntp_peers.template @@ -2,11 +2,10 @@ #Description: This template is used to see ntp's clients #Variables: Router_Name ClientsNTP DateConection #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required ClientsNTP ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}) Value DateConection (\S+) Start - ^\w:${NAME}(#|>) /show system ntp peers - ^.\w:${NAME}(#|>) /show system ntp peers + ^\w:\S+(#|>) /show system ntp peers + ^.\w:\S+(#|>) /show system ntp peers ^\s+${ClientsNTP}\s+${DateConection}\s\S+ -> Continue.Record diff --git a/Templates/nokia_sros_show_system_ptp.template b/Templates/nokia_sros_show_system_ptp.template index 2a3ad31..6070ee3 100644 --- a/Templates/nokia_sros_show_system_ptp.template +++ b/Templates/nokia_sros_show_system_ptp.template @@ -2,7 +2,6 @@ #Description: This template is used to see ptp's phase configuration #Variables: Router_Name Clock_Type PTP_Profile Admin_State Oper_State Clock_id Clock_Class PTP_Recovery_State Last_Changed Frequency_Offset GM_Clock_Id GM_Clock_Class Frequency_Traceable Time_Traceable Time_Source #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required Clock_Type (\S+.\S+|\S+) Value PTP_Profile (\S+\s\S+) Value Admin_State ([uU][pP]|[Dd][oO][wW][nN]) @@ -19,10 +18,10 @@ Value Time_Traceable (\S+) Value Time_Source (\S+) Start - ^\w:${NAME}(#|>)\s/show\ssystem\sptp - ^.\w:${NAME}(#|>)\s/show\ssystem\sptp - ^\w:${NAME}(#|>)\s/show\ssystem\sptp\sclock\scsm - ^.\w:${NAME}(#|>)\s/show\ssystem\sptp\sclock\scsm + ^\w:\S+(#|>)\s/show\ssystem\sptp + ^.\w:\S+(#|>)\s/show\ssystem\sptp + ^\w:\S+(#|>)\s/show\ssystem\sptp\sclock\scsm + ^.\w:\S+(#|>)\s/show\ssystem\sptp\sclock\scsm ^Clock\sType\s+:\s${Clock_Type}\s+PTP\sProfile\s+:\s${PTP_Profile} ^Admin\sState\s+:\s${Admin_State}\s+Oper\sState\s+:\s${Oper_State} ^Clock\sId\s+:\s${Clock_id}\s+Clock\sClass\s+:\s${Clock_Class} diff --git a/Templates/nokia_sros_show_system_ptp_clock.template b/Templates/nokia_sros_show_system_ptp_clock.template index 9868ad5..74baaa1 100755 --- a/Templates/nokia_sros_show_system_ptp_clock.template +++ b/Templates/nokia_sros_show_system_ptp_clock.template @@ -2,7 +2,6 @@ #Description: This template is used to see ptp clock's configuration #Variables: Router_Name Nro_Clock Clock_Type Admin_State PTP_Profile Freq_Recovery_State Port Peer Slave Port_State #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Filldown Nro_Clock ([0-9]{1,2}) Value Filldown,Required Clock_Type (\S+.\S+|\S+) Value Filldown Admin_State ([uU][pP]|[Dd][oO][wW][nN]) @@ -14,8 +13,8 @@ Value Required Slave (\S+) Value Required Port_State (\S+) Start - ^\w:${NAME}(#|>)\s/show\ssystem\sptp\sclock\s${Nro_Clock} - ^.\w:${NAME}(#|>)\s/show\ssystem\sptp\sclock\s${Nro_Clock} + ^\w:\S+(#|>)\s/show\ssystem\sptp\sclock\s${Nro_Clock} + ^.\w:\S+(#|>)\s/show\ssystem\sptp\sclock\s${Nro_Clock} ^Clock\sType\s+:\s${Clock_Type}\s+Admin\sState\s+:\s${Admin_State} ^PTP\sProfile\s+:\s${PTP_Profile} ^Freq\sRecovery\sState\s+:\s${Freq_Recovery_State} diff --git a/Templates/nokia_sros_show_system_ptp_clock_1_detail.template b/Templates/nokia_sros_show_system_ptp_clock_1_detail.template index ceb7671..8ff305f 100755 --- a/Templates/nokia_sros_show_system_ptp_clock_1_detail.template +++ b/Templates/nokia_sros_show_system_ptp_clock_1_detail.template @@ -2,7 +2,6 @@ #Description: This template is used to see ptp clock's configuration detail #Variables: Router_Name CLOCK_TYPE ADMIN_STATE FREQ_RECOVERY_STATE ADMIN_STATUS OPER_STATUS #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required CLOCK_TYPE (\S+.\S+) Value ADMIN_STATE ([uU][pP]|[Dd][oO][wW][nN]) Value FREQ_RECOVERY_STATE (\S+) @@ -10,8 +9,8 @@ Value ADMIN_STATUS ([uU][pP]|[Dd][oO][wW][nN]) Value OPER_STATUS (\S+) Start - ^\w:${NAME}(#|>) /show system ptp clock 1 detail - ^.\w:${NAME}(#|>) /show system ptp clock 1 detail + ^\w:\S+(#|>) /show system ptp clock 1 detail + ^.\w:\S+(#|>) /show system ptp clock 1 detail ^Clock\sType\s+:\s${CLOCK_TYPE}\s+Admin\sState\s+:\s${ADMIN_STATE} -> Continue ^Freq\sRecovery\sState\s+:\s${FREQ_RECOVERY_STATE} -> Continue ^Admin\sStatus\s+:\s${ADMIN_STATUS}\s+Qualified\sFor\sUse\s+:\s${OPER_STATUS} -> Record diff --git a/Templates/nokia_sros_show_system_security_ssh.template b/Templates/nokia_sros_show_system_security_ssh.template index baa50a1..2226de4 100755 --- a/Templates/nokia_sros_show_system_security_ssh.template +++ b/Templates/nokia_sros_show_system_security_ssh.template @@ -2,7 +2,6 @@ #Description: This template is used to see the state of ssh protocol #Variables: Router_Name Administrative_State Operational_State Preserve_Key Key_re_exchange SSH_Protocol_Version_1 SSH_Protocol_Version_2 #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value NAME (\S+) Value Required Administrative_State (\S+) Value Operational_State (\S+) Value Preserve_Key (\S+) @@ -11,8 +10,8 @@ Value SSH_Protocol_Version_1 (\S+) Value Required SSH_Protocol_Version_2 (\S+) Start - ^\w:${NAME}(#|>) /show system security ssh - ^.\w:${NAME}(#|>) /show system security ssh + ^\w:\S+(#|>) /show system security ssh + ^.\w:\S+(#|>) /show system security ssh ^Administrative\sState\s+:\s${Administrative_State} ^Operational\sState\s+:\s${Operational_State} ^Preserve\sKey\s+:\s${Preserve_Key} diff --git a/Templates/nokia_sros_show_system_sync-if-timing.template b/Templates/nokia_sros_show_system_sync-if-timing.template index 71d6c81..75e48ef 100755 --- a/Templates/nokia_sros_show_system_sync-if-timing.template +++ b/Templates/nokia_sros_show_system_sync-if-timing.template @@ -2,7 +2,6 @@ #Description: This template is used to see the system sync if timing #Variables: Router_Name Status_CPM Ref_Input_Mode Quality_Level_Selection Ref_Select Sys_Quality_Level Ref_Order Ref_Order Ref_Input Admin_Status Rx_Quality_Level Qualified_For_Use Selected_For_Use Source_Port Source_PTP_Clock #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Status_CPM (\S+\s\S+|\S+) Value Ref_Input_Mode (\S+) Value Quality_Level_Selection (Enabled|Disabled) @@ -24,8 +23,8 @@ Value Key Source_PTP_Clock (\S+) Value Type (.+) Start - ^\w:${NAME}(#|>) /show system sync-if-timing - ^.\w:${NAME}(#|>) /show system sync-if-timing + ^\w:\S+(#|>) /show system sync-if-timing + ^.\w:\S+(#|>) /show system sync-if-timing ^System\sStatus\sCPM\s\w\s+:\s${Status_CPM} ^\s+Reference\sInput\sMode\s+:\s${Ref_Input_Mode} ^\s+Quality\sLevel\sSelection\s+:\s${Quality_Level_Selection} diff --git a/Templates/nokia_sros_show_system_time.template b/Templates/nokia_sros_show_system_time.template index 37b2cc5..50f72e7 100755 --- a/Templates/nokia_sros_show_system_time.template +++ b/Templates/nokia_sros_show_system_time.template @@ -2,7 +2,6 @@ #Description: This template is used to see system time configuration #Variables: Router_Name DateAndTime DST_Active Current_Zone Offset_from_UTC Non_DST_Zone Offset_from_UTC_ Zone_type Prefer_Local_Time Selected_Ref Selection_Time time_ref_prior Selected Ref_Type Qualified Ref_Id #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required DateAndTime (\S+.\S+.\S+\s\S+.\S+.\S+) Value DST_Active (\S+) Value Current_Zone (\S+) @@ -21,8 +20,8 @@ Value Ref_Id (\S+) Start - ^\w:${NAME}(#|>) /show system time - ^.\w:${NAME}(#|>) /show system time + ^\w:\S+(#|>) /show system time + ^.\w:\S+(#|>) /show system time ^Current\sDate\s&\sTime\s:\s${DateAndTime}\s+DST\sActive\s+:\s${DST_Active} ^Current\sZone\s+:\s${Current_Zone}\s+Offset\sfrom\sUTC\s+:\s${Offset_from_UTC} ^Non-DST\sZone\s+:\s${Non_DST_Zone}\s+Offset\sfrom\sUTC\s+:\s${Offset_from_UTC_} diff --git a/Templates/nokia_sros_system_location.template b/Templates/nokia_sros_system_location.template index 446889b..58105f2 100644 --- a/Templates/nokia_sros_system_location.template +++ b/Templates/nokia_sros_system_location.template @@ -2,10 +2,9 @@ #Description: This template is used to see system location #Variables: Router_Name Location #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Fillup NAME (\S+) Value Required Location (\S+|\S+\s\S+|\S+\s\S+\s\S+|\S+\s\S+\s\S+\s\S+|\S+\s\S+\s\S+\s\S+\s\S+) Start - ^\w:${NAME}(#|>) /show system information - ^.\w:${NAME}(#|>) /show system information + ^\w:\S+(#|>) /show system information + ^.\w:\S+(#|>) /show system information ^System Location\s+:\s+${Location} diff --git a/Templates/nokia_sros_tools_dump_resource_usage_system_match_ULbl.template b/Templates/nokia_sros_tools_dump_resource_usage_system_match_ULbl.template index 6d752ba..3634c1d 100755 --- a/Templates/nokia_sros_tools_dump_resource_usage_system_match_ULbl.template +++ b/Templates/nokia_sros_tools_dump_resource_usage_system_match_ULbl.template @@ -2,12 +2,11 @@ #Description: This template is used to find out the usage of Unicast Labels in 7250 chassis #Variables: Router_Name ULbl_R_Total ULbl_R_Allocated ULbl_R_Free #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required ULbl_R_Total (\S+) Value ULbl_R_Allocated (\S+) Value ULbl_R_Free (\S+) Start - ^\w:${NAME}(#|>) /tools dump resource-usage system | match ULbl - ^.\w:${NAME}(#|>) /tools dump resource-usage system | match ULbl + ^\w:\S+(#|>) /tools dump resource-usage system | match ULbl + ^.\w:\S+(#|>) /tools dump resource-usage system | match ULbl ^\s+ULbl\sRoute\s\S+\s.\s+${ULbl_R_Total}\s+${ULbl_R_Allocated}\s+${ULbl_R_Free} -> Record diff --git a/TemplatesTimos/21/sh_bof.template b/TemplatesTimos/21/sh_bof.template index 2f6e765..d785409 100644 --- a/TemplatesTimos/21/sh_bof.template +++ b/TemplatesTimos/21/sh_bof.template @@ -1,7 +1,6 @@ #Command: /show bof #Timos: 21 #Version: 1.0.0 -Value Filldown NAME (\S+) Value pr_image (.+) Value pr_config (.+) Value autonegotiate (autonegotiate) @@ -12,7 +11,7 @@ Value persist (\S+) Value console_speed (\S+) Start - ^\?w:${NAME}(#|>) /?show bof + ^\?w:\S+(#|>) /?show bof ^\s+primary.image\s+${pr_image} ^\s+primary.config\s+${pr_config} ^\s+${autonegotiate} diff --git a/TemplatesTimos/21/sh_card.template b/TemplatesTimos/21/sh_card.template index 2cbe87a..7520c42 100644 --- a/TemplatesTimos/21/sh_card.template +++ b/TemplatesTimos/21/sh_card.template @@ -1,7 +1,6 @@ #Command: /show card #Timos: 21 #Version: 1.0.0 -Value NAME (\S+) Value Required Slot_ID (\S+) Value Prov_Type (\S+) Value Eq_Type (\S+) @@ -10,6 +9,6 @@ Value Opr (\S+) Value Comments (\S+) Start - ^.?\w:${NAME}(#|>) /show card + ^.?\w:\S+(#|>) /show card ^${Slot_ID}\s+${Prov_Type}\s+${Adm}\s+${Opr}\s+${Comments}? -> Continue.Record ^${Slot_ID}\s+${Prov_Type}\s+${Eq_Type}\s+${Adm}\s+${Opr}\s+(\d+\s+)?(\d+\s+)?${Comments}? -> Continue.Record \ No newline at end of file diff --git a/TemplatesTimos/21/sh_chassis.template b/TemplatesTimos/21/sh_chassis.template index 4fbfe5c..ef5e7c6 100644 --- a/TemplatesTimos/21/sh_chassis.template +++ b/TemplatesTimos/21/sh_chassis.template @@ -1,12 +1,11 @@ #Command: /show chassis #Timos: 21 #Version: 1.0.0 -Value NAME (\S+) Value Type (.+) Value MAC (\S+) Start - ^.?\w:${NAME}(#|>) /show chassis - ^\s+Name\s+:\s+${NAME} + ^.?\w:\S+(#|>) /show chassis + ^\s+Name\s+:\s+\S+ ^\s{2,4}Type\s+:\s+${Type} ^\s+Base MAC address\s+:\s+${MAC} diff --git a/TemplatesTimos/21/sh_lag.template b/TemplatesTimos/21/sh_lag.template index 1d44779..e6effcb 100644 --- a/TemplatesTimos/21/sh_lag.template +++ b/TemplatesTimos/21/sh_lag.template @@ -1,7 +1,6 @@ #Command: /show lag #Timos: 21 #Version: 1.0.0 -Value NAME (\S+) Value Required Lag_ID (\S+) Value Adm ([uU][pP]|[Dd][oO]?[wW][nN]) Value Opr ([uU][pP]|[Dd][oO]?[wW][nN]) @@ -10,6 +9,6 @@ Value UpCount (\d+) Value MC_ActStdby (\S+) Start - ^\w:${NAME}(#|>) /show lag - ^.?\w:${NAME}(#|>) /?show lag + ^\w:\S+(#|>) /show lag + ^.?\w:\S+(#|>) /?show lag ^${Lag_ID}\s+${Adm}\s+${Opr}(\s+\S+)?\s+${Threshold}\s+${UpCount}\s+${MC_ActStdby} -> Record \ No newline at end of file diff --git a/TemplatesTimos/21/sh_mda_detail.template b/TemplatesTimos/21/sh_mda_detail.template index 8e37ac1..61c67c5 100644 --- a/TemplatesTimos/21/sh_mda_detail.template +++ b/TemplatesTimos/21/sh_mda_detail.template @@ -1,7 +1,6 @@ #Command: /show mda detail #Timos: 21 #Version: 1.0.0 -Value NAME (\S+) Value Slot_ID (\S+) Value MDA (\d+) Value Prov_Type (\S+) @@ -10,6 +9,6 @@ Value Adm ([uU][pP]|[Dd][oO]?[wW][nN]) Value Opr (\S+) Start - ^.?\w:${NAME}(#|>) /show mda detail + ^.?\w:\S+(#|>) /show mda detail ^${Slot_ID}\s+${MDA}\s+${Prov_Type}\s+${Adm}\s+${Opr} -> Continue.Record ^${Slot_ID}\s+${MDA}\s+${Prov_Type}\s+${Eq_Type}\s+${Adm}\s+${Opr} -> Record \ No newline at end of file diff --git a/TemplatesTimos/21/sh_port_det_intvrs.template b/TemplatesTimos/21/sh_port_det_intvrs.template index bcb43f7..bd4b776 100644 --- a/TemplatesTimos/21/sh_port_det_intvrs.template +++ b/TemplatesTimos/21/sh_port_det_intvrs.template @@ -3,7 +3,6 @@ #Version: 1.0.0 #Comments: Version able to compare information between those Timos. However, this version didn't display all port detail information from timos 21. #Replace: (accs,access),(netw,network),(up,Up),(down,Down) -Value Filldown NAME (\S+) Value Filldown Slot (\S+) Value Required PortID (\S+) Value AdminState ([uU][pP]|[Dd][oO][wW][nN]) @@ -15,7 +14,7 @@ Value PortEncp (\S+) Value PortType (\S+) Start - ^.?\w:${NAME}(#|>) /?show port detail + ^.?\w:\S+(#|>) /?show port detail ^Interface\s+.\s+${PortID}.+ -> Continue ^Admin State\s+.\s+${AdminState}.+ -> Continue ^Oper State\s+.\s+${PortState}.+ -> Continue diff --git a/TemplatesTimos/21/sh_port_detail.template b/TemplatesTimos/21/sh_port_detail.template index 8dfedaa..808f683 100644 --- a/TemplatesTimos/21/sh_port_detail.template +++ b/TemplatesTimos/21/sh_port_detail.template @@ -1,7 +1,6 @@ #Command: /show port detail #Timos: 21 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Required Interface (\S+) Value Description (.+) Value OperSpeed (.+) @@ -36,8 +35,8 @@ Value RxInPwr_dBm_LowWarn (\S+) Value RxInPwr_dBm_LowAlarm (\S+) Start - ^\w:${NAME}(#|>) /show port detail - ^.\w:${NAME}(#|>) /?show port detail + ^\w:\S+(#|>) /show port detail + ^.\w:\S+(#|>) /?show port detail ^Description\s+:\s${Description} ^Interface\s+:\s${Interface}\s+Oper\sSpeed\s+:\s${OperSpeed} ^Link.level\s+:\s\S+\s+Config\sSpeed\s+:\s${ConfigSpeed} diff --git a/TemplatesTimos/21/sh_redundancy_sync.template b/TemplatesTimos/21/sh_redundancy_sync.template index 01150b7..724d874 100644 --- a/TemplatesTimos/21/sh_redundancy_sync.template +++ b/TemplatesTimos/21/sh_redundancy_sync.template @@ -1,13 +1,12 @@ #Command: /show redundancy synchronization #Timos: 21 #Version: 1.0.0 -Value NAME (\S+) Value Standby_Status (.+) Value Boot_Config_Sync_Mode (.+) Value Boot_Config_Sync_Status (.+) Start - ^.?\w:${NAME}(#|>) /?show redundancy synchronization + ^.?\w:\S+(#|>) /?show redundancy synchronization ^Standby Status\s+.\s+${Standby_Status} ^Boot.Config Sync Mode\s+:\s+${Boot_Config_Sync_Mode} ^Boot.Config Sync Status\s+:+\s+${Boot_Config_Sync_Status} \ No newline at end of file diff --git a/TemplatesTimos/21/sh_rtr_arp.template b/TemplatesTimos/21/sh_rtr_arp.template index a46dc53..96d30a5 100644 --- a/TemplatesTimos/21/sh_rtr_arp.template +++ b/TemplatesTimos/21/sh_rtr_arp.template @@ -1,7 +1,6 @@ #Command: /show router arp #Timos: 21 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Filldown,Required Router (\S+) Value Required IP_Addr (\d+\.\d+\.\d+\.\d+) Value MAC_Addr (\S{2}:\S{2}:\S{2}:\S{2}:\S{2}:\S{2}) @@ -9,6 +8,6 @@ Value Type (\S+) Value Interface (.+) Start - ^.?\w:${NAME}(#|>) /?show router arp + ^.?\w:\S+(#|>) /?show router arp ^ARP Table .Router. ${Router}. ^${IP_Addr}\s+${MAC_Addr}\s+\S+\s+${Type}\s+${Interface} -> Continue.Record \ No newline at end of file diff --git a/TemplatesTimos/21/sh_rtr_bfd_session.template b/TemplatesTimos/21/sh_rtr_bfd_session.template index eee411f..977f203 100644 --- a/TemplatesTimos/21/sh_rtr_bfd_session.template +++ b/TemplatesTimos/21/sh_rtr_bfd_session.template @@ -1,7 +1,6 @@ #Command: /show router bfd session #Timos: 21 #Version: 1.0.0 -Value NAME (\S+) Value Required Session_ID (.+?) Value State ([uU][pP]|[Dd][oO]?[wW][nN]) Value Required RemAddess (\d+\.\d+\.\d+\.\d+) @@ -11,7 +10,7 @@ Value Multipl (\d+) Value Protocols (\D+.+?) Start - ^.?\w:${NAME}(#|>) /?show router bfd session + ^.?\w:\S+(#|>) /?show router bfd session ^${Session_ID}\s+${State}\s+\d+\s+\d+ -> Continue ^\s{2}${RemAddess}\s+${Multipl}\s+${Tx_Intvl}\s+${Rx_Intvl} -> Continue ^\s{2}${Protocols}\s+central\s+.+\s+.+ -> Record diff --git a/TemplatesTimos/21/sh_rtr_bgp_neigh.template b/TemplatesTimos/21/sh_rtr_bgp_neigh.template index 6a4d485..2b1c297 100644 --- a/TemplatesTimos/21/sh_rtr_bgp_neigh.template +++ b/TemplatesTimos/21/sh_rtr_bgp_neigh.template @@ -2,15 +2,14 @@ #majorDown: Active,Idle,Connect #Timos: 21 #Version: 1.0.0 -Value NAME (\S+) Value Peer (\d+\.\d+\.\d+\.\d+) Value Group (.+) Value State (\S+) Value Last_State (\S+) Start - ^\w:${NAME}(#|>) /show router bgp neighbor - ^.?\w:${NAME}(#|>) /?show router bgp neighbor + ^\w:\S+(#|>) /show router bgp neighbor + ^.?\w:\S+(#|>) /?show router bgp neighbor ^Peer\s+.\s${Peer} ^Group\s+.\s${Group} ^State\s+.\s${State}\s+Last State\s+.\s${Last_State} -> Continue.Record \ No newline at end of file diff --git a/TemplatesTimos/21/sh_rtr_iface.template b/TemplatesTimos/21/sh_rtr_iface.template index d749af3..d7aa537 100644 --- a/TemplatesTimos/21/sh_rtr_iface.template +++ b/TemplatesTimos/21/sh_rtr_iface.template @@ -1,7 +1,6 @@ #Command: /show router interface #Timos: 21 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Required INTERFACE_NAME (.+?) Value Filldown PLANE (Base) Value Required INTERFACE_ADM ([uU][pP]|[Dd][oO][wW][nN]) @@ -13,8 +12,8 @@ Value Required INTERFACE_IP ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}/[ Value PfxState (\S+) Start - ^\w:${NAME}(#|>) /show router interface - ^.\w:${NAME}(#|>) /?show router interface + ^\w:\S+(#|>) /show router interface + ^.\w:\S+(#|>) /?show router interface ^Interface\sTable\s.Router.\s${PLANE}. ^${INTERFACE_NAME}\s+?${INTERFACE_ADM}\s+${INTERFACE_OPR_IPV4}.${INTERFACE_OPR_IPV6}\s+${INTERFACE_MODE}\s+${INTERFACE_PORT} -> Continue ^\s+${INTERFACE_IP}\s+${PfxState} -> Record diff --git a/TemplatesTimos/21/sh_rtr_mpls_iface.template b/TemplatesTimos/21/sh_rtr_mpls_iface.template index a822019..79a12b2 100644 --- a/TemplatesTimos/21/sh_rtr_mpls_iface.template +++ b/TemplatesTimos/21/sh_rtr_mpls_iface.template @@ -1,7 +1,6 @@ #Command: /show router mpls interface #Timos: 21 #Version: 1.0.0 -Value NAME (\S+) Value Required Interface (.+?) Value Port_ID (.+?) Value Required Adm ([uU][pP]|[Dd][oO][wW][nN]) @@ -9,6 +8,6 @@ Value Required Opr_v4v6 (\S+) Value TE_Metric (\S+) Start - ^\w:${NAME}(#|>) /show router mpls interface - ^.?\w:${NAME}(#|>) /?show router mpls interface + ^\w:\S+(#|>) /show router mpls interface + ^.?\w:\S+(#|>) /?show router mpls interface ^${Interface}\s{2}\s+${Port_ID}\s{2}\s+${Adm}\s+${Opr_v4v6}\s+${TE_Metric}? -> Continue.Record \ No newline at end of file diff --git a/TemplatesTimos/21/sh_rtr_mpls_lbl-rng.template b/TemplatesTimos/21/sh_rtr_mpls_lbl-rng.template index f55b46f..953a8a5 100644 --- a/TemplatesTimos/21/sh_rtr_mpls_lbl-rng.template +++ b/TemplatesTimos/21/sh_rtr_mpls_lbl-rng.template @@ -1,7 +1,6 @@ #Command: /show router mpls.labels label.range #Timos: 21 #Version: 1.0.0 -Value NAME (\S+) Value Filldown Label (\S+) Value Type (\S+) Value Required Start_Label (\d+) @@ -11,7 +10,7 @@ Value Available (\S+) Value Total (\S+) Start - ^\w:${NAME}(#|>) /show router mpls.labels label.range - ^.?\w:${NAME}(#|>) /?show router mpls.labels label.range + ^\w:\S+(#|>) /show router mpls.labels label.range + ^.?\w:\S+(#|>) /?show router mpls.labels label.range ^${Label}\s+${Start_Label}\s+${End_Label}\s+${Aging}\s+${Available}\s+${Total} -> Continue.Record ^\s{4}${Type}\s+${Start_Label}\s+${End_Label}\s+${Aging}\s+${Available}\s+${Total} -> Continue.Record \ No newline at end of file diff --git a/TemplatesTimos/21/sh_rtr_mpls_lsp.template b/TemplatesTimos/21/sh_rtr_mpls_lsp.template index 2fdd2a6..ba4616d 100644 --- a/TemplatesTimos/21/sh_rtr_mpls_lsp.template +++ b/TemplatesTimos/21/sh_rtr_mpls_lsp.template @@ -1,7 +1,6 @@ #Command: /show router mpls lsp #Timos: 21 #Version: 1.0.0 -Value NAME (\S+) Value Required LSP_name (.+?) Value Required Adm ([uU][pP]|[Dd][oO]?[wW][nN]) Value Required Opr ([uU][pP]|[Dd][oO]?[wW][nN]) @@ -9,8 +8,8 @@ Value To (\d+\.\d+\.\d+\.\d+) Start - ^\w:${NAME}(#|>) /show router mpls lsp - ^.?\w:${NAME}(#|>) /?show router mpls lsp + ^\w:\S+(#|>) /show router mpls lsp + ^.?\w:\S+(#|>) /?show router mpls lsp ^${LSP_name}\s{2}\s+${To}\s+\S+\s+${Adm}\s+${Opr} -> Record ^${LSP_name}\s+${To}\s+\S+\s+\S+\s+${Adm}\s+${Opr} -> Continue.Record ^${LSP_name}\s+\S+\s+\S+\s+${Adm}\s+${Opr} diff --git a/TemplatesTimos/21/sh_rtr_mpls_path.template b/TemplatesTimos/21/sh_rtr_mpls_path.template index e6e5ac6..8b89a15 100644 --- a/TemplatesTimos/21/sh_rtr_mpls_path.template +++ b/TemplatesTimos/21/sh_rtr_mpls_path.template @@ -1,7 +1,6 @@ #Command: /show router mpls path #Timos: 21 #Version: 1.0.0 -Value NAME (\S+) Value Filldown Path_name (\S+) Value Filldown,Required Admin ([uU][pP]|[Dd][oO][wW][nN]) Value Required Hop_index ([Nn][oO]\s[Hh][oO][Pp][Ss]|\d+) @@ -9,8 +8,8 @@ Value Required Strict_Loose (\S+) Value IP_Addr ((\d+.\d+.\d+.\d+)|\S+) Start - ^\w:${NAME}(#|>) /show router mpls path - ^.?\w:${NAME}(#|>) /?show router mpls path + ^\w:\S+(#|>) /show router mpls path + ^.?\w:\S+(#|>) /?show router mpls path ^${Path_name}\s+${Admin}\s+${Hop_index}\s+${IP_Addr}\s+${Strict_Loose} -> Continue.Record ^\s+${Hop_index}\s+${IP_Addr}\s+${Strict_Loose} -> Continue.Record ^${Path_name}$$ -> Continue.Record diff --git a/TemplatesTimos/21/sh_rtr_ospf_iface.template b/TemplatesTimos/21/sh_rtr_ospf_iface.template index 59682c8..d717026 100644 --- a/TemplatesTimos/21/sh_rtr_ospf_iface.template +++ b/TemplatesTimos/21/sh_rtr_ospf_iface.template @@ -1,7 +1,6 @@ #Command: /show router ospf interface #Timos: 21 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Key,Required INTERFACE_NAME (.+?) Value AREA_ID ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}) Value DESIGNATED_RTR ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}) @@ -10,6 +9,6 @@ Value ADM ([uU][pP]|[Dd][oO][wW][nN]) Value OPER (\w{1,4}) Start - ^.?\w:${NAME}(#|>) /?show router ospf interface + ^.?\w:\S+(#|>) /?show router ospf interface ^${INTERFACE_NAME}\s+${AREA_ID}\s+${DESIGNATED_RTR}\s+${BKUP_DESIG_RTR}\s+${ADM}\s+${OPER} -> Record diff --git a/TemplatesTimos/21/sh_rtr_ospf_neigh.template b/TemplatesTimos/21/sh_rtr_ospf_neigh.template index f41e6ca..21fb99a 100644 --- a/TemplatesTimos/21/sh_rtr_ospf_neigh.template +++ b/TemplatesTimos/21/sh_rtr_ospf_neigh.template @@ -2,7 +2,6 @@ #majorDown: Attempt,Init,Two Way,Exchange start,Exchange,Loading #Timos: 21 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Required Interface_Name (.+) Value Rtr_Id (\d+\.\d+\.\d+\.\d+) Value State (\S+) @@ -12,6 +11,6 @@ Value TTL (\d+) Start - ^\w:${NAME}(#|>) /show router \S+ ospf neighbor - ^.?\w:${NAME}(#|>) /?show router \S+ ospf neighbor + ^\w:\S+(#|>) /show router \S+ ospf neighbor + ^.?\w:\S+(#|>) /?show router \S+ ospf neighbor ^${Interface_Name}\s+${Rtr_Id}\s+${State}\s+${Pri}\s+${RetxQ}\s+${TTL} -> Continue.Record diff --git a/TemplatesTimos/21/sh_rtr_rsvp_iface.template b/TemplatesTimos/21/sh_rtr_rsvp_iface.template index 7325bfc..75d547c 100644 --- a/TemplatesTimos/21/sh_rtr_rsvp_iface.template +++ b/TemplatesTimos/21/sh_rtr_rsvp_iface.template @@ -1,7 +1,6 @@ #Command: /show router rsvp interface #Timos: 21 #Version: 1.0.0 -Value NAME (\S+) Value Required Interface (.+?) Value Adm ([uU][pP]|[Dd][oO]?[wW][nN]) Value Opr ([uU][pP]|[Dd][oO]?[wW][nN]) @@ -11,5 +10,5 @@ Value Total_BW (\d+|\-) Value Resv_BW (\d+|\-) Start - ^.?\w:${NAME}(#|>) /?show router rsvp interface + ^.?\w:\S+(#|>) /?show router rsvp interface ^${Interface}\s+?${Total}\s+${Active}\s+${Total_BW}\s+${Resv_BW}\s+${Adm}\s+${Opr} -> Continue.Record \ No newline at end of file diff --git a/TemplatesTimos/21/sh_rtr_rt_tbl_summ.template b/TemplatesTimos/21/sh_rtr_rt_tbl_summ.template index cee97e6..535b35a 100644 --- a/TemplatesTimos/21/sh_rtr_rt_tbl_summ.template +++ b/TemplatesTimos/21/sh_rtr_rt_tbl_summ.template @@ -1,7 +1,6 @@ #Command: /show router route-table summary #Timos: 21 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Required Router (\S+) Value Act_Aggregate (\d+) Value Av_Aggregate (\d+) @@ -49,8 +48,8 @@ Value Act_VPN_Leak (\d+) Value Av_VPN_Leak (\d+) Start - ^\w:${NAME}(#|>) /show router route-table summary - ^.?\w:${NAME}(#|>) /?show router route.table summary + ^\w:\S+(#|>) /show router route-table summary + ^.?\w:\S+(#|>) /?show router route.table summary ^Route Table Summary .Router. ${Router}. ^Aggregate\s+${Act_Aggregate}\s+${Av_Aggregate} ^ARP-ND\s+${Act_APR_ND}\s+${Av_APR_ND} diff --git a/TemplatesTimos/21/sh_rtr_var_arp.template b/TemplatesTimos/21/sh_rtr_var_arp.template index 07a142b..8f18498 100644 --- a/TemplatesTimos/21/sh_rtr_var_arp.template +++ b/TemplatesTimos/21/sh_rtr_var_arp.template @@ -1,7 +1,6 @@ #Command: /show router \S+ arp #Timos: 21 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Filldown,Required Service (\S+) Value Required IP_Addr (\d+\.\d+\.\d+\.\d+) Value MAC_Addr (\S{2}:\S{2}:\S{2}:\S{2}:\S{2}:\S{2}) @@ -9,7 +8,7 @@ Value Type (\S+) Value Interface (.+) Start - ^\w:${NAME}(#|>) /show router \S+ arp - ^.?\w:${NAME}(#|>) /?show router \S+ arp + ^\w:\S+(#|>) /show router \S+ arp + ^.?\w:\S+(#|>) /?show router \S+ arp ^ARP Table .Service. ${Service}. ^${IP_Addr}\s+(${MAC_Addr}\s+)?\S+\s+${Type}\s+${Interface} -> Continue.Record \ No newline at end of file diff --git a/TemplatesTimos/21/sh_rtr_var_iface.template b/TemplatesTimos/21/sh_rtr_var_iface.template index ba3f17a..c5e9a87 100644 --- a/TemplatesTimos/21/sh_rtr_var_iface.template +++ b/TemplatesTimos/21/sh_rtr_var_iface.template @@ -1,7 +1,6 @@ #Command: /show router \S+ interface #Timos: 21 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Required Interf_Name (.+?) Value Filldown VPRN (\S+) Value Interf_ADM ([uU][pP]|[Dd][oO][wW][nN]) @@ -13,7 +12,7 @@ Value Required Interf_IP (\S+) Value Pfx_State (\S+) Start - ^.?\w:${NAME}(#|>) /?show router ${VPRN} interface + ^.?\w:\S+(#|>) /?show router ${VPRN} interface ^Interface\sTable\s.Service.\s${VPRN}. ^${Interf_Name}\s+${Interf_ADM}\s+${Interf_OPR_IPV4}.${Interf_OPR_IPV6}\s+${Interf_Mode}\s+${Interf_Port} -> Continue ^\s+${Interf_IP}\s+${Pfx_State} -> Record diff --git a/TemplatesTimos/21/sh_rtr_var_rt_tbl_summ.template b/TemplatesTimos/21/sh_rtr_var_rt_tbl_summ.template index e5b50b3..169aa3f 100644 --- a/TemplatesTimos/21/sh_rtr_var_rt_tbl_summ.template +++ b/TemplatesTimos/21/sh_rtr_var_rt_tbl_summ.template @@ -1,7 +1,6 @@ #Command: /show router \S+ route-table summary #Timos: 21 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Required Service (\S+) Value Act_Static (\d+) Value Av_Static (\d+) @@ -25,7 +24,7 @@ Value Act_Sub_Mgmt (\d+) Value Av_Sub_Mgmt (\d+) Start - ^.?\w:${NAME}(#|>) /?show router \S+ route.table summary + ^.?\w:\S+(#|>) /?show router \S+ route.table summary ^Route Table Summary .Service. ${Service}. ^Static\s+${Act_Static}\s+${Av_Static} ^Direct\s+${Act_Direct}\s+${Av_Direct} diff --git a/TemplatesTimos/21/sh_srv_sap_using.template b/TemplatesTimos/21/sh_srv_sap_using.template index b66d20a..bb211c6 100644 --- a/TemplatesTimos/21/sh_srv_sap_using.template +++ b/TemplatesTimos/21/sh_srv_sap_using.template @@ -1,7 +1,6 @@ #Command: /show service sap-using #Timos: 21 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Required PortId (\S+) Value Required SvcId ([0-9]{1,15}) Value Required IngQoS (\S+) @@ -12,8 +11,8 @@ Value Required Adm ([uU][pP]|[Dd][oO][wW][nN]) Value Required Opr ([uU][pP]|[Dd][oO][wW][nN]) Start - ^\w:${NAME}(#|>) /show service sap-using - ^.\w:${NAME}(#|>) /show service sap-using + ^\w:\S+(#|>) /show service sap-using + ^.\w:\S+(#|>) /show service sap-using ^${PortId}\s+${SvcId}\s+${IngQoS}\s+${IngFltr}\s+${EgrFltr}\s+${Adm}\s+${Opr} -> Record ^${PortId}\s+${SvcId}\s+${IngQoS}\s+${IngFltr}\s+${EgrQoS}\s+${EgrFltr}\s+${Adm}\s+${Opr} -> Record diff --git a/TemplatesTimos/21/sh_srv_sdp_using.template b/TemplatesTimos/21/sh_srv_sdp_using.template index 755921d..7777de4 100644 --- a/TemplatesTimos/21/sh_srv_sdp_using.template +++ b/TemplatesTimos/21/sh_srv_sdp_using.template @@ -4,7 +4,6 @@ #Description: This template is used to see sdp-using #Variables: Router_Name SDP_SVC_ID SDP_IDU SDP_TYPE SDP_FAR_END SDP_OPR_STATE #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required SDP_SVC_ID ([0-9]{1,12}) Value Required SDP_IDU ([0-9]{1,12}:[0-9]{1,12}) Value Required SDP_TYPE (\S+) @@ -12,8 +11,8 @@ Value Required SDP_FAR_END ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}) Value Required SDP_OPR_STATE ([uU][pP]|[Dd][oO][wW][nN]) Start - ^\w:${NAME}(#|>) /show service sdp-using - ^.\w:${NAME}(#|>) /show service sdp-using + ^\w:\S+(#|>) /show service sdp-using + ^.\w:\S+(#|>) /show service sdp-using ^${SDP_SVC_ID}\s+${SDP_IDU}\s+${SDP_TYPE}\s+${SDP_FAR_END}\s+${SDP_OPR_STATE} -> Record EOF diff --git a/TemplatesTimos/21/sh_srv_srv_using.template b/TemplatesTimos/21/sh_srv_srv_using.template index 0ebce13..753dd76 100644 --- a/TemplatesTimos/21/sh_srv_srv_using.template +++ b/TemplatesTimos/21/sh_srv_srv_using.template @@ -4,7 +4,6 @@ #Description: This template is used to see service-using #Variables: Router_Name ServiceId Type Adm Opr CustomerId #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required ServiceId ([0-9]{1,15}) Value Type (\S+) Value Adm ([uU][pP]|[Dd][oO][wW][nN]) @@ -12,6 +11,6 @@ Value Opr ([uU][pP]|[Dd][oO][wW][nN]) Value CustomerId ([0-9]{1,15}) Start - ^\w:${NAME}(#|>) /show service service-using - ^.\w:${NAME}(#|>) /show service service-using + ^\w:\S+(#|>) /show service service-using + ^.\w:\S+(#|>) /show service service-using ^${ServiceId}\s+${Type}\s+${Adm}\s+${Opr}\s+${CustomerId} -> Record diff --git a/TemplatesTimos/21/sh_sys_cpu.template b/TemplatesTimos/21/sh_sys_cpu.template index 0c237a9..dade0e3 100644 --- a/TemplatesTimos/21/sh_sys_cpu.template +++ b/TemplatesTimos/21/sh_sys_cpu.template @@ -3,7 +3,6 @@ #Version: 1.0.0 #Variables Router_Name CPU_Total_Time_uSec CPU_Usage_Total CPU_Idle_uSec CPU_Idle CPU_Usage_uSec CPU_Usage Port Busiest_Core_Utilization_uSec Busiest_Core_Utilization_Usage #Autor Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required CPU_Total_Time_uSec (\S+) Value Required CPU_Usage_Total (\S+) Value Required CPU_Idle_uSec (\S+) @@ -14,8 +13,8 @@ Value Required Busiest_Core_Utilization_uSec (\S+) Value Required Busiest_Core_Utilization_Usage (\S+) Start - ^\w:${NAME}(#|>) /show system cpu - ^.\w:${NAME}(#|>) /show system cpu + ^\w:\S+(#|>) /show system cpu + ^.\w:\S+(#|>) /show system cpu ^Total\s+${CPU_Total_Time_uSec}\s+${CPU_Usage_Total} ^\s+Idle\s+${CPU_Idle_uSec}\s+${CPU_Idle} ^\s+Usage\s+${CPU_Usage_uSec}\s+${CPU_Usage} diff --git a/TemplatesTimos/21/sh_sys_info.template b/TemplatesTimos/21/sh_sys_info.template index d1fafb0..98deead 100644 --- a/TemplatesTimos/21/sh_sys_info.template +++ b/TemplatesTimos/21/sh_sys_info.template @@ -1,14 +1,13 @@ #Command: /show system information #Timos: 21 #Version: 1.0.0 -Value NAME (\S+) Value SNMP_Oper_State (\S+) Value SNMP_Index_Boot_Status (\S+(\s\S+)?) Value SNMP_Sync_State (\S+) Start - ^\w:${NAME}(#|>) /show system information - ^.?\w:${NAME}(#|>) /?show system information + ^\w:\S+(#|>) /show system information + ^.?\w:\S+(#|>) /?show system information ^SNMP Oper State\s+.\s+${SNMP_Oper_State} ^SNMP Index Boot Status\s+.\s+${SNMP_Index_Boot_Status} ^SNMP Sync State\s+.\s+${SNMP_Sync_State} \ No newline at end of file diff --git a/TemplatesTimos/21/sh_sys_ntp_detail.template b/TemplatesTimos/21/sh_sys_ntp_detail.template index 492739b..3c184c0 100644 --- a/TemplatesTimos/21/sh_sys_ntp_detail.template +++ b/TemplatesTimos/21/sh_sys_ntp_detail.template @@ -1,7 +1,6 @@ #Command: /show system ntp detail #Timos: 21 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Enabled_Configured (\S+) Value Stratum (\S+) Value Admin_Status ([uU][pP]|[Dd][oO][wW][nN]) @@ -14,7 +13,7 @@ Value MDA_Timestamp (\S+) Value Required DateAndTime (\S+.\S+.\S+\s\S+.\S+.\S+\s\S+) Start - ^.?\w:${NAME}(#|>) /?show system ntp + ^.?\w:\S+(#|>) /?show system ntp ^Enabled\s+:\s${Enabled_Configured}\s+Stratum\s+:\s${Stratum} ^Configured\s+:\s${Enabled_Configured}\s+Stratum\s+:\s${Stratum} ^Admin\sStatus\s+:\s${Admin_Status}\s+Oper\sStatus\s+:\s${Oper_Status} diff --git a/TemplatesTimos/21/sh_sys_ptp.template b/TemplatesTimos/21/sh_sys_ptp.template index ac986a5..9a49dc3 100644 --- a/TemplatesTimos/21/sh_sys_ptp.template +++ b/TemplatesTimos/21/sh_sys_ptp.template @@ -4,7 +4,6 @@ #Description: This template is used to see ptp's phase configuration #Variables: Router_Name Clock_Type PTP_Profile Admin_State Oper_State Clock_id Clock_Class PTP_Recovery_State Last_Changed Frequency_Offset GM_Clock_Id GM_Clock_Class Frequency_Traceable Time_Traceable Time_Source #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Clock_Type (\S+.\S+|\S+) Value PTP_Profile (\S+\s\S+) Value Admin_State ([uU][pP]|[Dd][oO][wW][nN]) @@ -21,8 +20,8 @@ Value Time_Traceable (\S+) Value Time_Source (\S+) Start - ^\w:${NAME}(#|>)\s/show\ssystem\sptp - ^.\w:${NAME}(#|>)\s/show\ssystem\sptp + ^\w:\S+(#|>)\s/show\ssystem\sptp + ^.\w:\S+(#|>)\s/show\ssystem\sptp ^Clock\sType\s+:\s${Clock_Type}\s+PTP\sProfile\s+:\s${PTP_Profile} ^Admin\sState\s+:\s${Admin_State}\s+Oper\sState\s+:\s${Oper_State} ^Clock\sId\s+:\s${Clock_id}\s+Clock\sClass\s+:\s${Clock_Class} diff --git a/TemplatesTimos/21/sh_sys_sync_if_timing.template b/TemplatesTimos/21/sh_sys_sync_if_timing.template index 3418588..5f0114b 100644 --- a/TemplatesTimos/21/sh_sys_sync_if_timing.template +++ b/TemplatesTimos/21/sh_sys_sync_if_timing.template @@ -5,7 +5,6 @@ #Description: This template is used to see the system sync if timing #Variables: Router_Name Status_CPM Ref_Input_Mode Quality_Level_Selection Ref_Select Sys_Quality_Level Ref_Order Ref_Order Ref_Input Admin_Status Rx_Quality_Level Qualified_For_Use Selected_For_Use Source_Port Source_PTP_Clock #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Status_CPM (\S+\s\S+|\S+) Value Ref_Input_Mode (\S+) Value Quality_Level_Selection (Enabled|Disabled) @@ -27,8 +26,8 @@ Value Key Source_PTP_Clock (\S+) Value Type (.+) Start - ^\w:${NAME}(#|>) /show system sync-if-timing - ^.\w:${NAME}(#|>) /show system sync-if-timing + ^\w:\S+(#|>) /show system sync-if-timing + ^.\w:\S+(#|>) /show system sync-if-timing ^System\sStatus\sCPM\s\w\s+:\s${Status_CPM} ^\s+Reference\sInput\sMode\s+:\s${Ref_Input_Mode} ^\s+Quality\sLevel\sSelection\s+:\s${Quality_Level_Selection} diff --git a/TemplatesTimos/21/sh_time.template b/TemplatesTimos/21/sh_time.template index d132bd0..43dfe2d 100644 --- a/TemplatesTimos/21/sh_time.template +++ b/TemplatesTimos/21/sh_time.template @@ -1,7 +1,6 @@ #Command: /show time #Timos: 21 #Version: 1.0.0 -Value Filldown NAME (\S+) Value wkDay (\S+) Value month (\S+) Value day (\S+) @@ -10,5 +9,5 @@ Value timeZone (\S+) Value Year (\d+) Start - ^\?w:${NAME}(#|>) /?show time + ^\?w:\S+(#|>) /?show time ^${wkDay}\s+${month}\s+${day}\s+${time}\s+${timeZone}\s+${Year} -> Record \ No newline at end of file diff --git a/TemplatesTimos/21/sh_uptime.template b/TemplatesTimos/21/sh_uptime.template index d5e3955..3ebb169 100644 --- a/TemplatesTimos/21/sh_uptime.template +++ b/TemplatesTimos/21/sh_uptime.template @@ -1,12 +1,11 @@ #Command: /show uptime #Timos: 21 #Version: 1.0.0 -Value Filldown NAME (\S+) Value days (\d+) Value hr (\d+) Value min (\d+) Value sec (\S+) Start - ^\?w:${NAME}(#|>) /?show uptime + ^\?w:\S+(#|>) /?show uptime ^System Up Time\s+.\s+${days} days.\s+${hr}.${min}.${sec}\s+.+ \ No newline at end of file diff --git a/TemplatesTimos/6/sh_bof.template b/TemplatesTimos/6/sh_bof.template index f474c3d..d58cbcd 100644 --- a/TemplatesTimos/6/sh_bof.template +++ b/TemplatesTimos/6/sh_bof.template @@ -1,7 +1,6 @@ #Command: /show bof #Timos: 6 #Version: 1.0.0 -Value Filldown NAME (\S+) Value pr_image (.+) Value pr_config (.+) Value autonegotiate (autonegotiate) @@ -12,7 +11,7 @@ Value persist (\S+) Value console_speed (\S+) Start - ^\?w:${NAME}(#|>) /?show bof + ^\?w:\S+(#|>) /?show bof ^\s+primary.image\s+${pr_image} ^\s+primary.config\s+${pr_config} ^\s+${autonegotiate} diff --git a/TemplatesTimos/6/sh_card.template b/TemplatesTimos/6/sh_card.template index cea62eb..a4acc69 100644 --- a/TemplatesTimos/6/sh_card.template +++ b/TemplatesTimos/6/sh_card.template @@ -1,7 +1,6 @@ #Command: /show card #Timos: 6 #Version: 1.0.0 -Value NAME (\S+) Value Required Slot_ID (\S+) Value Prov_Type (\S+) Value Eq_Type (\S+) @@ -10,6 +9,6 @@ Value Opr (\S+) Value Comments (\S+) Start - ^.?\w:${NAME}(#|>) /show card + ^.?\w:\S+(#|>) /show card ^${Slot_ID}\s+${Prov_Type}\s+${Adm}\s+${Opr}\s+${Comments}? -> Continue.Record ^${Slot_ID}\s+${Prov_Type}\s+${Eq_Type}\s+${Adm}\s+${Opr}\s+(\d+\s+)?(\d+\s+)?${Comments}? -> Continue.Record \ No newline at end of file diff --git a/TemplatesTimos/6/sh_chassis.template b/TemplatesTimos/6/sh_chassis.template index b803a3c..5010569 100644 --- a/TemplatesTimos/6/sh_chassis.template +++ b/TemplatesTimos/6/sh_chassis.template @@ -1,12 +1,11 @@ #Command: /show chassis #Timos: 6 #Version: 1.0.0 -Value NAME (\S+) Value Type (.+) Value MAC (\S+) Start - ^.?\w:${NAME}(#|>) /show chassis - ^\s+Name\s+:\s+${NAME} + ^.?\w:\S+(#|>) /show chassis + ^\s+Name\s+:\s+\S+ ^\s{2,4}Type\s+:\s+${Type} ^\s+Base MAC address\s+:\s+${MAC} diff --git a/TemplatesTimos/6/sh_lag.template b/TemplatesTimos/6/sh_lag.template index d1e9c7e..1c33958 100644 --- a/TemplatesTimos/6/sh_lag.template +++ b/TemplatesTimos/6/sh_lag.template @@ -1,7 +1,6 @@ #Command: /show lag #Timos: 6 #Version: 1.0.0 -Value NAME (\S+) Value Required Lag_ID (\S+) Value Adm ([uU][pP]|[Dd][oO]?[wW][nN]) Value Opr ([uU][pP]|[Dd][oO]?[wW][nN]) @@ -10,6 +9,6 @@ Value UpCount (\d+) Value MC_ActStdby (\S+) Start - ^\w:${NAME}(#|>) /show lag - ^.?\w:${NAME}(#|>) /?show lag + ^\w:\S+(#|>) /show lag + ^.?\w:\S+(#|>) /?show lag ^${Lag_ID}\s+${Adm}\s+${Opr}(\s+\S+)?\s+${Threshold}\s+${UpCount}\s+${MC_ActStdby} -> Record \ No newline at end of file diff --git a/TemplatesTimos/6/sh_mda_detail.template b/TemplatesTimos/6/sh_mda_detail.template index 4fa86d8..938d3f2 100644 --- a/TemplatesTimos/6/sh_mda_detail.template +++ b/TemplatesTimos/6/sh_mda_detail.template @@ -1,7 +1,6 @@ #Command: /show mda detail #Timos: 6 #Version: 1.0.0 -Value NAME (\S+) Value Slot_ID (\S+) Value MDA (\d+) Value Prov_Type (\S+) @@ -10,6 +9,6 @@ Value Adm ([uU][pP]|[Dd][oO]?[wW][nN]) Value Opr (\S+) Start - ^.?\w:${NAME}(#|>) /show mda detail + ^.?\w:\S+(#|>) /show mda detail ^${Slot_ID}\s+${MDA}\s+${Prov_Type}\s+${Adm}\s+${Opr} -> Continue.Record ^${Slot_ID}\s+${MDA}\s+${Prov_Type}\s+${Eq_Type}\s+${Adm}\s+${Opr} -> Record \ No newline at end of file diff --git a/TemplatesTimos/6/sh_port_det_intvrs.template b/TemplatesTimos/6/sh_port_det_intvrs.template index c49f2f7..9e7f9ab 100644 --- a/TemplatesTimos/6/sh_port_det_intvrs.template +++ b/TemplatesTimos/6/sh_port_det_intvrs.template @@ -3,7 +3,6 @@ #Version: 1.0.0 #Comments: Version able to compare information between those Timos. However, this version didn't display all port detail information from timos 21. #Replace: (accs,access),(netw,network),(up,Up),(down,Down) -Value Filldown NAME (\S+) Value Filldown Slot (\S+) Value Required PortID (\S+) Value AdminState ([uU][pP]|[Dd][oO][wW][nN]) @@ -15,7 +14,7 @@ Value PortEncp (\S+) Value PortType (\S+) Start - ^.?\w:${NAME}(#|>) /?show port detail + ^.?\w:\S+(#|>) /?show port detail ^Interface\s+.\s+${PortID}.+ -> Continue ^Admin State\s+.\s+${AdminState}.+ -> Continue ^Oper State\s+.\s+${PortState}.+ -> Continue diff --git a/TemplatesTimos/6/sh_port_detail.template b/TemplatesTimos/6/sh_port_detail.template index a944b6f..99c6ae4 100644 --- a/TemplatesTimos/6/sh_port_detail.template +++ b/TemplatesTimos/6/sh_port_detail.template @@ -1,7 +1,6 @@ #Command: /show port detail #Timos: 6 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Filldown Slot (\S+) Value Required PortID (\S+) Value AdminState ([uU][pP]|[Dd][oO][wW][nN]) @@ -16,6 +15,6 @@ Value PortType (\S+) Value SPF_XPF_MDIMDX (.+?) Start - ^.?\w:${NAME}(#|>) /?show port detail + ^.?\w:\S+(#|>) /?show port detail ^Ports on Slot ${Slot} ^${PortID}\s+${AdminState}\s+${Link}\s+${PortState}(\s+${CfgMTU}\s+${OperMTU}\s+${Lag_Bndl}\s+${PortMode}\s+${PortEncp}\s+${PortType}\s+${SPF_XPF_MDIMDX}?\s+?)? -> Continue.Record diff --git a/TemplatesTimos/6/sh_redundancy_sync.template b/TemplatesTimos/6/sh_redundancy_sync.template index 273a0e3..10bcf44 100644 --- a/TemplatesTimos/6/sh_redundancy_sync.template +++ b/TemplatesTimos/6/sh_redundancy_sync.template @@ -1,13 +1,12 @@ #Command: /show redundancy synchronization #Timos: 6 #Version: 1.0.0 -Value NAME (\S+) Value Standby_Status (.+) Value Boot_Config_Sync_Mode (.+) Value Boot_Config_Sync_Status (.+) Start - ^.?\w:${NAME}(#|>) /?show redundancy synchronization + ^.?\w:\S+(#|>) /?show redundancy synchronization ^Standby Status\s+.\s+${Standby_Status} ^Boot.Config Sync Mode\s+:\s+${Boot_Config_Sync_Mode} ^Boot.Config Sync Status\s+:+\s+${Boot_Config_Sync_Status} \ No newline at end of file diff --git a/TemplatesTimos/6/sh_rtr_arp.template b/TemplatesTimos/6/sh_rtr_arp.template index 5cbc9a0..aef2bea 100644 --- a/TemplatesTimos/6/sh_rtr_arp.template +++ b/TemplatesTimos/6/sh_rtr_arp.template @@ -1,7 +1,6 @@ #Command: /show router arp #Timos: 6 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Filldown,Required Router (\S+) Value Required IP_Addr (\d+\.\d+\.\d+\.\d+) Value MAC_Addr (\S{2}:\S{2}:\S{2}:\S{2}:\S{2}:\S{2}) @@ -9,6 +8,6 @@ Value Type (\S+) Value Interface (.+) Start - ^.?\w:${NAME}(#|>) /?show router arp + ^.?\w:\S+(#|>) /?show router arp ^ARP Table .Router. ${Router}. ^${IP_Addr}\s+${MAC_Addr}\s+\S+\s+${Type}\s+${Interface} -> Continue.Record \ No newline at end of file diff --git a/TemplatesTimos/6/sh_rtr_bfd_session.template b/TemplatesTimos/6/sh_rtr_bfd_session.template index 6a05c46..674b23b 100644 --- a/TemplatesTimos/6/sh_rtr_bfd_session.template +++ b/TemplatesTimos/6/sh_rtr_bfd_session.template @@ -1,7 +1,6 @@ #Command: /show router bfd session #Timos: 6 #Version: 1.0.0 -Value NAME (\S+) Value Required Session_ID (.+?) Value State ([uU][pP]|[Dd][oO]?[wW][nN]) Value Required RemAddess (\d+\.\d+\.\d+\.\d+) @@ -11,7 +10,7 @@ Value Multipl (\d+) Value Protocols (\D+.+?) Start - ^.?\w:${NAME}(#|>) /?show router bfd session + ^.?\w:\S+(#|>) /?show router bfd session ^${Session_ID}\s+${State}\s+\d+\s+\d+ -> Continue ^\s{2}${RemAddess}\s+${Multipl}\s+${Tx_Intvl}\s+${Rx_Intvl} -> Continue ^\s{2}${Protocols}\s+central\s+.+\s+.+ -> Record diff --git a/TemplatesTimos/6/sh_rtr_bgp_neigh.template b/TemplatesTimos/6/sh_rtr_bgp_neigh.template index ffae925..3c76fda 100644 --- a/TemplatesTimos/6/sh_rtr_bgp_neigh.template +++ b/TemplatesTimos/6/sh_rtr_bgp_neigh.template @@ -2,15 +2,14 @@ #majorDown: Active,Idle,Connect #Timos: 6 #Version: 1.0.0 -Value NAME (\S+) Value Peer (\d+\.\d+\.\d+\.\d+) Value Group (.+) Value State (\S+) Value Last_State (\S+) Start - ^\w:${NAME}(#|>) /show router bgp neighbor - ^.?\w:${NAME}(#|>) /?show router bgp neighbor + ^\w:\S+(#|>) /show router bgp neighbor + ^.?\w:\S+(#|>) /?show router bgp neighbor ^Peer\s+.\s${Peer} ^Group\s+.\s${Group} ^State\s+.\s${State}\s+Last State\s+.\s${Last_State} -> Continue.Record \ No newline at end of file diff --git a/TemplatesTimos/6/sh_rtr_iface.template b/TemplatesTimos/6/sh_rtr_iface.template index 3aaedec..c77bd76 100644 --- a/TemplatesTimos/6/sh_rtr_iface.template +++ b/TemplatesTimos/6/sh_rtr_iface.template @@ -1,7 +1,6 @@ #Command: /show router interface #Timos: 6 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Required INTERFACE_NAME (.+?) Value Filldown PLANE (Base) Value Required INTERFACE_ADM ([uU][pP]|[Dd][oO][wW][nN]) @@ -13,8 +12,8 @@ Value Required INTERFACE_IP ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}/[ Value PfxState (\S+) Start - ^\w:${NAME}(#|>) /show router interface - ^.\w:${NAME}(#|>) /?show router interface + ^\w:\S+(#|>) /show router interface + ^.\w:\S+(#|>) /?show router interface ^Interface\sTable\s.Router.\s${PLANE}. ^${INTERFACE_NAME}\s+?${INTERFACE_ADM}\s+${INTERFACE_OPR_IPV4}.${INTERFACE_OPR_IPV6}\s+${INTERFACE_MODE}\s+${INTERFACE_PORT} -> Continue ^\s+${INTERFACE_IP}\s+${PfxState} -> Record diff --git a/TemplatesTimos/6/sh_rtr_mpls_iface.template b/TemplatesTimos/6/sh_rtr_mpls_iface.template index 2f67d10..58297ca 100644 --- a/TemplatesTimos/6/sh_rtr_mpls_iface.template +++ b/TemplatesTimos/6/sh_rtr_mpls_iface.template @@ -1,7 +1,6 @@ #Command: /show router mpls interface #Timos: 6 #Version: 1.0.0 -Value NAME (\S+) Value Required Interface (.+?) Value Port_ID (.+?) Value Required Adm ([uU][pP]|[Dd][oO][wW][nN]) @@ -9,6 +8,6 @@ Value Required Opr_v4v6 (\S+) Value TE_Metric (\S+) Start - ^\w:${NAME}(#|>) /show router mpls interface - ^.?\w:${NAME}(#|>) /?show router mpls interface + ^\w:\S+(#|>) /show router mpls interface + ^.?\w:\S+(#|>) /?show router mpls interface ^${Interface}\s{2}\s+${Port_ID}\s{2}\s+${Adm}\s+${Opr_v4v6}\s+${TE_Metric}? -> Continue.Record \ No newline at end of file diff --git a/TemplatesTimos/6/sh_rtr_mpls_lsp.template b/TemplatesTimos/6/sh_rtr_mpls_lsp.template index 2fd111f..e1da119 100644 --- a/TemplatesTimos/6/sh_rtr_mpls_lsp.template +++ b/TemplatesTimos/6/sh_rtr_mpls_lsp.template @@ -1,7 +1,6 @@ #Command: /show router mpls lsp #Timos: 6 #Version: 1.0.0 -Value NAME (\S+) Value Required LSP_name (.+?) Value Required Adm ([uU][pP]|[Dd][oO]?[wW][nN]) Value Required Opr ([uU][pP]|[Dd][oO]?[wW][nN]) @@ -9,8 +8,8 @@ Value To (\d+\.\d+\.\d+\.\d+) Start - ^\w:${NAME}(#|>) /show router mpls lsp - ^.?\w:${NAME}(#|>) /?show router mpls lsp + ^\w:\S+(#|>) /show router mpls lsp + ^.?\w:\S+(#|>) /?show router mpls lsp ^${LSP_name}\s{2}\s+${To}\s+\S+\s+${Adm}\s+${Opr} -> Record ^${LSP_name}\s+${To}\s+\S+\s+\S+\s+${Adm}\s+${Opr} -> Continue.Record ^${LSP_name}\s+\S+\s+\S+\s+${Adm}\s+${Opr} diff --git a/TemplatesTimos/6/sh_rtr_mpls_path.template b/TemplatesTimos/6/sh_rtr_mpls_path.template index ddf5d21..78db36a 100644 --- a/TemplatesTimos/6/sh_rtr_mpls_path.template +++ b/TemplatesTimos/6/sh_rtr_mpls_path.template @@ -1,7 +1,6 @@ #Command: /show router mpls path #Timos: 6 #Version: 1.0.0 -Value NAME (\S+) Value Filldown Path_name (\S+) Value Filldown,Required Admin ([uU][pP]|[Dd][oO][wW][nN]) Value Required Hop_index ([Nn][oO]\s[Hh][oO][Pp][Ss]|\d+) @@ -9,8 +8,8 @@ Value Required Strict_Loose (\S+) Value IP_Addr ((\d+.\d+.\d+.\d+)|\S+) Start - ^\w:${NAME}(#|>) /show router mpls path - ^.?\w:${NAME}(#|>) /?show router mpls path + ^\w:\S+(#|>) /show router mpls path + ^.?\w:\S+(#|>) /?show router mpls path ^${Path_name}\s+${Admin}\s+${Hop_index}\s+${IP_Addr}\s+${Strict_Loose} -> Continue.Record ^\s+${Hop_index}\s+${IP_Addr}\s+${Strict_Loose} -> Continue.Record ^${Path_name}$$ -> Continue.Record diff --git a/TemplatesTimos/6/sh_rtr_ospf_iface.template b/TemplatesTimos/6/sh_rtr_ospf_iface.template index 1125c4b..1350ae6 100644 --- a/TemplatesTimos/6/sh_rtr_ospf_iface.template +++ b/TemplatesTimos/6/sh_rtr_ospf_iface.template @@ -1,7 +1,6 @@ #Command: /show router ospf interface #Timos: 6 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Key,Required INTERFACE_NAME (.+?) Value AREA_ID ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}) Value DESIGNATED_RTR ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}) @@ -10,6 +9,6 @@ Value ADM ([uU][pP]|[Dd][oO][wW][nN]) Value OPER (\w{1,4}) Start - ^.?\w:${NAME}(#|>) /?show router ospf interface + ^.?\w:\S+(#|>) /?show router ospf interface ^${INTERFACE_NAME}\s+${AREA_ID}\s+${DESIGNATED_RTR}\s+${BKUP_DESIG_RTR}\s+${ADM}\s+${OPER} -> Record diff --git a/TemplatesTimos/6/sh_rtr_ospf_neigh.template b/TemplatesTimos/6/sh_rtr_ospf_neigh.template index 99a95a4..6f3e15f 100644 --- a/TemplatesTimos/6/sh_rtr_ospf_neigh.template +++ b/TemplatesTimos/6/sh_rtr_ospf_neigh.template @@ -2,7 +2,6 @@ #majorDown: Attempt,Init,Two Way,Exchange start,Exchange,Loading #Timos: 6 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Required Interface_Name (.+) Value Rtr_Id (\d+\.\d+\.\d+\.\d+) Value State (\S+) @@ -12,6 +11,6 @@ Value TTL (\d+) Start - ^\w:${NAME}(#|>) /show router \S+ ospf neighbor - ^.?\w:${NAME}(#|>) /?show router \S+ ospf neighbor + ^\w:\S+(#|>) /show router \S+ ospf neighbor + ^.?\w:\S+(#|>) /?show router \S+ ospf neighbor ^${Interface_Name}\s+${Rtr_Id}\s+${State}\s+${Pri}\s+${RetxQ}\s+${TTL} -> Continue.Record diff --git a/TemplatesTimos/6/sh_rtr_rsvp_iface.template b/TemplatesTimos/6/sh_rtr_rsvp_iface.template index 2a30e54..c974673 100644 --- a/TemplatesTimos/6/sh_rtr_rsvp_iface.template +++ b/TemplatesTimos/6/sh_rtr_rsvp_iface.template @@ -1,7 +1,6 @@ #Command: /show router rsvp interface #Timos: 6 #Version: 1.0.0 -Value NAME (\S+) Value Required Interface (.+?) Value Adm ([uU][pP]|[Dd][oO]?[wW][nN]) Value Opr ([uU][pP]|[Dd][oO]?[wW][nN]) @@ -11,5 +10,5 @@ Value Total_BW (\d+|\-) Value Resv_BW (\d+|\-) Start - ^.?\w:${NAME}(#|>) /?show router rsvp interface + ^.?\w:\S+(#|>) /?show router rsvp interface ^${Interface}\s+?${Total}\s+${Active}\s+${Total_BW}\s+${Resv_BW}\s+${Adm}\s+${Opr} -> Continue.Record \ No newline at end of file diff --git a/TemplatesTimos/6/sh_rtr_rt_tbl_summ.template b/TemplatesTimos/6/sh_rtr_rt_tbl_summ.template index a57d1c8..391ed72 100644 --- a/TemplatesTimos/6/sh_rtr_rt_tbl_summ.template +++ b/TemplatesTimos/6/sh_rtr_rt_tbl_summ.template @@ -1,7 +1,6 @@ #Command: /show router route-table summary #Timos: 6 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Required Router (\S+) Value Act_Aggregate (\d+) Value Av_Aggregate (\d+) @@ -49,8 +48,8 @@ Value Act_VPN_Leak (\d+) Value Av_VPN_Leak (\d+) Start - ^\w:${NAME}(#|>) /show router route-table summary - ^.?\w:${NAME}(#|>) /?show router route.table summary + ^\w:\S+(#|>) /show router route-table summary + ^.?\w:\S+(#|>) /?show router route.table summary ^Route Table Summary .Router. ${Router}. ^Aggregate\s+${Act_Aggregate}\s+${Av_Aggregate} ^ARP-ND\s+${Act_APR_ND}\s+${Av_APR_ND} diff --git a/TemplatesTimos/6/sh_rtr_var_arp.template b/TemplatesTimos/6/sh_rtr_var_arp.template index d1a4631..e7f15bd 100644 --- a/TemplatesTimos/6/sh_rtr_var_arp.template +++ b/TemplatesTimos/6/sh_rtr_var_arp.template @@ -1,7 +1,6 @@ #Command: /show router \S+ arp #Timos: 6 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Filldown,Required Service (\S+) Value Required IP_Addr (\d+\.\d+\.\d+\.\d+) Value MAC_Addr (\S{2}:\S{2}:\S{2}:\S{2}:\S{2}:\S{2}) @@ -9,7 +8,7 @@ Value Type (\S+) Value Interface (.+) Start - ^\w:${NAME}(#|>) /show router \S+ arp - ^.?\w:${NAME}(#|>) /?show router \S+ arp + ^\w:\S+(#|>) /show router \S+ arp + ^.?\w:\S+(#|>) /?show router \S+ arp ^ARP Table .Service. ${Service}. ^${IP_Addr}\s+(${MAC_Addr}\s+)?\S+\s+${Type}\s+${Interface} -> Continue.Record \ No newline at end of file diff --git a/TemplatesTimos/6/sh_rtr_var_iface.template b/TemplatesTimos/6/sh_rtr_var_iface.template index be312bc..9c5b3a9 100644 --- a/TemplatesTimos/6/sh_rtr_var_iface.template +++ b/TemplatesTimos/6/sh_rtr_var_iface.template @@ -1,7 +1,6 @@ #Command: /show router \S+ interface #Timos: 6 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Required Interf_Name (.+?) Value Filldown VPRN (\S+) Value Interf_ADM ([uU][pP]|[Dd][oO][wW][nN]) @@ -13,7 +12,7 @@ Value Required Interf_IP (\S+) Value Pfx_State (\S+) Start - ^.?\w:${NAME}(#|>) /?show router ${VPRN} interface + ^.?\w:\S+(#|>) /?show router ${VPRN} interface ^Interface\sTable\s.Service.\s${VPRN}. ^${Interf_Name}\s+${Interf_ADM}\s+${Interf_OPR_IPV4}.${Interf_OPR_IPV6}\s+${Interf_Mode}\s+${Interf_Port} -> Continue ^\s+${Interf_IP}\s+${Pfx_State} -> Record diff --git a/TemplatesTimos/6/sh_rtr_var_rt_tbl_summ.template b/TemplatesTimos/6/sh_rtr_var_rt_tbl_summ.template index 0626e02..4c7300a 100644 --- a/TemplatesTimos/6/sh_rtr_var_rt_tbl_summ.template +++ b/TemplatesTimos/6/sh_rtr_var_rt_tbl_summ.template @@ -1,7 +1,6 @@ #Command: /show router \S+ route-table summary #Timos: 6 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Required Service (\S+) Value Act_Static (\d+) Value Av_Static (\d+) @@ -25,7 +24,7 @@ Value Act_Sub_Mgmt (\d+) Value Av_Sub_Mgmt (\d+) Start - ^.?\w:${NAME}(#|>) /?show router \S+ route.table summary + ^.?\w:\S+(#|>) /?show router \S+ route.table summary ^Route Table Summary .Service. ${Service}. ^Static\s+${Act_Static}\s+${Av_Static} ^Direct\s+${Act_Direct}\s+${Av_Direct} diff --git a/TemplatesTimos/6/sh_srv_sap_using.template b/TemplatesTimos/6/sh_srv_sap_using.template index da2c9c9..8061e57 100644 --- a/TemplatesTimos/6/sh_srv_sap_using.template +++ b/TemplatesTimos/6/sh_srv_sap_using.template @@ -1,7 +1,6 @@ #Command: /show service sap-using #Timos: 6 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Required PortId (\S+) Value Required SvcId ([0-9]{1,15}) Value Required IngQoS (\S+) @@ -12,8 +11,8 @@ Value Required Adm ([uU][pP]|[Dd][oO][wW][nN]) Value Required Opr ([uU][pP]|[Dd][oO][wW][nN]) Start - ^\w:${NAME}(#|>) /show service sap-using - ^.\w:${NAME}(#|>) /show service sap-using + ^\w:\S+(#|>) /show service sap-using + ^.\w:\S+(#|>) /show service sap-using ^${PortId}\s+${SvcId}\s+${IngQoS}\s+${IngFltr}\s+${EgrFltr}\s+${Adm}\s+${Opr} -> Record ^${PortId}\s+${SvcId}\s+${IngQoS}\s+${IngFltr}\s+${EgrQoS}\s+${EgrFltr}\s+${Adm}\s+${Opr} -> Record diff --git a/TemplatesTimos/6/sh_srv_sdp_using.template b/TemplatesTimos/6/sh_srv_sdp_using.template index 856c469..7092f8f 100644 --- a/TemplatesTimos/6/sh_srv_sdp_using.template +++ b/TemplatesTimos/6/sh_srv_sdp_using.template @@ -4,7 +4,6 @@ #Description: This template is used to see sdp-using #Variables: Router_Name SDP_SVC_ID SDP_IDU SDP_TYPE SDP_FAR_END SDP_OPR_STATE #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required SDP_SVC_ID ([0-9]{1,12}) Value Required SDP_IDU ([0-9]{1,12}:[0-9]{1,12}) Value Required SDP_TYPE (\S+) @@ -12,8 +11,8 @@ Value Required SDP_FAR_END ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}) Value Required SDP_OPR_STATE ([uU][pP]|[Dd][oO][wW][nN]) Start - ^\w:${NAME}(#|>) /show service sdp-using - ^.\w:${NAME}(#|>) /show service sdp-using + ^\w:\S+(#|>) /show service sdp-using + ^.\w:\S+(#|>) /show service sdp-using ^${SDP_SVC_ID}\s+${SDP_IDU}\s+${SDP_TYPE}\s+${SDP_FAR_END}\s+${SDP_OPR_STATE} -> Record EOF diff --git a/TemplatesTimos/6/sh_srv_srv_using.template b/TemplatesTimos/6/sh_srv_srv_using.template index efe2cb0..957cec3 100644 --- a/TemplatesTimos/6/sh_srv_srv_using.template +++ b/TemplatesTimos/6/sh_srv_srv_using.template @@ -4,7 +4,6 @@ #Description: This template is used to see service-using #Variables: Router_Name ServiceId Type Adm Opr CustomerId #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required ServiceId ([0-9]{1,15}) Value Type (\S+) Value Adm ([uU][pP]|[Dd][oO][wW][nN]) @@ -12,6 +11,6 @@ Value Opr ([uU][pP]|[Dd][oO][wW][nN]) Value CustomerId ([0-9]{1,15}) Start - ^\w:${NAME}(#|>) /show service service-using - ^.\w:${NAME}(#|>) /show service service-using + ^\w:\S+(#|>) /show service service-using + ^.\w:\S+(#|>) /show service service-using ^${ServiceId}\s+${Type}\s+${Adm}\s+${Opr}\s+${CustomerId} -> Record diff --git a/TemplatesTimos/6/sh_sys_cpu.template b/TemplatesTimos/6/sh_sys_cpu.template index 34476d0..731e31d 100644 --- a/TemplatesTimos/6/sh_sys_cpu.template +++ b/TemplatesTimos/6/sh_sys_cpu.template @@ -3,7 +3,6 @@ #Version: 1.0.0 #Variables Router_Name CPU_Total_Time_uSec CPU_Usage_Total CPU_Idle_uSec CPU_Idle CPU_Usage_uSec CPU_Usage Port Busiest_Core_Utilization_uSec Busiest_Core_Utilization_Usage #Autor Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required CPU_Total_Time_uSec (\S+) Value Required CPU_Usage_Total (\S+) Value Required CPU_Idle_uSec (\S+) @@ -14,8 +13,8 @@ Value Required Busiest_Core_Utilization_uSec (\S+) Value Required Busiest_Core_Utilization_Usage (\S+) Start - ^\w:${NAME}(#|>) /show system cpu - ^.\w:${NAME}(#|>) /show system cpu + ^\w:\S+(#|>) /show system cpu + ^.\w:\S+(#|>) /show system cpu ^Total\s+${CPU_Total_Time_uSec}\s+${CPU_Usage_Total} ^\s+Idle\s+${CPU_Idle_uSec}\s+${CPU_Idle} ^\s+Usage\s+${CPU_Usage_uSec}\s+${CPU_Usage} diff --git a/TemplatesTimos/6/sh_sys_info.template b/TemplatesTimos/6/sh_sys_info.template index 0921d4c..c6b14f4 100644 --- a/TemplatesTimos/6/sh_sys_info.template +++ b/TemplatesTimos/6/sh_sys_info.template @@ -1,14 +1,13 @@ #Command: /show system information #Timos: 6 #Version: 1.0.0 -Value NAME (\S+) Value SNMP_Oper_State (\S+) Value SNMP_Index_Boot_Status (\S+(\s\S+)?) Value SNMP_Sync_State (\S+) Start - ^\w:${NAME}(#|>) /show system information - ^.?\w:${NAME}(#|>) /?show system information + ^\w:\S+(#|>) /show system information + ^.?\w:\S+(#|>) /?show system information ^SNMP Oper State\s+.\s+${SNMP_Oper_State} ^SNMP Index Boot Status\s+.\s+${SNMP_Index_Boot_Status} ^SNMP Sync State\s+.\s+${SNMP_Sync_State} \ No newline at end of file diff --git a/TemplatesTimos/6/sh_sys_ntp_detail.template b/TemplatesTimos/6/sh_sys_ntp_detail.template index 7c17333..284651c 100644 --- a/TemplatesTimos/6/sh_sys_ntp_detail.template +++ b/TemplatesTimos/6/sh_sys_ntp_detail.template @@ -1,7 +1,6 @@ #Command: /show system ntp detail #Timos: 6 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Enabled_Configured (\S+) Value Stratum (\S+) Value Admin_Status ([uU][pP]|[Dd][oO][wW][nN]) @@ -14,7 +13,7 @@ Value MDA_Timestamp (\S+) Value Required DateAndTime (\S+.\S+.\S+\s\S+.\S+.\S+\s\S+) Start - ^.?\w:${NAME}(#|>) /?show system ntp + ^.?\w:\S+(#|>) /?show system ntp ^Enabled\s+:\s${Enabled_Configured}\s+Stratum\s+:\s${Stratum} ^Configured\s+:\s${Enabled_Configured}\s+Stratum\s+:\s${Stratum} ^Admin\sStatus\s+:\s${Admin_Status}\s+Oper\sStatus\s+:\s${Oper_Status} diff --git a/TemplatesTimos/6/sh_sys_ptp.template b/TemplatesTimos/6/sh_sys_ptp.template index 6090780..6ff51af 100644 --- a/TemplatesTimos/6/sh_sys_ptp.template +++ b/TemplatesTimos/6/sh_sys_ptp.template @@ -2,7 +2,6 @@ #majorDown: Master Holdover,Master Free Run #Timos: 6 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Clk_Idx (\S+) Value Source_IP ((\d+\.\d+\.\d+.\d+)|(n/a)) Value Clock_type (\S+) @@ -13,5 +12,5 @@ Value Node_ref (\S+) Value Time_ref_priority (\S+) Start - ^\?w:${NAME}(#|>) /?show system ptp + ^\?w:\S+(#|>) /?show system ptp ^${Clk_Idx}\s+${Source_IP}\s+${Clock_type}\s+${MDA}\s+${Admin_Status}\s+${PTP_Clock_ID}\s+${Node_ref}?\s+${Time_ref_priority} -> Continue.Record \ No newline at end of file diff --git a/TemplatesTimos/6/sh_sys_sync_if_timing.template b/TemplatesTimos/6/sh_sys_sync_if_timing.template index bb1f601..4e44e7e 100644 --- a/TemplatesTimos/6/sh_sys_sync_if_timing.template +++ b/TemplatesTimos/6/sh_sys_sync_if_timing.template @@ -5,7 +5,6 @@ #Description: This template is used to see the system sync if timing #Variables: Router_Name Status_CPM Ref_Input_Mode Quality_Level_Selection Ref_Select Sys_Quality_Level Ref_Order Ref_Order Ref_Input Admin_Status Rx_Quality_Level Qualified_For_Use Selected_For_Use Source_Port Source_PTP_Clock #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Status_CPM (\S+\s\S+|\S+) Value Ref_Input_Mode (\S+) Value Quality_Level_Selection (Enabled|Disabled) @@ -27,8 +26,8 @@ Value Key Source_PTP_Clock (\S+) Value Type (.+) Start - ^\w:${NAME}(#|>) /show system sync-if-timing - ^.\w:${NAME}(#|>) /show system sync-if-timing + ^\w:\S+(#|>) /show system sync-if-timing + ^.\w:\S+(#|>) /show system sync-if-timing ^System\sStatus\sCPM\s\w\s+:\s${Status_CPM} ^\s+Reference\sInput\sMode\s+:\s${Ref_Input_Mode} ^\s+Quality\sLevel\sSelection\s+:\s${Quality_Level_Selection} diff --git a/TemplatesTimos/6/sh_time.template b/TemplatesTimos/6/sh_time.template index 778ffd3..db49813 100644 --- a/TemplatesTimos/6/sh_time.template +++ b/TemplatesTimos/6/sh_time.template @@ -1,7 +1,6 @@ #Command: /show time #Timos: 6 #Version: 1.0.0 -Value Filldown NAME (\S+) Value wkDay (\S+) Value month (\S+) Value day (\S+) @@ -10,5 +9,5 @@ Value timeZone (\S+) Value Year (\d+) Start - ^\?w:${NAME}(#|>) /?show time + ^\?w:\S+(#|>) /?show time ^${wkDay}\s+${month}\s+${day}\s+${time}\s+${timeZone}\s+${Year} -> Record \ No newline at end of file diff --git a/TemplatesTimos/6/sh_uptime.template b/TemplatesTimos/6/sh_uptime.template index 8d04b52..3dbef5c 100644 --- a/TemplatesTimos/6/sh_uptime.template +++ b/TemplatesTimos/6/sh_uptime.template @@ -1,12 +1,11 @@ #Command: /show uptime #Timos: 6 #Version: 1.0.0 -Value Filldown NAME (\S+) Value days (\d+) Value hr (\d+) Value min (\d+) Value sec (\S+) Start - ^\?w:${NAME}(#|>) /?show uptime + ^\?w:\S+(#|>) /?show uptime ^System Up Time\s+.\s+${days} days.\s+${hr}.${min}.${sec}\s+.+ \ No newline at end of file diff --git a/TemplatesTimos/8/sh_bof.template b/TemplatesTimos/8/sh_bof.template index 011998f..40b1a20 100644 --- a/TemplatesTimos/8/sh_bof.template +++ b/TemplatesTimos/8/sh_bof.template @@ -1,7 +1,6 @@ #Command: /show bof #Timos: 8 #Version: 1.0.0 -Value Filldown NAME (\S+) Value pr_image (.+) Value pr_config (.+) Value autonegotiate (autonegotiate) @@ -12,7 +11,7 @@ Value persist (\S+) Value console_speed (\S+) Start - ^\?w:${NAME}(#|>) /?show bof + ^\?w:\S+(#|>) /?show bof ^\s+primary.image\s+${pr_image} ^\s+primary.config\s+${pr_config} ^\s+${autonegotiate} diff --git a/TemplatesTimos/8/sh_card.template b/TemplatesTimos/8/sh_card.template index 9945e52..3d44e97 100644 --- a/TemplatesTimos/8/sh_card.template +++ b/TemplatesTimos/8/sh_card.template @@ -1,7 +1,6 @@ #Command: /show card #Timos: 8 #Version: 1.0.0 -Value NAME (\S+) Value Required Slot_ID (\S+) Value Prov_Type (\S+) Value Eq_Type (\S+) @@ -10,6 +9,6 @@ Value Opr (\S+) Value Comments (\S+) Start - ^.?\w:${NAME}(#|>) /show card + ^.?\w:\S+(#|>) /show card ^${Slot_ID}\s+${Prov_Type}\s+${Adm}\s+${Opr}\s+${Comments}? -> Continue.Record ^${Slot_ID}\s+${Prov_Type}\s+${Eq_Type}\s+${Adm}\s+${Opr}\s+(\d+\s+)?(\d+\s+)?${Comments}? -> Continue.Record \ No newline at end of file diff --git a/TemplatesTimos/8/sh_chassis.template b/TemplatesTimos/8/sh_chassis.template index e33bcb9..c518a09 100644 --- a/TemplatesTimos/8/sh_chassis.template +++ b/TemplatesTimos/8/sh_chassis.template @@ -1,12 +1,11 @@ #Command: /show chassis #Timos: 8 #Version: 1.0.0 -Value NAME (\S+) Value Type (.+) Value MAC (\S+) Start - ^.?\w:${NAME}(#|>) /show chassis - ^\s+Name\s+:\s+${NAME} + ^.?\w:\S+(#|>) /show chassis + ^\s+Name\s+:\s+\S+ ^\s{2,4}Type\s+:\s+${Type} ^\s+Base MAC address\s+:\s+${MAC} diff --git a/TemplatesTimos/8/sh_mda_detail.template b/TemplatesTimos/8/sh_mda_detail.template index dd27d24..794a868 100644 --- a/TemplatesTimos/8/sh_mda_detail.template +++ b/TemplatesTimos/8/sh_mda_detail.template @@ -1,7 +1,6 @@ #Command: /show mda detail #Timos: 8 #Version: 1.0.0 -Value NAME (\S+) Value Slot_ID (\S+) Value MDA (\d+) Value Prov_Type (\S+) @@ -10,6 +9,6 @@ Value Adm ([uU][pP]|[Dd][oO]?[wW][nN]) Value Opr (\S+) Start - ^.?\w:${NAME}(#|>) /show mda detail + ^.?\w:\S+(#|>) /show mda detail ^${Slot_ID}\s+${MDA}\s+${Prov_Type}\s+${Adm}\s+${Opr} -> Continue.Record ^${Slot_ID}\s+${MDA}\s+${Prov_Type}\s+${Eq_Type}\s+${Adm}\s+${Opr} -> Record \ No newline at end of file diff --git a/TemplatesTimos/8/sh_port_det_intvrs.template b/TemplatesTimos/8/sh_port_det_intvrs.template index 4796837..2493beb 100644 --- a/TemplatesTimos/8/sh_port_det_intvrs.template +++ b/TemplatesTimos/8/sh_port_det_intvrs.template @@ -3,7 +3,6 @@ #Version: 1.0.0 #Comments: Version able to compare information between those Timos. However, this version didn't display all port detail information from timos 21. #Replace: (accs,access),(netw,network),(up,Up),(down,Down) -Value Filldown NAME (\S+) Value Filldown Slot (\S+) Value Required PortID (\S+) Value AdminState ([uU][pP]|[Dd][oO][wW][nN]) @@ -15,7 +14,7 @@ Value PortEncp (\S+) Value PortType (\S+) Start - ^.?\w:${NAME}(#|>) /?show port detail + ^.?\w:\S+(#|>) /?show port detail ^Interface\s+.\s+${PortID}.+ -> Continue ^Admin State\s+.\s+${AdminState}.+ -> Continue ^Oper State\s+.\s+${PortState}.+ -> Continue diff --git a/TemplatesTimos/8/sh_port_detail.template b/TemplatesTimos/8/sh_port_detail.template index 5e8d5ab..5d136fd 100644 --- a/TemplatesTimos/8/sh_port_detail.template +++ b/TemplatesTimos/8/sh_port_detail.template @@ -1,7 +1,6 @@ #Command: /show port detail #Timos: 8 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Filldown Slot (\S+) Value Required PortID (\S+) Value AdminState ([uU][pP]|[Dd][oO][wW][nN]) @@ -16,6 +15,6 @@ Value PortType (\S+) Value SPF_XPF_MDIMDX (.+?) Start - ^.?\w:${NAME}(#|>) /?show port detail + ^.?\w:\S+(#|>) /?show port detail ^Ports on Slot ${Slot} ^${PortID}\s+${AdminState}\s+${Link}\s+${PortState}(\s+${CfgMTU}\s+${OperMTU}\s+${Lag_Bndl}\s+${PortMode}\s+${PortEncp}\s+${PortType}\s+${SPF_XPF_MDIMDX}?\s+?)? -> Continue.Record diff --git a/TemplatesTimos/8/sh_rtr_arp.template b/TemplatesTimos/8/sh_rtr_arp.template index b3cf86d..3ee4a7d 100644 --- a/TemplatesTimos/8/sh_rtr_arp.template +++ b/TemplatesTimos/8/sh_rtr_arp.template @@ -1,7 +1,6 @@ #Command: /show router arp #Timos: 8 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Filldown,Required Router (\S+) Value Required IP_Addr (\d+\.\d+\.\d+\.\d+) Value MAC_Addr (\S{2}:\S{2}:\S{2}:\S{2}:\S{2}:\S{2}) @@ -9,6 +8,6 @@ Value Type (\S+) Value Interface (.+) Start - ^.?\w:${NAME}(#|>) /?show router arp + ^.?\w:\S+(#|>) /?show router arp ^ARP Table .Router. ${Router}. ^${IP_Addr}\s+${MAC_Addr}\s+\S+\s+${Type}\s+${Interface} -> Continue.Record \ No newline at end of file diff --git a/TemplatesTimos/8/sh_rtr_iface.template b/TemplatesTimos/8/sh_rtr_iface.template index 046d0a9..02906c8 100644 --- a/TemplatesTimos/8/sh_rtr_iface.template +++ b/TemplatesTimos/8/sh_rtr_iface.template @@ -1,7 +1,6 @@ #Command: /show router interface #Timos: 8 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Required INTERFACE_NAME (.+?) Value Filldown PLANE (Base) Value Required INTERFACE_ADM ([uU][pP]|[Dd][oO][wW][nN]) @@ -13,8 +12,8 @@ Value Required INTERFACE_IP ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}/[ Value PfxState (\S+) Start - ^\w:${NAME}(#|>) /show router interface - ^.\w:${NAME}(#|>) /?show router interface + ^\w:\S+(#|>) /show router interface + ^.\w:\S+(#|>) /?show router interface ^Interface\sTable\s.Router.\s${PLANE}. ^${INTERFACE_NAME}\s+?${INTERFACE_ADM}\s+${INTERFACE_OPR_IPV4}.${INTERFACE_OPR_IPV6}\s+${INTERFACE_MODE}\s+${INTERFACE_PORT} -> Continue ^\s+${INTERFACE_IP}\s+${PfxState} -> Record diff --git a/TemplatesTimos/8/sh_rtr_isis_adj.template b/TemplatesTimos/8/sh_rtr_isis_adj.template index c430333..71c2f05 100644 --- a/TemplatesTimos/8/sh_rtr_isis_adj.template +++ b/TemplatesTimos/8/sh_rtr_isis_adj.template @@ -1,7 +1,6 @@ #Command: /show router isis adjacency #Timos: 8 #Version: 1.0.0 -Value NAME (\S+) Value Required System_ID (\S+) Value Usage (\S+) Value State ([uU][pP]|[Dd][oO]?[wW][nN]) @@ -9,6 +8,6 @@ Value Hold (\S+) Value Interface (\S+) Start - ^\w:${NAME}(#|>) /show router isis adjacency - ^.?\w:${NAME}(#|>) /?show router isis adjacency + ^\w:\S+(#|>) /show router isis adjacency + ^.?\w:\S+(#|>) /?show router isis adjacency ^${System_ID}\s+${Usage}\s+${State}\s+${Hold}\s+${Interface}(\s+\S+)? -> Continue.Record \ No newline at end of file diff --git a/TemplatesTimos/8/sh_rtr_isis_iface.template b/TemplatesTimos/8/sh_rtr_isis_iface.template index a786bab..210acb5 100644 --- a/TemplatesTimos/8/sh_rtr_isis_iface.template +++ b/TemplatesTimos/8/sh_rtr_isis_iface.template @@ -1,7 +1,6 @@ #Command: /show router isis \S+ interface #Timos: 8 #Version: 1.0.0 -Value NAME (\S+) Value Instance (\S+) Value Required Interface (\S+) Value Level (\S+) @@ -9,6 +8,6 @@ Value Oper_state ([uU][pP]|[Dd][oO]?[wW][nN]) Value L1_L2_Metric (.+) Start - ^\w:${NAME}(#|>) /show router isis ${Instance} interface - ^.?\w:${NAME}(#|>) /?show router isis ${Instance} interface + ^\w:\S+(#|>) /show router isis ${Instance} interface + ^.?\w:\S+(#|>) /?show router isis ${Instance} interface ^${Interface}\s+${Level}\s+\S+\s+${Oper_state}\s+${L1_L2_Metric} -> Continue.Record \ No newline at end of file diff --git a/TemplatesTimos/8/sh_rtr_isis_var_adj.template b/TemplatesTimos/8/sh_rtr_isis_var_adj.template index 1dff99e..e79c9e8 100644 --- a/TemplatesTimos/8/sh_rtr_isis_var_adj.template +++ b/TemplatesTimos/8/sh_rtr_isis_var_adj.template @@ -1,7 +1,6 @@ #Command: /show router isis \S+ adjacency #Timos: 8 #Version: 1.0.0 -Value NAME (\S+) Value Required,Filldown Instance (\S+) Value Required System_ID (\S+) Value Usage (\S+) @@ -10,7 +9,7 @@ Value Hold (\S+) Value Interface (\S+) Start - ^\w:${NAME}(#|>) /show router isis \S+ adjacency - ^.?\w:${NAME}(#|>) /?show router isis \S+ adjacency + ^\w:\S+(#|>) /show router isis \S+ adjacency + ^.?\w:\S+(#|>) /?show router isis \S+ adjacency ^Rtr.+Instance\s${Instance}.+ ^${System_ID}\s+${Usage}\s+${State}\s+${Hold}\s+${Interface}(\s+\S+)? -> Continue.Record \ No newline at end of file diff --git a/TemplatesTimos/8/sh_rtr_isis_var_iface.template b/TemplatesTimos/8/sh_rtr_isis_var_iface.template index b4b5d08..c936f2c 100644 --- a/TemplatesTimos/8/sh_rtr_isis_var_iface.template +++ b/TemplatesTimos/8/sh_rtr_isis_var_iface.template @@ -1,7 +1,6 @@ #Command: /show router isis \S+ interface #Timos: 8 #Version: 1.0.0 -Value NAME (\S+) Value Required Interface (\S+) Value Required,Filldown Instance (\S+) Value Level (\S+) @@ -9,7 +8,7 @@ Value Oper_state ([uU][pP]|[Dd][oO]?[wW][nN]) Value L1_L2_Metric (\S+/\S+) Start - ^\w:${NAME}(#|>) /show router isis \S+ interface - ^.?\w:${NAME}(#|>) /?show router isis \S+ interface + ^\w:\S+(#|>) /show router isis \S+ interface + ^.?\w:\S+(#|>) /?show router isis \S+ interface ^Rtr.+Instance\s${Instance}.+ ^${Interface}\s+${Level}\s+\S+\s+${Oper_state}\s+${L1_L2_Metric}(\s+\S+)? -> Continue.Record \ No newline at end of file diff --git a/TemplatesTimos/8/sh_rtr_mpls_iface.template b/TemplatesTimos/8/sh_rtr_mpls_iface.template index f92c597..1336e91 100644 --- a/TemplatesTimos/8/sh_rtr_mpls_iface.template +++ b/TemplatesTimos/8/sh_rtr_mpls_iface.template @@ -1,7 +1,6 @@ #Command: /show router mpls interface #Timos: 8 #Version: 1.0.0 -Value NAME (\S+) Value Required Interface (.+?) Value Port_ID (.+?) Value Required Adm ([uU][pP]|[Dd][oO][wW][nN]) @@ -9,6 +8,6 @@ Value Required Opr_v4v6 (\S+) Value TE_Metric (\S+) Start - ^\w:${NAME}(#|>) /show router mpls interface - ^.?\w:${NAME}(#|>) /?show router mpls interface + ^\w:\S+(#|>) /show router mpls interface + ^.?\w:\S+(#|>) /?show router mpls interface ^${Interface}\s{2}\s+${Port_ID}\s{2}\s+${Adm}\s+${Opr_v4v6}\s+${TE_Metric}? -> Continue.Record \ No newline at end of file diff --git a/TemplatesTimos/8/sh_rtr_mpls_lbl-rng.template b/TemplatesTimos/8/sh_rtr_mpls_lbl-rng.template index 3946c50..06a1fa6 100644 --- a/TemplatesTimos/8/sh_rtr_mpls_lbl-rng.template +++ b/TemplatesTimos/8/sh_rtr_mpls_lbl-rng.template @@ -1,7 +1,6 @@ #Command: /show router mpls.labels label.range #Timos: 8 #Version: 1.0.0 -Value NAME (\S+) Value Filldown Label (\S+) Value Type (\S+) Value Required Start_Label (\d+) @@ -11,7 +10,7 @@ Value Available (\S+) Value Total (\S+) Start - ^\w:${NAME}(#|>) /show router mpls.labels label.range - ^.?\w:${NAME}(#|>) /?show router mpls.labels label.range + ^\w:\S+(#|>) /show router mpls.labels label.range + ^.?\w:\S+(#|>) /?show router mpls.labels label.range ^${Label}\s+${Start_Label}\s+${End_Label}\s+${Aging}\s+${Available}\s+${Total} -> Continue.Record ^\s{4}${Type}\s+${Start_Label}\s+${End_Label}\s+${Aging}\s+${Available}\s+${Total} -> Continue.Record \ No newline at end of file diff --git a/TemplatesTimos/8/sh_rtr_mpls_lsp.template b/TemplatesTimos/8/sh_rtr_mpls_lsp.template index e1f4bfc..8b956df 100644 --- a/TemplatesTimos/8/sh_rtr_mpls_lsp.template +++ b/TemplatesTimos/8/sh_rtr_mpls_lsp.template @@ -1,7 +1,6 @@ #Command: /show router mpls lsp #Timos: 8 #Version: 1.0.0 -Value NAME (\S+) Value Required LSP_name (.+?) Value Required Adm ([uU][pP]|[Dd][oO]?[wW][nN]) Value Required Opr ([uU][pP]|[Dd][oO]?[wW][nN]) @@ -9,8 +8,8 @@ Value To (\d+\.\d+\.\d+\.\d+) Start - ^\w:${NAME}(#|>) /show router mpls lsp - ^.?\w:${NAME}(#|>) /?show router mpls lsp + ^\w:\S+(#|>) /show router mpls lsp + ^.?\w:\S+(#|>) /?show router mpls lsp ^${LSP_name}\s{2}\s+${To}\s+\S+\s+${Adm}\s+${Opr} -> Record ^${LSP_name}\s+${To}\s+\S+\s+\S+\s+${Adm}\s+${Opr} -> Continue.Record ^${LSP_name}\s+\S+\s+\S+\s+${Adm}\s+${Opr} diff --git a/TemplatesTimos/8/sh_rtr_mpls_path.template b/TemplatesTimos/8/sh_rtr_mpls_path.template index 210cc87..bc5a60d 100644 --- a/TemplatesTimos/8/sh_rtr_mpls_path.template +++ b/TemplatesTimos/8/sh_rtr_mpls_path.template @@ -1,7 +1,6 @@ #Command: /show router mpls path #Timos: 8 #Version: 1.0.0 -Value NAME (\S+) Value Filldown Path_name (\S+) Value Filldown,Required Admin ([uU][pP]|[Dd][oO][wW][nN]) Value Required Hop_index ([Nn][oO]\s[Hh][oO][Pp][Ss]|\d+) @@ -9,8 +8,8 @@ Value Required Strict_Loose (\S+) Value IP_Addr ((\d+.\d+.\d+.\d+)|\S+) Start - ^\w:${NAME}(#|>) /show router mpls path - ^.?\w:${NAME}(#|>) /?show router mpls path + ^\w:\S+(#|>) /show router mpls path + ^.?\w:\S+(#|>) /?show router mpls path ^${Path_name}\s+${Admin}\s+${Hop_index}\s+${IP_Addr}\s+${Strict_Loose} -> Continue.Record ^\s+${Hop_index}\s+${IP_Addr}\s+${Strict_Loose} -> Continue.Record ^${Path_name}$$ -> Continue.Record diff --git a/TemplatesTimos/8/sh_rtr_rsvp_iface.template b/TemplatesTimos/8/sh_rtr_rsvp_iface.template index 8fd0c2c..c1a78f0 100644 --- a/TemplatesTimos/8/sh_rtr_rsvp_iface.template +++ b/TemplatesTimos/8/sh_rtr_rsvp_iface.template @@ -1,7 +1,6 @@ #Command: /show router rsvp interface #Timos: 8 #Version: 1.0.0 -Value NAME (\S+) Value Required Interface (.+?) Value Adm ([uU][pP]|[Dd][oO]?[wW][nN]) Value Opr ([uU][pP]|[Dd][oO]?[wW][nN]) @@ -11,5 +10,5 @@ Value Total_BW (\d+|\-) Value Resv_BW (\d+|\-) Start - ^.?\w:${NAME}(#|>) /?show router rsvp interface + ^.?\w:\S+(#|>) /?show router rsvp interface ^${Interface}\s+?${Total}\s+${Active}\s+${Total_BW}\s+${Resv_BW}\s+${Adm}\s+${Opr} -> Continue.Record \ No newline at end of file diff --git a/TemplatesTimos/8/sh_rtr_rt_tbl_summ.template b/TemplatesTimos/8/sh_rtr_rt_tbl_summ.template index e51c4bf..9e19bbc 100644 --- a/TemplatesTimos/8/sh_rtr_rt_tbl_summ.template +++ b/TemplatesTimos/8/sh_rtr_rt_tbl_summ.template @@ -1,7 +1,6 @@ #Command: /show router route-table summary #Timos: 8 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Required Router (\S+) Value Act_Aggregate (\d+) Value Av_Aggregate (\d+) @@ -49,8 +48,8 @@ Value Act_VPN_Leak (\d+) Value Av_VPN_Leak (\d+) Start - ^\w:${NAME}(#|>) /show router route-table summary - ^.?\w:${NAME}(#|>) /?show router route.table summary + ^\w:\S+(#|>) /show router route-table summary + ^.?\w:\S+(#|>) /?show router route.table summary ^Route Table Summary .Router. ${Router}. ^Aggregate\s+${Act_Aggregate}\s+${Av_Aggregate} ^ARP-ND\s+${Act_APR_ND}\s+${Av_APR_ND} diff --git a/TemplatesTimos/8/sh_rtr_var_arp.template b/TemplatesTimos/8/sh_rtr_var_arp.template index bfe2bc0..418fcce 100644 --- a/TemplatesTimos/8/sh_rtr_var_arp.template +++ b/TemplatesTimos/8/sh_rtr_var_arp.template @@ -1,7 +1,6 @@ #Command: /show router \S+ arp #Timos: 8 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Filldown,Required Service (\S+) Value Required IP_Addr (\d+\.\d+\.\d+\.\d+) Value MAC_Addr (\S{2}:\S{2}:\S{2}:\S{2}:\S{2}:\S{2}) @@ -9,7 +8,7 @@ Value Type (\S+) Value Interface (.+) Start - ^\w:${NAME}(#|>) /show router \S+ arp - ^.?\w:${NAME}(#|>) /?show router \S+ arp + ^\w:\S+(#|>) /show router \S+ arp + ^.?\w:\S+(#|>) /?show router \S+ arp ^ARP Table .Service. ${Service}. ^${IP_Addr}\s+(${MAC_Addr}\s+)?\S+\s+${Type}\s+${Interface} -> Continue.Record \ No newline at end of file diff --git a/TemplatesTimos/8/sh_rtr_var_iface.template b/TemplatesTimos/8/sh_rtr_var_iface.template index ee1ed20..e88ae05 100644 --- a/TemplatesTimos/8/sh_rtr_var_iface.template +++ b/TemplatesTimos/8/sh_rtr_var_iface.template @@ -1,7 +1,6 @@ #Command: /show router \S+ interface #Timos: 8 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Required Interf_Name (.+?) Value Filldown VPRN (\S+) Value Interf_ADM ([uU][pP]|[Dd][oO][wW][nN]) @@ -13,7 +12,7 @@ Value Required Interf_IP (\S+) Value Pfx_State (\S+) Start - ^.?\w:${NAME}(#|>) /?show router ${VPRN} interface + ^.?\w:\S+(#|>) /?show router ${VPRN} interface ^Interface\sTable\s.Service.\s${VPRN}. ^${Interf_Name}\s+${Interf_ADM}\s+${Interf_OPR_IPV4}.${Interf_OPR_IPV6}\s+${Interf_Mode}\s+${Interf_Port} -> Continue ^\s+${Interf_IP}\s+${Pfx_State} -> Record diff --git a/TemplatesTimos/8/sh_rtr_var_rt_tbl_summ.template b/TemplatesTimos/8/sh_rtr_var_rt_tbl_summ.template index 447ecfc..3119aa7 100644 --- a/TemplatesTimos/8/sh_rtr_var_rt_tbl_summ.template +++ b/TemplatesTimos/8/sh_rtr_var_rt_tbl_summ.template @@ -1,7 +1,6 @@ #Command: /show router \S+ route-table summary #Timos: 8 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Required Service (\S+) Value Act_Static (\d+) Value Av_Static (\d+) @@ -25,7 +24,7 @@ Value Act_Sub_Mgmt (\d+) Value Av_Sub_Mgmt (\d+) Start - ^.?\w:${NAME}(#|>) /?show router \S+ route.table summary + ^.?\w:\S+(#|>) /?show router \S+ route.table summary ^Route Table Summary .Service. ${Service}. ^Static\s+${Act_Static}\s+${Av_Static} ^Direct\s+${Act_Direct}\s+${Av_Direct} diff --git a/TemplatesTimos/8/sh_srv_sap_using.template b/TemplatesTimos/8/sh_srv_sap_using.template index 6697f6c..677f5a7 100644 --- a/TemplatesTimos/8/sh_srv_sap_using.template +++ b/TemplatesTimos/8/sh_srv_sap_using.template @@ -1,7 +1,6 @@ #Command: /show service sap-using #Timos: 8 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Required PortId (\S+) Value Required SvcId ([0-9]{1,15}) Value Required IngQoS (\S+) @@ -12,8 +11,8 @@ Value Required Adm ([uU][pP]|[Dd][oO][wW][nN]) Value Required Opr ([uU][pP]|[Dd][oO][wW][nN]) Start - ^\w:${NAME}(#|>) /show service sap-using - ^.\w:${NAME}(#|>) /show service sap-using + ^\w:\S+(#|>) /show service sap-using + ^.\w:\S+(#|>) /show service sap-using ^${PortId}\s+${SvcId}\s+${IngQoS}\s+${IngFltr}\s+${EgrFltr}\s+${Adm}\s+${Opr} -> Record ^${PortId}\s+${SvcId}\s+${IngQoS}\s+${IngFltr}\s+${EgrQoS}\s+${EgrFltr}\s+${Adm}\s+${Opr} -> Record diff --git a/TemplatesTimos/8/sh_srv_sdp_using.template b/TemplatesTimos/8/sh_srv_sdp_using.template index acf0e34..d7772df 100644 --- a/TemplatesTimos/8/sh_srv_sdp_using.template +++ b/TemplatesTimos/8/sh_srv_sdp_using.template @@ -4,7 +4,6 @@ #Description: This template is used to see sdp-using #Variables: Router_Name SDP_SVC_ID SDP_IDU SDP_TYPE SDP_FAR_END SDP_OPR_STATE #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required SDP_SVC_ID ([0-9]{1,12}) Value Required SDP_IDU ([0-9]{1,12}:[0-9]{1,12}) Value Required SDP_TYPE (\S+) @@ -12,8 +11,8 @@ Value Required SDP_FAR_END ([0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}) Value Required SDP_OPR_STATE ([uU][pP]|[Dd][oO][wW][nN]) Start - ^\w:${NAME}(#|>) /show service sdp-using - ^.\w:${NAME}(#|>) /show service sdp-using + ^\w:\S+(#|>) /show service sdp-using + ^.\w:\S+(#|>) /show service sdp-using ^${SDP_SVC_ID}\s+${SDP_IDU}\s+${SDP_TYPE}\s+${SDP_FAR_END}\s+${SDP_OPR_STATE} -> Record EOF diff --git a/TemplatesTimos/8/sh_srv_srv_using.template b/TemplatesTimos/8/sh_srv_srv_using.template index 9df81c9..b81a221 100644 --- a/TemplatesTimos/8/sh_srv_srv_using.template +++ b/TemplatesTimos/8/sh_srv_srv_using.template @@ -2,7 +2,6 @@ #Timos: 8 #Version: 1.0.0 #Description: This template is used to see service-using -Value Filldown NAME (\S+) Value Required ServiceId ([0-9]{1,15}) Value Type (\S+) Value Adm ([uU][pP]|[Dd][oO][wW][nN]) @@ -10,6 +9,6 @@ Value Opr ([uU][pP]|[Dd][oO][wW][nN]) Value CustomerId ([0-9]{1,15}) Start - ^\w:${NAME}(#|>) /show service service-using - ^.\w:${NAME}(#|>) /show service service-using + ^\w:\S+(#|>) /show service service-using + ^.\w:\S+(#|>) /show service service-using ^${ServiceId}\s+${Type}\s+${Adm}\s+${Opr}\s+${CustomerId} -> Record diff --git a/TemplatesTimos/8/sh_sys_cpu.template b/TemplatesTimos/8/sh_sys_cpu.template index f2cbf57..c9e9cbd 100644 --- a/TemplatesTimos/8/sh_sys_cpu.template +++ b/TemplatesTimos/8/sh_sys_cpu.template @@ -3,7 +3,6 @@ #Version: 1.0.0 #Variables Router_Name CPU_Total_Time_uSec CPU_Usage_Total CPU_Idle_uSec CPU_Idle CPU_Usage_uSec CPU_Usage Port Busiest_Core_Utilization_uSec Busiest_Core_Utilization_Usage #Autor Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Required CPU_Total_Time_uSec (\S+) Value Required CPU_Usage_Total (\S+) Value Required CPU_Idle_uSec (\S+) @@ -14,8 +13,8 @@ Value Required Busiest_Core_Utilization_uSec (\S+) Value Required Busiest_Core_Utilization_Usage (\S+) Start - ^\w:${NAME}(#|>) /show system cpu - ^.\w:${NAME}(#|>) /show system cpu + ^\w:\S+(#|>) /show system cpu + ^.\w:\S+(#|>) /show system cpu ^Total\s+${CPU_Total_Time_uSec}\s+${CPU_Usage_Total} ^\s+Idle\s+${CPU_Idle_uSec}\s+${CPU_Idle} ^\s+Usage\s+${CPU_Usage_uSec}\s+${CPU_Usage} diff --git a/TemplatesTimos/8/sh_sys_info.template b/TemplatesTimos/8/sh_sys_info.template index f7833d2..3d67360 100644 --- a/TemplatesTimos/8/sh_sys_info.template +++ b/TemplatesTimos/8/sh_sys_info.template @@ -1,14 +1,13 @@ #Command: /show system information #Timos: 8 #Version: 1.0.0 -Value NAME (\S+) Value SNMP_Oper_State (\S+) Value SNMP_Index_Boot_Status (\S+(\s\S+)?) Value SNMP_Sync_State (\S+) Start - ^\w:${NAME}(#|>) /show system information - ^.?\w:${NAME}(#|>) /?show system information + ^\w:\S+(#|>) /show system information + ^.?\w:\S+(#|>) /?show system information ^SNMP Oper State\s+.\s+${SNMP_Oper_State} ^SNMP Index Boot Status\s+.\s+${SNMP_Index_Boot_Status} ^SNMP Sync State\s+.\s+${SNMP_Sync_State} \ No newline at end of file diff --git a/TemplatesTimos/8/sh_sys_ntp_detail.template b/TemplatesTimos/8/sh_sys_ntp_detail.template index f014447..255df2a 100644 --- a/TemplatesTimos/8/sh_sys_ntp_detail.template +++ b/TemplatesTimos/8/sh_sys_ntp_detail.template @@ -1,7 +1,6 @@ #Command: /show system ntp detail #Timos: 8 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Enabled_Configured (\S+) Value Stratum (\S+) Value Admin_Status ([uU][pP]|[Dd][oO][wW][nN]) @@ -14,7 +13,7 @@ Value MDA_Timestamp (\S+) Value Required DateAndTime (\S+.\S+.\S+\s\S+.\S+.\S+\s\S+) Start - ^.?\w:${NAME}(#|>) /?show system ntp + ^.?\w:\S+(#|>) /?show system ntp ^Enabled\s+:\s${Enabled_Configured}\s+Stratum\s+:\s${Stratum} ^Configured\s+:\s${Enabled_Configured}\s+Stratum\s+:\s${Stratum} ^Admin\sStatus\s+:\s${Admin_Status}\s+Oper\sStatus\s+:\s${Oper_Status} diff --git a/TemplatesTimos/8/sh_sys_ptp.template b/TemplatesTimos/8/sh_sys_ptp.template index b597043..f0c88fe 100644 --- a/TemplatesTimos/8/sh_sys_ptp.template +++ b/TemplatesTimos/8/sh_sys_ptp.template @@ -2,7 +2,6 @@ #majorDown: Master Holdover,Master Free Run #Timos: 8 #Version: 1.0.0 -Value Filldown NAME (\S+) Value Clk_Idx (\S+) Value Source_IP ((\d+\.\d+\.\d+.\d+)|(n/a)) Value Clock_type (\S+) @@ -13,5 +12,5 @@ Value Node_ref (\S+) Value Time_ref_priority (\S+) Start - ^\?w:${NAME}(#|>) /?show system ptp + ^\?w:\S+(#|>) /?show system ptp ^${Clk_Idx}\s+${Source_IP}\s+${Clock_type}\s+${MDA}\s+${Admin_Status}\s+${PTP_Clock_ID}\s+${Node_ref}?\s+${Time_ref_priority} -> Continue.Record \ No newline at end of file diff --git a/TemplatesTimos/8/sh_sys_sync_if_timing.template b/TemplatesTimos/8/sh_sys_sync_if_timing.template index 890576f..6448f97 100644 --- a/TemplatesTimos/8/sh_sys_sync_if_timing.template +++ b/TemplatesTimos/8/sh_sys_sync_if_timing.template @@ -5,7 +5,6 @@ #Description: This template is used to see the system sync if timing #Variables: Router_Name Status_CPM Ref_Input_Mode Quality_Level_Selection Ref_Select Sys_Quality_Level Ref_Order Ref_Order Ref_Input Admin_Status Rx_Quality_Level Qualified_For_Use Selected_For_Use Source_Port Source_PTP_Clock #Autor: Manuel Saldivar manuelsaldivar@outlook.com.ar -Value Filldown NAME (\S+) Value Status_CPM (\S+\s\S+|\S+) Value Ref_Input_Mode (\S+) Value Quality_Level_Selection (Enabled|Disabled) @@ -27,8 +26,8 @@ Value Key Source_PTP_Clock (\S+) Value Type (.+) Start - ^\w:${NAME}(#|>) /show system sync-if-timing - ^.\w:${NAME}(#|>) /show system sync-if-timing + ^\w:\S+(#|>) /show system sync-if-timing + ^.\w:\S+(#|>) /show system sync-if-timing ^System\sStatus\sCPM\s\w\s+:\s${Status_CPM} ^\s+Reference\sInput\sMode\s+:\s${Ref_Input_Mode} ^\s+Quality\sLevel\sSelection\s+:\s${Quality_Level_Selection} diff --git a/TemplatesTimos/8/sh_time.template b/TemplatesTimos/8/sh_time.template index a577ab4..91a93af 100644 --- a/TemplatesTimos/8/sh_time.template +++ b/TemplatesTimos/8/sh_time.template @@ -1,7 +1,6 @@ #Command: /show time #Timos: 8 #Version: 1.0.0 -Value Filldown NAME (\S+) Value wkDay (\S+) Value month (\S+) Value day (\S+) @@ -10,5 +9,5 @@ Value timeZone (\S+) Value Year (\d+) Start - ^\?w:${NAME}(#|>) /?show time + ^\?w:\S+(#|>) /?show time ^${wkDay}\s+${month}\s+${day}\s+${time}\s+${timeZone}\s+${Year} -> Record \ No newline at end of file diff --git a/TemplatesTimos/8/sh_uptime.template b/TemplatesTimos/8/sh_uptime.template index c2ae1b5..278c6e6 100644 --- a/TemplatesTimos/8/sh_uptime.template +++ b/TemplatesTimos/8/sh_uptime.template @@ -1,12 +1,11 @@ #Command: /show uptime #Timos: 8 #Version: 1.0.0 -Value Filldown NAME (\S+) Value days (\d+) Value hr (\d+) Value min (\d+) Value sec (\S+) Start - ^\?w:${NAME}(#|>) /?show uptime + ^\?w:\S+(#|>) /?show uptime ^System Up Time\s+.\s+${days} days.\s+${hr}.${min}.${sec}\s+.+ \ No newline at end of file diff --git a/changelog.md b/changelog.md index e301f0e..1dd4eb0 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,8 @@ +[3.4.0 - 2022-09-27] +- Control keywords for the templates to control the resulting columns in each report. +- CLI paramter to control wether we want to use the name of the router, its IP adress, or both. +- The variable `NAME` has bee removed from each and every template for the different Timos versions. + [3.2.3 - 2022-08-11] - Tables for differences and/or errors, are now sorted by all the column names defined under the template. This makes it easier to do the visual comparison of data. diff --git a/logAnalyzer.py b/logAnalyzer.py index f34660c..d413784 100755 --- a/logAnalyzer.py +++ b/logAnalyzer.py @@ -1,3 +1,4 @@ +# Copyright (C) 2022 Lucas Aimaretto / laimaretto@gmail.com # Copyright (C) 2020 Manuel Saldivar / manuelsaldivar@outlook.com.ar, Lucas Aimaretto / laimaretto@gmail.com # # This is logAnalyzer @@ -21,6 +22,19 @@ import re from ttp import ttp +DATA_VALUE = 'Value' +DATA_COMMAND = '#Command:' +DATA_MAJOR_DWN = '#majorDown:' +DATA_FLTR_COLS = '#filterColumns:' +DATA_FLTR_ACTN = '#filterAction:' + +RTR_ID = dict( + name = ['NAME'], + both = ['NAME','IP'], + ip = ['IP'] +) + + def readTemplate(fileTemplate, templateFolder, templateEngine): # Read the list of templates passed by CSV of textFSM and return template read list (read) @@ -38,9 +52,11 @@ def readTemplate(fileTemplate, templateFolder, templateEngine): for i,tmpltName in enumerate(templates): d[tmpltName] = { - 'listOfcolumns':[], + 'templateColumns':[], 'commandKey':'', - 'majorDown':['down'] + 'majorDown':['down'], + 'filterColumns':[], + 'filterAction':None, } fName = templateFolder+tmpltName @@ -56,39 +72,58 @@ def readTemplate(fileTemplate, templateFolder, templateEngine): if templateEngine == 'textFSM': - h1 = line.find('Value') - h2 = line.find('#Command:') - h3 = line.find('#majorDown:') + h1 = line.find(DATA_VALUE) + h2 = line.find(DATA_COMMAND) + h3 = line.find(DATA_MAJOR_DWN) + h4 = line.find(DATA_FLTR_COLS) + h5 = line.find(DATA_FLTR_ACTN) if h1 != -1: + # We identify here the variables col = line.split(' ')[-2] - #listOfcolumns[i].append(col) - d[tmpltName]['listOfcolumns'].append(col) + d[tmpltName]['templateColumns'].append(col) if h2 != -1: - cmd = line.split(': ')[1].strip('\n') - #commandKey[i].append(cmd) + # Here we identify the command + line = line.replace(DATA_COMMAND + ' ', DATA_COMMAND) + cmd = line.split(':')[1].strip('\n') d[tmpltName]['commandKey'] = cmd if h3 != -1: - keys = line.split(': ')[1].strip('\n').split(',') + # we add more major words to the list + line = line.replace(DATA_MAJOR_DWN + ' ', DATA_MAJOR_DWN) + keys = line.split(':')[1].strip('\n').split(',') for key in keys: d[tmpltName]['majorDown'].append(key) + if h4 != -1: + # We identify the columnes to be filtered + line = line.replace(DATA_FLTR_COLS + ' ', DATA_FLTR_COLS) + keys = line.split(':')[1].strip('\n').split(',') + for key in keys: + if key not in [None, '', ' ']: + d[tmpltName]['filterColumns'].append(key) + + if h5 != -1: + # we identify the action to be performed on the filterd columns + line = line.replace(DATA_FLTR_ACTN + ' ', DATA_FLTR_ACTN) + action = line.split(':')[1].strip('\n') + d[tmpltName]['filterAction'] = action + if templateEngine == 'ttp': - h1 = line.find('Columns: ') - h2 = line.find('Command: ') - h3 = line.find('majorDown: ') + h1 = line.find('#Columns: ') + h2 = line.find('#Command: ') + h3 = line.find('#majorDown: ') + h4 = line.find('#filterColumns: ') + h5 = line.find('#filterAction: ') if h1 != -1: col = line.split(': ')[1].strip('\n').split(",") - #listOfcolumns[i].append(col) - d[tmpltName]['listOfcolumns'] = col + d[tmpltName]['templateColumns'] = col if h2 != -1: cmd = line.split(': ')[1].strip('\n') - #commandKey[i].append(cmd) d[tmpltName]['commandKey'] = cmd if h3 != -1: @@ -96,10 +131,68 @@ def readTemplate(fileTemplate, templateFolder, templateEngine): for key in keys: d[tmpltName]['majorDown'].append(key) + if h4 != -1: + # We identify the columnes to be filtered + keys = line.split(': ')[1].strip('\n').split(',') + for key in keys: + if key not in [None, '', ' ']: + d[tmpltName]['filterColumns'].append(key) + + if h5 != -1: + # we identify the action to be performed on the filterd columns + action = line.split(': ')[1].strip('\n') + d[tmpltName]['filterAction'] = action + + if len(d[tmpltName]['filterColumns']) > 0: + + print(f'The template {tmpltName} has the following columns to be filtered:') + print('Columns: '+str(d[tmpltName]['filterColumns'])) + + # checking column's names + x = [col for col in d[tmpltName]['filterColumns'] if col not in d[tmpltName]['templateColumns']] + if len(x) > 0: + print(f'There are some columns which are not original variables of the template.') + print(x) + print(f'Check the variables names. Quitting...') + quit() + + # we want to filter columns + if d[tmpltName]['filterAction'] not in ['include-only','exclude']: + # we want to filter columns but we have not specified + # an action to perform + print(f'The the action to be used has not been properly set.') + print(f'Please set either "include" or "exclude" in the comments section of the template file.\nQuitting...') + quit() + + if d[tmpltName]['filterAction'] == 'exclude': + + # we check if the filter columns are equal to the templates' columns. + # if so, chance is we're getting an empty DF. We don't want this. + if sorted(d[tmpltName]['filterColumns']) == sorted(d[tmpltName]['templateColumns']): + print(f'The template {tmpltName} has the following columns:') + print(d[tmpltName]['templateColumns']) + print(f'Since the action to be performed is "exclude" all the columns will be filtered out and you') + print(f'will end with an empty table. Quitting...') + quit() + + # since we are using 'exclude' our final list of filtered columns is the difference + # between the original 'templateColumns' and the 'filterColumns' + x = [col for col in d[tmpltName]['templateColumns'] if col not in d[tmpltName]['filterColumns']] + d[tmpltName]['filterColumns'] = x + + #print('filterColumns: '+str(d[tmpltName]['filterColumns'])) + + else: + # if no filtering columns are defined, we assign those by the original + # template columns + d[tmpltName]['filterColumns'] = d[tmpltName]['templateColumns'].copy() + #print('filterColumns: '+str(d[tmpltName]['filterColumns'])) + + print(f'##### Successfully Loaded Templates from folder {templateFolder} #####') return d -def makeParsed(nomTemplate, routerLog, templateFolder, templateEngine, columnss): +def makeParsed(nomTemplate, routerLog, templateFolder, templateEngine, templateColumns): """ Parse through textFSM (reading the file again) @@ -119,7 +212,7 @@ def makeParsed(nomTemplate, routerLog, templateFolder, templateEngine, columnss) parsed_results = results_template.ParseText (routerLog) # With list of results, we build a Pandas DataFrame - parsed_results = pd.DataFrame(parsed_results, columns= columnss) + parsed_results = pd.DataFrame(parsed_results, columns= templateColumns) if templateEngine == 'ttp': @@ -132,7 +225,7 @@ def makeParsed(nomTemplate, routerLog, templateFolder, templateEngine, columnss) output = parser.result(format='table') parsed_results = output[0][1][0] - parsed_results = pd.DataFrame(parsed_results, columns= columnss) + parsed_results = pd.DataFrame(parsed_results, columns= templateColumns) return parsed_results @@ -184,14 +277,16 @@ def readLog(logFolder, formatJson): return d -def parseResults(dTmpl, dLog, templateFolder, templateEngine): +def parseResults(dTmpl, dLog, templateFolder, templateEngine, routerId): """ Build the Dataframe from textFSM filter, index and router log Args: - dTmpl (dict): dictionary with info from templates. - dLog (dict): dicitonary with logs. Each key is the fileName; the value, is the content of the log. + dTmpl (dict): dictionary with info from templates. + dLog (dict): dicitonary with logs. Each key is the fileName; the value, is the content of the log. templateFolder (str): folder of templates + templateEngine: textFsm or ttp + routerId: name, IP or both Returns: datosEquipo (dict): Dictionary where keys are templateNames. For each key, a DF with parsed results. @@ -199,82 +294,79 @@ def parseResults(dTmpl, dLog, templateFolder, templateEngine): datosEquipo = {} - for tmpltName in dTmpl.keys(): + for idT, tmpltName in enumerate(dTmpl.keys()): - columnss = dTmpl[tmpltName]['listOfcolumns'] - commandKey = dTmpl[tmpltName]['commandKey'] - dfTemp = pd.DataFrame(columns=columnss) + templateColumns = dTmpl[tmpltName]['templateColumns'] + commandKey = dTmpl[tmpltName]['commandKey'] + filterCols = dTmpl[tmpltName]['filterColumns'] - for routerLogKey in dLog.keys(): + #if len(filterCols)>0: + orderedColums = RTR_ID[routerId] + filterCols + dfTemp = pd.DataFrame(columns=orderedColums) + #else: + # dfTemp = pd.DataFrame(columns=templateColumns) + + for idR, routerLogKey in enumerate(dLog.keys()): routerLogFname = routerLogKey.split("/")[-1] - print(routerLogFname , tmpltName) + print(idT, idR, tmpltName, routerLogFname) - if '_rx.json' in routerLogFname: - # If text format is json, else, we continue work with rx_txt - # TODO: better way to detect json format. + routerName = dLog[routerLogKey]['name'] + routerIP = dLog[routerLogKey]['ip'] - routerName = dLog[routerLogKey]['name'] + # logs es cada comando que se ejecuto en el router, dentro del json file. + for cmdsLogs in dLog[routerLogKey].keys(): - # logs es cada comando que se ejecuto en el router, dentro del json file. - for cmdsLogs in dLog[routerLogKey].keys(): + # prog es el nombre del comando en cada template file + prog = re.compile(commandKey) - # prog es el nombre del comando en cada template file - prog = re.compile(commandKey) + # searchKey es el regex match entre logs y prog + match = prog.search(cmdsLogs) - # searchKey es el regex match entre logs y prog - match = prog.search(cmdsLogs) + if match: + #if command(in template) == command(in key of router) then we stores log info in routeLog variable + # significa que el comando se ejecutó en el router y existe un template + # para ese comando. - if match: - #if command(in template) == command(in key of router) then we stores log info in routeLog variable - # significa que el comando se ejecutó en el router y existe un template - # para ese comando. + # { + # 'logs1':'output1', + # 'logs2':'output2', + # 'logsN':'outputN', + # } - # { - # 'logs1':'output1', - # 'logs2':'output2', - # 'logsN':'outputN', - # } + # "/show router 4001 route-table | match No": "No. of Routes: 566", + # "/show router 4002 route-table | match No": "MINOR: CLI Invalid router \"4002\".\u0007", + # "/show router route-table | match No": "No. of Routes: 3337", - # "/show router 4001 route-table | match No": "No. of Routes: 566", - # "/show router 4002 route-table | match No": "MINOR: CLI Invalid router \"4002\".\u0007", - # "/show router route-table | match No": "No. of Routes: 3337", + routerLog = cmdsLogs + '\n' + dLog[routerLogKey][cmdsLogs] + '\n' - routerLog = cmdsLogs + '\n' + dLog[routerLogKey][cmdsLogs] + '\n' + # We parse results from the key:value association + # A list is returnd with results + # to parse, with provide the complete set of columns as defined inside the template: templateColumns + dfResult = makeParsed(tmpltName, routerLog, templateFolder, templateEngine, templateColumns) - # We parse results from the key:value association - # A list is returnd with results - dfResult = makeParsed(tmpltName, routerLog, templateFolder, templateEngine, columnss) + # If there are columns to be filtered, we reduced the + # size of the DF to that number of columns + if len(filterCols) > 0: + dfResult = dfResult[filterCols] + # We need to define the identification of the router. + if routerId == 'name': dfResult['NAME'] = routerName - dfTemp = pd.concat([dfTemp, dfResult]) - - else: - # if here, we analyze plain text Files - pass - # routerName = routers[i1][0].replace('_rx.txt','') - # routerLog = content[i1] - # # "/show router 4001 route-table | match No": "No. of Routes: 566", - # # "/show router 4002 route-table | match No": "MINOR: CLI Invalid router \"4002\".\u0007", - # # "/show router route-table | match No": "No. of Routes: 3337", + elif routerId == 'both': - # parsed_results = makeParsed(nomTemplate, routerLog) + dfResult['NAME'] = routerName + dfResult['IP'] = str(routerIP) + + elif routerId == 'ip': - # if len(parsed_results) == 0: - # # if the parse is empty, we save the name of the routers - # parsed_results = [routerName] - # for empty in range(len(columnss)-1): - # parsed_results.append('NOT VALUE') + dfResult['IP'] = str(routerIP) - # parsed_results = [parsed_results] - # dfResult = pd.DataFrame(parsed_results, columns= columnss) - # else: - # dfResult = pd.DataFrame(parsed_results, columns= columnss) - # dfResult['NAME'] = routerName + dfResult = dfResult[orderedColums] - # dfTemp = pd.concat([dfTemp, dfResult]) + dfTemp = pd.concat([dfTemp, dfResult]) # It is stored in the dataEquipment dictionary with the key nomTemplate # the DF with the data of all routers @@ -283,28 +375,32 @@ def parseResults(dTmpl, dLog, templateFolder, templateEngine): # I added this here because it was already done in main (). # It is cleaner like this ... datosEquipo[tmpltName].reset_index(level=0, inplace=True) - datosEquipo[tmpltName] = datosEquipo[tmpltName].drop(columns='index') + datosEquipo[tmpltName] = datosEquipo[tmpltName].drop(columns='index') return datosEquipo -def searchDiff(datosEquipoPre, datosEquipoPost, dTmplt): +def searchDiff(datosEquipoPre, datosEquipoPost, dTmplt, routerId): #Makes a new table, in which it brings the differences between two tables (post-pre) - countDif = {} + countDif = {} for tmpltName in datosEquipoPre.keys(): + filterCols = dTmplt[tmpltName]['filterColumns'] + dfUnion = pd.merge(datosEquipoPre[tmpltName], datosEquipoPost[tmpltName], how='outer', indicator='Where').drop_duplicates() dfInter = dfUnion[dfUnion.Where=='both'] dfCompl = dfUnion[~(dfUnion.isin(dfInter))].dropna(axis=0, how='all').drop_duplicates() dfCompl['Where'] = dfCompl['Where'].str.replace('left_only','Pre') dfCompl['Where'] = dfCompl['Where'].str.replace('right_only','Post') - countDif[tmpltName] = dfCompl.sort_values(by=dTmplt[tmpltName]['listOfcolumns']) + orderedColums = RTR_ID[routerId] + filterCols + + countDif[tmpltName] = dfCompl.sort_values(by = orderedColums) return countDif -def findMajor(count_dif, dTmplt): +def findMajor(count_dif, dTmplt, routerId): #Makes a table from the results of searching for Major errors in the post table define in yml file for specific template, # or down if is not define the words for the template, which are not in the Pre table @@ -315,7 +411,9 @@ def findMajor(count_dif, dTmplt): df = pd.DataFrame() for majorWord in dTmplt[tmpltName]['majorDown']: - + + filterCols = dTmplt[tmpltName]['filterColumns'] + df1 = count_dif[tmpltName][count_dif[tmpltName]['Where']=='Post'] if len(df1) > 0: @@ -324,7 +422,8 @@ def findMajor(count_dif, dTmplt): df1 = pd.DataFrame(columns=count_dif[tmpltName].columns) df = pd.concat([df, df1]) - df = df.sort_values(by=dTmplt[tmpltName]['listOfcolumns']) + + df = df.sort_values(by = RTR_ID[routerId] + filterCols) countDown[tmpltName] = df @@ -358,11 +457,11 @@ def constructExcel(df_final, count_dif, searchMajor, folderLog):#Sort the data a writer = pd.ExcelWriter(fileName, engine='xlsxwriter') #creates instance of an excel workbook workbook = writer.book - print('Saving Excel') - # Create index tab indexSheet = workbook.add_worksheet('index') + print('\nSaving Excel') + for idx,template in enumerate(df_final.keys()): dfData = df_final[template] @@ -448,7 +547,7 @@ def constructExcel(df_final, count_dif, searchMajor, folderLog):#Sort the data a if len(dfMajor) > 0: dfMajor.to_excel(writer, sheet_name=sheet_name, startrow=(len(dfData)+(len(dfDiff)))+10, startcol=0) - print('#') + print('#',idx,template) writer.save() #saves workbook to file in python file directory @@ -462,7 +561,8 @@ def main(): parser1.add_argument('-tf', '--templateFolder', type=str, default='Templates/', help='Folder where templates reside. Used both for PRE and POST logs. Default=Templates/') parser1.add_argument('-tf-post', '--templateFolderPost', type=str, default='Templates/', help='If set, use this folder of templates for POST logs. Default=Templates/') parser1.add_argument('-te', '--templateEngine', choices=['ttp','textFSM'], default='textFSM', type=str, help='Engine for parsing. Default=textFSM.') - parser1.add_argument('-v' ,'--version', help='Version', action='version', version='Saldivar/Aimaretto - (c)2022 - Version: 3.2.3' ) + parser1.add_argument('-ri', '--routerId', choices=['name','ip','both'], default='name', type=str, help='Router Id to be used within the tables in the Excel report. Default=name.') + parser1.add_argument('-v' ,'--version', help='Version', action='version', version='Saldivar/Aimaretto - (c)2022 - Version: 3.4.0' ) args = parser1.parse_args() preFolder = args.preFolder @@ -472,6 +572,7 @@ def main(): templateFolder = args.templateFolder templateEngine = args.templateEngine templateFolderPost = args.templateFolderPost + routerId = args.routerId if _platform == "win64" or _platform == "win32": templateFolder = templateFolder.replace('/', '\\') @@ -483,7 +584,7 @@ def main(): dTmplt = readTemplate(csvTemplate, templateFolder, templateEngine) dLog = readLog(preFolder, formatJson) - df_final = parseResults(dTmplt, dLog, templateFolder, templateEngine) + df_final = parseResults(dTmplt, dLog, templateFolder, templateEngine, routerId) count_dif = {} searchMajor = {} @@ -523,11 +624,11 @@ def main(): dLogPre = readLog(preFolder, formatJson) dLogPost = readLog(postFolder, formatJson) - datosEquipoPre = parseResults(dTmpltPre, dLogPre, templateFolder, templateEngine) - datosEquipoPost = parseResults(dTmpltPost, dLogPost, templateFolderPost, templateEngine) + datosEquipoPre = parseResults(dTmpltPre, dLogPre, templateFolder, templateEngine, routerId) + datosEquipoPost = parseResults(dTmpltPost, dLogPost, templateFolderPost, templateEngine, routerId) - count_dif = searchDiff(datosEquipoPre, datosEquipoPost, dTmpltPre) - searchMajor = findMajor(count_dif, dTmpltPre) + count_dif = searchDiff(datosEquipoPre, datosEquipoPost, dTmpltPre, routerId) + searchMajor = findMajor(count_dif, dTmpltPre, routerId) df_final = makeTable(datosEquipoPre, datosEquipoPost) constructExcel(df_final, count_dif, searchMajor, postFolder)