Ad Widget

Collapse

Testing web status page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mklatsky
    Junior Member
    • Dec 2020
    • 5

    #1

    Testing web status page

    I have the need to monitor a web status page. The URL would be: https://myhostname/status/

    There are several status' that might be shown in the resulting body:

    OK (should not trigger an alert)
    WARN (should trigger an alert, with the WARN message in Subject and/or the body of the alert)
    This might show WARN / 95% FULL or WARN LICENSE EXPIRATION

    This seems like it should be a simple thing to do- but everything I have tried does not seem to work as expected. The only thing I have gotten working is to check for the OK message, and alert if that's not found.
  • mantonik
    Junior Member
    • May 2015
    • 17

    #2
    Hi,

    When I configured a web scenario it has a single sentence comparation.
    I think I will look for WARN in this scenario and then make a trigger if word is found send message if the word is not found - you expect response OK, then don't send a message,
    when the page is not responding alert as not available.


    Comment

    • mklatsky
      Junior Member
      • Dec 2020
      • 5

      #3
      cyber- ah - thank you. Setting up http items seems to have what I need, while I was puzzled by the Web Scenarios. Your comment greatly assists me in understanding the purpose of each.

      Comment

      • mklatsky
        Junior Member
        • Dec 2020
        • 5

        #4
        Something that is quite puzzling to me is that I can't find sufficient documentation to a very common scenario: creating http item which simply retrieves the body of a page so that I can check for certain keywords in a trigger. I am looking to GET a webpage, and parse the page for certain keywords.

        Currently, I have the following as an item:

        Name: App1Status
        Type: HTTP agent
        Key: http_get_mstatus_body
        URL: https://{HOSTNAME}/mstatus/
        Request type: GET
        Required status codes: 200
        Follow redirects: checked
        Retrieve mode: body

        I used the wizard to create a trigger. The trigger expression is:

        {App1Status:http_get_mstatus_body.iregexp(IMOK,#1) }<>1

        When I test this in the trigger's expression constructor, a value of 1 evaluates to False, and a value of 0 evaluates to True (both as expected).

        However, when I browse to a specific host under Configuration, click on Triggers- the specific trigger shows a status of "unknown", with a red exclamation icon. When I hover, the message is "Cannot evaluate expression: "Cannot evaluate function "mklatsky.domain.com:http_get_mstatus_body.iregexp (UCSOK,#1)": item "is not supported.".

        I find this quite curious- any advice would be helpful as it seems that I am following the correct steps for this simple scenario. Thanks!











        Comment

        • cyber
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Dec 2006
          • 4807

          #5
          Web scenario is not retrieving data in such way that you can create triggers on top of it. It is meant to verify that page is working...
          So you should turn to http items in this case. Get data from page and extract what's needed and then create triggers.

          Comment

          Working...