Ad Widget

Collapse

Problem to proceess a item wtih Regular Expresions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jvalenzuela
    Junior Member
    • Feb 2020
    • 12

    #1

    Problem to proceess a item wtih Regular Expresions

    Hello:

    I get this string from a ubiquiti switch : 5 Secs ( 41.4130%) 60 Secs ( 38.3348%) 300 Secs ( 38.1649%)

    I want to geth the value in red, the I create this RegExp and tested here : https://regexr.com/ and works ok

    [ 0-1][0-9][0-9]\.[0-9][0-9][0-9][0-9]\%

    but in Zabbix doesn't recognize in the tap Processing for an item

    please help

    regard




  • Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    #2
    Because many groups in the string match your regular expression
    Try
    Code:
     ^\s*\d*\s*Secs\s+\(\s*(\d+\.\d+)%

    Comment

    Working...