Ad Widget

Collapse

Web scenario trigger with required string

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lpossamai
    Senior Member
    • Jun 2018
    • 119

    #1

    Web scenario trigger with required string

    I have a couple of web scenarios, and some of them have "Required String" enabled. The endpoint will always return http response code 200, even if the required string doesn't match. Example:

    Step 1
    Endpoint: https://api.example.com/api/v1/status
    Required string: "ApiStatus" status="up"

    Step 2
    Endpoint: https://api.example.com/api/v1/status
    Required string: "Apiv2Status" status="down"

    [...]

    The status code of https://api.example.com/api/v1/status will always be 200, even if it shows "Apiv2Status" status="down", so I cannot use the web.test.rspcode function.
    I wanna create a trigger that, if a certain step have status="down", trigger an alarm.

    How can I achieve that?
    Last edited by lpossamai; 16-04-2020, 05:33.
  • lpossamai
    Senior Member
    • Jun 2018
    • 119

    #2
    According to Web monitoring:

    The following information is collected in any web scenario step:
    • download speed per second
    • response time
    • response code
    so that means that I need to create different Web Scenarios for each one of the "steps'. Am I right?

    Comment

    • tim.mooney
      Senior Member
      • Dec 2012
      • 1427

      #3
      Will the "Required string" field for Zabbix Web scenarios work if you invert the test and require that status="up" be present for the step to be OK?

      Comment

      • lpossamai
        Senior Member
        • Jun 2018
        • 119

        #4
        Originally posted by tim.mooney
        Will the "Required string" field for Zabbix Web scenarios work if you invert the test and require that status="up" be present for the step to be OK?
        Yes... that could work... so If status is != status="up", triggers an alarm.

        Comment

        Working...