Ad Widget

Collapse

Web Scenario failed - HTTP Error 503 not seen

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • J_Adatasol
    Member
    • Dec 2018
    • 74

    #1

    Web Scenario failed - HTTP Error 503 not seen

    Hi all,

    I just had a problem with our Zabbix monitoring. We have a Web Scenario configured (using a template, applied to a couple of different servers) that monitors a web connection on these servers. This scenario is looking for HTTP codes 200 & 201.

    Today, the server's HTTP system went down. When I manually tested the page I would get code = 503, but Zabbix was constantly reporting that it was getting code = 200 back. I ended up having to manually shut it down and restart it, instead of Zabbix automatically restarting things.

    Where can I look to see why or how the Zabbix monitor was getting a different result than when I manually checked the page?

    Thanks.
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    Are you check web.test.fail[] value in trigger expression?

    Comment

    • J_Adatasol
      Member
      • Dec 2018
      • 74

      #3
      No, I'm using specific Status Codes.

      In Configuration -> Hosts -> <myhost> -> Web Scenarios
      - I have defined a URL that it will check (using a custom macro I defined - "{WEBD.URL}")
      - Then at the bottom I have set it to look for specific HTTP Status Codes: 200, 201

      Click image for larger version  Name:	Screen Shot 2019-07-11 at 9.57.14 .png Views:	1 Size:	34.3 KB ID:	382174


      Click image for larger version  Name:	Screen Shot 2019-07-11 at 9.56.11 .png Views:	1 Size:	43.0 KB ID:	382173


      This configuration has been working correctly for a while - many months. But this one time, it failed. When I manually logged into the server and shutdown the web server part, Zabbix recognized that. But it did not recognize the problem with the web server reporting error = 503 (this was the state of things before I manually shut it down, in order to fix it).

      Comment

      • Atsushi
        Senior Member
        • Aug 2013
        • 2028

        #4
        Did you test when it timed out?
        Has a timeout occurred and the value of web.test.fail[] fails, and the value of web.test.rspcode[] remains old and has not been updated? What if you try to check both the web.test.fail[] value and the web.test.rspcode[] value in the trigger expression?

        Comment

        • J_Adatasol
          Member
          • Dec 2018
          • 74

          #5
          This issue just happened again.

          When trying to access the webpage on this server, it returned a Error Code 503, but Zabbix was happy as a clam and indicated that it was receiving Code = 200 and did not report any problems (and thus did not respond to fix the issue).

          Comment

          • J_Adatasol
            Member
            • Dec 2018
            • 74

            #6
            Originally posted by Atsushi
            Did you test when it timed out?
            Has a timeout occurred and the value of web.test.fail[] fails, and the value of web.test.rspcode[] remains old and has not been updated? What if you try to check both the web.test.fail[] value and the web.test.rspcode[] value in the trigger expression?
            Here is my TRIGGER for this web test:
            {<server>:web.test.fail[Web_Check].count(120,0,gt)}>1

            So I am only testing "web.test.fail[]".

            But in my 'Web Scenario', I'm testing for both the Response Code and for a specific string in the response page. Both of those tests should be failing in this case.

            By the way - this is running Zabbix Server v3.4.15.
            Last edited by J_Adatasol; 17-07-2019, 17:08. Reason: Added Zabbix Server version

            Comment

            • J_Adatasol
              Member
              • Dec 2018
              • 74

              #7
              I believe that I have figured out part of my problem - but not exactly what the full solution is yet.

              The problem was that the URL being tested was just hitting a landing page; the landing page has some Javascript that runs on it and tests the next step in the process. It's the next step that is failing - the landing page DOES return Code = 200.

              So...to automatically bypass the Javascript and directly go to the 'next step' in the process, I CAN provide a more detailed URL. But I'm not quite seeing how to append one part of the URL that I would like to include. Here's the URL format I'm trying to mimic:
              Code:
              https://{HOST.HOST}/fmi/webd/<filename>?homeurl=http://{HOST.HOST}/logout.html#<filename>
              I'm trying to populate "<filename>" with a Host-defined macro value. The first instance of I have working, but the second piece, the one after the "#", isn't. I tried entering that URL into the Web Scenarios and click 'Parse', but it removes the piece after the "#" - it disappears.

              Also...how can I get the last HTTP Response Code value to show up in the email that is sent out to people on the 'Actions' Operation? Using {Item.value} just returns 1 - the value from the Trigger (which only returns binary results), which is itself responding to the value (step number that failed) of the Web Scenario. I can see the Response Code in the Web Scenario's data - is that value available in the Actions -> Operations context?

              Comment

              Working...