Details

    • Type: New Feature Request
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None

      Description

      Web applications often provide monitoring information via HTTP.

      For example, if you call https://user:password@www.foobar.com/admin/monitoring.jsp you get key/value pairs like this:


      app.sessions.active = 12
      app.cached.elements = 2000
      app.status.productload = OK (5124 products)
      app.status.pricetable = FAIL

      Currently you have to write a script which is called by a item to parse the resulting page and add the value to zabbix.

      It would be very helpful to have a zabbix-internal item-parameter which does this job - for example:

      Definition:
      web.page.parse.regexp[<hostname>,<path>,<port>,<protocol>,<regex>,<length>]

      host - hostname (if empty, use default)
      path - path to HTML document (default is /)
      port - port number (default is 80)
      protocol - http or https
      regexp - GNU regular expression
      length - maximum number of characters to return

      Return value:
      The matched string, if a regex group is specified the the content of the first group will be returned.

      Examples:
      web.page.parse.regexp[www.foo.bar,/monitor.jsp,80,http,app.status.productload = (..*) : \d+ products,4]
      => line: app.status.productload = OK (5124 products)
      => zabbix value: OK
      web.page.parse.regexp[www.foo.bar,/monitor.jsp,80,http,app.status.pricetable = (..*),12]
      => line: app.status.pricetable = FAIL
      => zabbix value: FAIL

      I think that
      web.page.regexp[host,<path>,<port>,<regexp>,<length>]
      is pretty close to this...

      Regards
      Marc

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                scoopex Marc Schoechlin
              • Votes:
                7 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: