Ad Widget

Collapse

How to parse version string from website

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Hrobocop
    Junior Member
    • Oct 2012
    • 22

    #1

    How to parse version string from website

    Hi there, I'm trying to get latest version of MikroTik's RouterOS into the item as string value. The string is at this URL: http://www.mikrotik.com/download/CHANGELOG_5 and can be separated by regexp - its the first deciman number, in this case "5.21".

    I'm really bad in regexps, but after struggle I constructed this regexp match:
    [0-9]+(?:\.[0-9]*)
    Which returns what I need.

    But... how to put this regexp into the key?
    It shoul look like:
    web.page.regexp[https://www.mikrotik.com,download/CH...G_5,80,xxx,10]

    where xxx will be the regexp, but it dodnt work, even when regexp quoted.

    Any idea how to solve this?
    Thank you!!!
  • BDiE8VNy
    Senior Member
    • Apr 2010
    • 680

    #2
    I fear that lookaround patterns ('?:', ...) are not supported by ZABBIX.

    Comment

    • tvtue
      Member
      • Sep 2012
      • 71

      #3
      Hello,

      has this been approved by a zabbix dev that lookaround regex are not supported?

      At least the documentation of 2.0 mentions PCRE in some detail.

      regards,
      tvtue

      Comment

      Working...