Search code examples
zabbix

Web Scenario with Authentication that requires a ViewState


I am new to Zabbix. Trying to create Web Scenario that verifies web login with ViewState.

so trying to query VIEWSTATE from a login page with regex (so I can pass it when I am logging in) like this:

regex:id="__VIEWSTATE\" value="(.*)

enter image description here

This is what I am trying to query:

<input type="hidden" name="__VIEWSTATE" value="5000_character_long_hash">

Questions: Is this the correct way of doing authentications that require VIEWSTATE hash to be passed with the login? or is there some other method? Is my regex correct? How can I easily verify if Zabbix took my regex correctly?
How can I see the output of {VIEWSTATE} variable?


Solution

  • Passing variables from a step to another, in Web Scenario is currently not possible.

    There is also no way of knowing if your regexp is correct, because Web Scenario doesn't output anything like that: its only output are speed, error condition, and if a hardcoded string was found.

    You also can not use dependent items, or HTTP Client item. So, you need to create an external check.