Ad Widget

Collapse

Parse a web page and create a trigger

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cabenave
    Junior Member
    • Sep 2020
    • 2

    #1

    Parse a web page and create a trigger

    Greetings,

    I have a temperature device with two sensors: 1) front and 2) back to monitor temperature in the front and back of a server room. This device has a built-in web server with a URL of the form: http://ip-address/temp/ This URL will return a web page that looks like this:

    front| 66.4|back| 70.9|Probe 3|-99.9|Probe 4|-99.9

    I am interested in parsing out the 1st two temp readings and check whether they fall below or above pre-defined temperature values. If the readings fall outside those thresholds, I want to create a Zabbix trigger to notify me.

    Any pointers?

    Thanks in advance.
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    The documentation for Zabbix dependent items has an example for making one request to a web server but then splitting out parts of the response into separate items. Once you have the main item and the dependent items set up, creating the trigger(s) should be straightforward.

    There's a tremendous amount of capability with Zabbix. Even if you don't have time to read the entire documentation right now, it might be worth it to just take a quick peak at each subsection of the docs, just reading the first paragraph or two. That may give you an overview of the capabilities, so that you can drill down later and make use of some of the features.

    Comment

    • cabenave
      Junior Member
      • Sep 2020
      • 2

      #3
      tim.mooney Thanks for the pointer - I will check the documentation you provided. FWIW - the temp device is not capable or running the agent but doesnt look like it is a requirement for what I want to do.

      Comment

      Working...