# Logstash pattern for repeated custom patterns

**URL:** <https://discuss.elastic.co/t/logstash-pattern-for-repeated-custom-patterns/56821>\
**Category:** Logstash\
**Created:** [July 31, 2016, 12:28pm UTC](https://discuss.elastic.co/t/logstash-pattern-for-repeated-custom-patterns/56821 "2016-07-31T12:28:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ishanim](https://avatars.discourse-cdn.com/v4/letter/i/51bf81/32.png) [@ishanim](https://discuss.elastic.co/u/ishanim)\
**Post date:** [July 31, 2016, 12:28pm UTC](https://discuss.elastic.co/t/logstash-pattern-for-repeated-custom-patterns/56821/1 "2016-07-31T12:28:30Z")

</div>

I have the following log:  
hostname#show platform software status control-processor brief  
Load Average  
Slot Status 1-Min 5-Min 15-Min  
RP0 Healthy 0.21 0.11 0.08  
RP1 Healthy 0.08 0.06 0.05  
ESP0 Healthy 0.00 0.01 0.05  
ESP1 Healthy 0.00 0.01 0.05  
SIP0 Healthy 0.00 0.01 0.05

Memory (kB)  
Slot Status Total Used (Pct) Free (Pct) Committed (Pct)  
RP0 Healthy 8004716 2901988 (36%) 4000912 (50%) 6051412 (76%)  
RP1 Healthy 8004716 2917632 (36%) 4009628 (50%) 6062096 (76%)  
ESP0 Healthy 8004708 745452 ( 9%) 6892640 (86%) 772676 (10%)  
ESP1 Healthy 8004708 740440 ( 9%) 6902000 (86%) 771284 (10%)  
SIP0 Healthy 1031412 255392 (25%) 589972 (57%) 619780 (60%)

Available Memory (kB)  
Slot Available (Pct) Free (Pct)  
RP0 5102728 (10%) 4000912 (50%)  
RP1 5087084 (10%) 4009628 (50%)  
ESP0 7259256 (37%) 6892640 (86%)  
ESP1 7264268 (37%) 6902000 (86%)  
SIP0 776020 (75%) 589972 (57%)

CPU Utilization  
Slot CPU User System Nice Idle IRQ SIRQ IOwait  
RP0 0 0.70 15.70 0.00 78.90 0.00 4.70 0.00  
1 0.10 5.10 0.00 93.79 0.00 1.00 0.00  
2 2.69 2.19 0.00 95.10 0.00 0.00 0.00  
3 1.80 0.50 0.00 91.49 0.00 6.20 0.00  
4 3.00 7.90 0.00 89.08 0.00 0.00 0.00  
5 0.90 1.40 0.00 92.80 0.00 4.90 0.00  
6 4.90 1.30 0.00 93.80 0.00 0.00 0.00  
7 0.50 0.40 0.00 97.70 0.00 1.40 0.00  
RP1 0 0.60 0.50 0.00 98.90 0.00 0.00 0.00  
1 3.00 0.50 0.00 96.50 0.00 0.00 0.00  
ESP0 0 0.20 0.40 0.00 99.40 0.00 0.00 0.00  
1 0.30 0.30 0.00 99.40 0.00 0.00 0.00  
ESP1 0 0.10 0.30 0.00 99.59 0.00 0.00 0.00  
1 0.00 0.00 0.00 100.00 0.00 0.00 0.00  
SIP0 0 3.00 0.60 0.00 96.40 0.00 0.00 0.00

In this, i want to search for the information:  
RP0 0 0.70 15.70 0.00 78.90 0.00 4.70 0.00  
1 0.10 5.10 0.00 93.79 0.00 1.00 0.00  
2 2.69 2.19 0.00 95.10 0.00 0.00 0.00  
3 1.80 0.50 0.00 91.49 0.00 6.20 0.00  
4 3.00 7.90 0.00 89.08 0.00 0.00 0.00  
5 0.90 1.40 0.00 92.80 0.00 4.90 0.00  
6 4.90 1.30 0.00 93.80 0.00 0.00 0.00  
7 0.50 0.40 0.00 97.70 0.00 1.40 0.00  
RP1 0 0.60 0.50 0.00 98.90 0.00 0.00 0.00  
1 3.00 0.50 0.00 96.50 0.00 0.00 0.00

I created a custom pattern for a single line as :  
\s\*%{RP\_id:RP\_name}\s\*%{BASE10NUM:CPU}\s\*%{BASE10NUM:user\_utilizatn}\s\*%{BASE10NUM:system\_utilizatn}\s\*%{BASE10NUM:nice\_value}\s\*%{BASE10NUM:Idle}\s\*%{BASE10NUM:IRQ}\s\*%{BASE10NUM:SIRQ}\s\*%{BASE10NUM:IOwait}  
How can i use logstash to get this information repeatedly in a loop for all values ?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:45am UTC](https://discuss.elastic.co/t/logstash-pattern-for-repeated-custom-patterns/56821/2 "2017-07-06T04:45:41Z")

</div>

Closed on July 6, 2017, 4:45am UTC


