Ad Widget

Collapse

Can't get Web Scenario to Work

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • LucasHokerberg
    Junior Member
    • Apr 2024
    • 8

    #1

    Can't get Web Scenario to Work

    I'm trying to set up a Web Scenario to monitor that a web site is properly up, e.g., that a specific key word is found.
    I have configured a Web Scenario with a single step like so:

    Click image for larger version

Name:	image.png
Views:	330
Size:	40.6 KB
ID:	482632

    The site should be considered up if the keyword "Username" exists, and the staus code is 200.

    When looking at the result, it states that the keyword could not be found:

    Click image for larger version

Name:	image.png
Views:	284
Size:	40.6 KB
ID:	482633

    Although, ​the "Failed step" is 0, which seems incorrect to me. Furthermore, if I look at the status of the Web Scenario, it says OK:

    Click image for larger version

Name:	image.png
Views:	290
Size:	5.5 KB
ID:	482634​

    The same goes for the step itself:

    Click image for larger version

Name:	image.png
Views:	290
Size:	7.6 KB
ID:	482635​
    I don't get why the status is OK, even when the keyword is not found. Furthermore, I don't get why the keyword is not found.
    I have enabled debugging and the log shows that the site is parsed and that the keyword is indeed there:

    Click image for larger version

Name:	image.png
Views:	295
Size:	25.4 KB
ID:	482636

    Any help would be appreciated. I'm sure I just get something wrong (I'm new to Zabbix).​
  • Answer selected by LucasHokerberg at 19-04-2024, 17:14.
    cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    Everything is just as it should be.. That field displays last error message... as you see it is 48 minutes ago, not 25 seconds as all other data... Last data by default show you up to 24h old data... so by tomorrow it wil not even show up any more...

    Comment

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

      #2
      Everything is just as it should be.. That field displays last error message... as you see it is 48 minutes ago, not 25 seconds as all other data... Last data by default show you up to 24h old data... so by tomorrow it wil not even show up any more...

      Comment

      • LucasHokerberg
        Junior Member
        • Apr 2024
        • 8

        #3
        Originally posted by cyber
        Everything is just as it should be.. That field displays last error message... as you see it is 48 minutes ago, not 25 seconds as all other data... Last data by default show you up to 24h old data... so by tomorrow it wil not even show up any more...
        Thanks for clarifying!

        As the column title is "Last Value" I would have expect that the result was something like "required pattern found". But your explination make perfect sense and the last result (error) is indeed gone!

        Click image for larger version

Name:	image.png
Views:	290
Size:	19.3 KB
ID:	482759

        Comment

        Working...