Ad Widget

Collapse

Help for item calculation by web.page.regex

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Leo.SP
    Junior Member
    • Jan 2019
    • 6

    #1

    Help for item calculation by web.page.regex

    Hello, mates, I need your help.

    I'm trying to create a monitoring based on an HTML "return" followed by a calculation and I'm having some difficulties.

    To understand better, I created a web.page.regexp [host, <port>, <port>, <regexp>, <length>, <output>] item to check a specific content of a URL on a web server.

    The item was created using settings below;
    host: x.x.x.x
    path: /xxxxxxx/QueryPropertyServlet?Action=getMemoryNode0
    port: 8020
    regexp: getMemoryNode0: (\w*): (\w*)
    length: null (blank)
    output: \1, \2

    The settings worked (bringing the return exactly as if I were testing it by the browser);

    Example: "getMemoryNode0: 10967318528: 8890129256"

    The first sequence of numbers does not change (it is a static value), the second one changes constantly (it is a dynamic value).

    It turns out that I need to create a calculation that divides the value 2 by the value 1 and multiplies by 100 in a trigger (or in the item itself) and by what I researched the ideal would be to use an item in the type "calculation".

    I tried to do in several ways the calculation (following the manual, topics I found right here) and all the tests gave the error "Incorrect function expression: web.page.regexp [{HOST.IP} ...." or some error like.

    Could someone tell me what formula I should use to achieve this calculation?

    Thanks for the patience and help.
Working...