Juniper / healthbot-rules

Apache License 2.0
43 stars 84 forks source link

bad regex in flables.yml #455

Closed jalphonso closed 3 years ago

jalphonso commented 3 years ago

https://github.com/Juniper/healthbot-rules/blob/master/juniper_official/Solutions/EVPN-VXLAN/flables.yml

In the original rule the .* eats all the leading digits leaving only the last digit

  token-count: 'Combined global token count.*(\d+)'
  token-words-count: 'Combined global token words count.*(\d+)'

Device truncated output

net.prds_token_cnts:
Combined global token count: 109
Combined global token words count: 285

Healthbot was only showing the last digit. With the below change, all digits are saved properly

  token-count: 'Combined global token count: (\d+)'
  token-words-count: 'Combined global token words count: (\d+)'
gvarao commented 3 years ago

Hi Joseph,

Thanks for finding issue and solution.

Gowri,

Please change regex as Joesph suggested and create pull request.

Regards, Venkat(GV)

From: Joseph Alphonso notifications@github.com Reply to: Juniper/healthbot-rules reply@reply.github.com Date: Friday, 4 December 2020 at 11:17 PM To: Juniper/healthbot-rules healthbot-rules@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [Juniper/healthbot-rules] bad regex in flables.yml (#455)

[External Email. Be cautious of content]

https://github.com/Juniper/healthbot-rules/blob/master/juniper_official/Solutions/EVPN-VXLAN/flables.yml

In the original rule the .* eats all the leading digits leaving only the last digit token-count: 'Combined global token count.(\d+)' token-words-count: 'Combined global token words count.(\d+)'

Device truncated output net.prds_token_cnts: Combined global token count: 109 Combined global token words count: 285

Healthbot was only showing the last digit. With the below change, all digits are saved properly

token-count: 'Combined global token count: (\d+)'

token-words-count: 'Combined global token words count: (\d+)'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/Juniper/healthbot-rules/issues/455, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AD4JHVFA5MLV3PMSSRWYUTDSTEOCTANCNFSM4UNYAYLA.

Juniper Business Use Only

gvarao commented 3 years ago

Sure GV.

Thanks, Gowrisankar

From: venkata Gajjarapu gvenkata@juniper.net Date: Monday, 7 December 2020 at 9:15 AM To: Juniper/healthbot-rules reply@reply.github.com, Juniper/healthbot-rules healthbot-rules@noreply.github.com Cc: Subscribed subscribed@noreply.github.com, Gowrisankar Seerangasamy Valayapalayam sankarvs@juniper.net Subject: Re: [Juniper/healthbot-rules] bad regex in flables.yml (#455)

Hi Joseph,

Thanks for finding issue and solution.

Gowri,

Please change regex as Joesph suggested and create pull request.

Regards, Venkat(GV)

From: Joseph Alphonso notifications@github.com Reply to: Juniper/healthbot-rules reply@reply.github.com Date: Friday, 4 December 2020 at 11:17 PM To: Juniper/healthbot-rules healthbot-rules@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [Juniper/healthbot-rules] bad regex in flables.yml (#455)

[External Email. Be cautious of content]

https://github.com/Juniper/healthbot-rules/blob/master/juniper_official/Solutions/EVPN-VXLAN/flables.yml

In the original rule the .* eats all the leading digits leaving only the last digit token-count: 'Combined global token count.(\d+)' token-words-count: 'Combined global token words count.(\d+)'

Device truncated output net.prds_token_cnts: Combined global token count: 109 Combined global token words count: 285

Healthbot was only showing the last digit. With the below change, all digits are saved properly

token-count: 'Combined global token count: (\d+)'

token-words-count: 'Combined global token words count: (\d+)'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/Juniper/healthbot-rules/issues/455, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AD4JHVFA5MLV3PMSSRWYUTDSTEOCTANCNFSM4UNYAYLA.

Juniper Business Use Only

Juniper Business Use Only

gvarao commented 3 years ago

Fixed with #457

gvarao commented 3 years ago

Code merged in development branch. Please check and revert