Ad Widget

Collapse

[Help] Read values from a web page?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rumbLe
    Junior Member
    • Feb 2016
    • 4

    #1

    [Help] Read values from a web page?

    Hi, I would like to read values (temperature and humidity) from a Web page to create a graph and some triggers.

    Is there anyone who can guide me in the right direction on how to do that?
  • zabbixfk
    Senior Member
    • Jun 2013
    • 256

    #2
    See if you can create a custom script to parse web page and return required values to zabbix ( check UserParameter in zabbix_server.conf file). Then create a key based on this to get graphs/set triggers.

    P.S - For parsing web pages i had used WWW::Mechanize in Perl, not sure if now that module supports parsing web pages with JS/Flash etc.

    Thanks.

    Comment

    • rumbLe
      Junior Member
      • Feb 2016
      • 4

      #3
      Hi zabbixfk, thanks for the suggestion.

      What I wanted to do was to read values from my home automation system (Fibaro HC2), which has a JSON API.

      I achieved this by scheduling a .bat script on my Windows server that:

      1. Downloads the "json" page using wget.
      2. Fetch the intresting values from the downloaded page using JQ (https://stedolan.github.io/jq/).
      3. zabbix_sender to send the data to zabbix.

      There are probably easier and better way to handle this using python or VB scripts, but this seems to work.

      Comment

      Working...