Ad Widget

Collapse

Page Regex Match multiple values

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PCoDev
    Junior Member
    • Mar 2018
    • 2

    #1

    Page Regex Match multiple values

    Hi,

    I have the following data published by a web page:

    T1|25.60
    T2|25.80
    T3|25.80
    T4|25.80
    H1|35.80
    H2|34.00
    H3|35.20
    H4|36.80

    Where T stands for temperature and H for humidity. The following regex matches all values I need to check:

    Temperature: T\d\|(.*)
    Humidity: H\d\|(.*)
    All: [TH]\d\|(.*)

    I'm trying to create a web.page.regexp item to check for the values above.
    The goal would be to define a trigger for all T values and all H values and have a graph showing these.

    Unfortunately, I have problems reading the values:

    This works fine:
    zabbix_agentd.exe -t 'web.page.regexp[192.168.3.133,index.html,8080,T\\d\\|(.*),,\1]'

    But as soon as I try to get the second group it just returns an empty string.
    Doesn't work:
    zabbix_agentd.exe -t 'web.page.regexp[192.168.3.133,index.html,8080,T\\d\\|(.*),,\2]'

    Any Ideas why this doesn't work?
    Also will this be doable by a single item or would I need items for T and H or even an item per value?

    Thanks in advance!

Working...