question

xianyuan avatar image
xianyuan asked xianyuan posted

how to extract multiple similiar fields from a long text block

I have the following response text block and want to extract multiple "PATH sentto" fields and easily identify them. Help is appreciated.

 

Text block:

 

Ingress RSVP: 90 sessions

10.135.102.10
  From: 10.135.102.14, LSPstate: Up, ActiveRoute: 0
  LSPname: SJC2.PPE-TO-DCP1.PPE-1, LSPpath: Primary
  LSPtype: Static Configured
  Suggested label received: -, Suggested label sent: -
  Recovery label received: -, Recovery label sent: 593689
  Resv style: 1 SE, Label in: -, Label out: 593689
  Time left:    -, Since: Thu Jan 26 20:58:22 2012
  Tspec: rate 0bps size 0bps peak Infbps m 20 M 9192
  Port number: sender 6798 receiver 31012 protocol 0
  Node/Link protection desired
  Type: Node/Link protected LSP
  PATH rcvfrom: localclient
  Adspec: sent MTU 4500
  Path MTU: received 4496
  PATH sentto: 10.135.101.150 (ge-0/0/5.0) 23181 pkts
  RESV rcvfrom: 10.135.101.150 (ge-0/0/5.0) 23156 pkts
  Explct route: 10.135.101.150 10.135.101.154 10.135.102.118
  Record route: <self> 10.135.101.150 10.135.101.154 10.135.102.118  

10.135.102.10                           
  From: 10.135.102.14, LSPstate: Up, ActiveRoute: 0
  LSPname: SJC2.PPE-TO-DCP1.PPE-1, LSPpath: Secondary
  LSPtype: Static Configured
  Suggested label received: -, Suggested label sent: -
  Recovery label received: -, Recovery label sent: 600789
  Resv style: 1 SE, Label in: -, Label out: 600789
  Time left:    -, Since: Mon Feb  6 19:12:51 2012
  Tspec: rate 173.658kbps size 173.658kbps peak Infbps m 20 M 9192
  Port number: sender 6807 receiver 31012 protocol 0
  Node/Link protection desired
  Type: Node/Link protected LSP
  PATH rcvfrom: localclient
  Adspec: sent MTU 4496
  Path MTU: received 4496
  PATH sentto: 10.135.105.16 (ae0.0) 2168 pkts
  RESV rcvfrom: 10.135.105.16 (ae0.0) 2172 pkts
  Explct route: 10.135.105.16 10.135.101.148 10.135.96.35 10.135.101.152
  Record route: <self> 10.135.102.9 (node-id) 10.135.105.16 10.135.101.148 10.135.96.35 10.135.101.152  
Total 2 displayed, Up 2, Down 0

Egress RSVP: 94 sessions
Total 0 displayed, Up 0, Down 0

Transit RSVP: 545 sessions
Total 0 displayed, Up 0, Down 0


iTestresponse map
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
lakshminarayana avatar image
lakshminarayana answered lakshminarayana posted

Hi Xianfeng,

 

We can extract the "PATH sentto" fields from your response either by creating pattern or block response map. Attached is a sample pattern response map, created query only to retrive "PATH sentto" fields. You can find these queries in queries view and add analysis ruls as you required.

 

Thanks,

Lakshmi


sample.ffrm (3.4 KiB)
4 comments
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

xianyuan avatar image xianyuan commented ·

I checked the map you posted. It didn't resolve my problem here.

 

I just want LSPpath primary "PATH sentto" field. The response map you created gives more info than what I wanted.

0 Likes 0 ·
xianyuan avatar image xianyuan xianyuan commented ·

do the anchors in respone map have to cover all the text in Identiying Text?

0 Likes 0 ·
xianyuan avatar image xianyuan xianyuan commented ·

How do users specify non-greedy matching in response map?

0 Likes 0 ·
msandeep avatar image msandeep xianyuan commented ·

Hi Xianfeng,

 

We could edit the response map patterns and get the response as per our requirement. (non-greedy nature). The anchors could be edited to find the exact response as of user. But we need to take care and create the patterns as so.

 

If I am not wrong, you need only IP adderess there in the query to put an analysis rule to it. So you could change/ modify the pattern to esteem the (desired) query as of response.

 

Please be posted if you need any help!! Thank You!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.