Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-21086

Zabbix 6.0 breaks web scenarios with ISO-8859-1

XMLWordPrintable

    • Sprint 90 (Jul 2022)
    • 0.25

      Description of the problem and how to reproduce.
      I reproduced the steps and encountered the same error:

      The page being monitored (for which this error occurs) is encoded with the character set ISO-8859-1 and also includes that character set’s non-breaking space character (hex a0) as a literal (i.e. not via a HTML entity).

      I’ve attached a tar.gz archive containing a simple HTML file (example.html) which is encoded with the character set ISO-8859-1 and which contains, between <p> and </p> elements (within its <body>) the character set’s non-breaking space character (hex a0).

      When the the web server is ready, following the below steps in Zabbix 6.0(.4) to reproduce the issue:

      1. In Configuration > Hosts, select Web scenarios for a host of your choice
      2. Click Create web scenario
      3. On the Scenario tab, set Name to Example
      4. In the Steps of web scenario , set Required string to Page title
      5. In the Steps of web scenario , set Required status codes to 200
      6. In the Steps of web scenario , click Add
      7. Click Add (the 'main' Add button)
      8. View Monitoring > Latest data for the same host and await execution of the web scenario after which Failed step of scenario "Example" should have value 1 and Last error message of scenario "Example" should have value 
        {{required pattern "Page title" was not found on http:// {IP}/example.html}}

         

      1. Also review the zabbix_server log file which should have message(s) ending regexp_exec() failed with error -22

      I’ve also tried increasing the verbosity of http poller logs by running this command several times:

      zabbix_server -R log_level_increase='http poller'

      After that’s been done, I’ve reviewed log messages from executions of the web scenario. The regexp_exec() failed with error -22 messages are display shortly after logging of the retrieved page data. I’ve noticed the logged page data (page.data) omits the line which contains the ISO-8859-1 character set's non-breaking space character (hex a0). See the below from the zabbix_server log file (for comparison with example.html from the tar.gz archive):

      993008:20220520:151411.380 process_httptest() page.data from http://172.23.80.50/example.html:'<html>          
      <head>
      <title>Page title</title>     
      </head>
      <body>
      </body>
      '

      This behaviour is a regression from previous Zabbix releases, including 5.4(.11). Indeed if the same web scenario detailed above is setup with Zabbix 5.4(.11) the issue does not occur (i.e. the web scenario completes successfully). We have several crucial internal websites which are monitored with Zabbix web scenarios that are affected by the issue and therefore we cannot upgrade to Zabbix 6.0.x until this is fixed.

      example_page.tar.gz

            vso Vladislavs Sokurenko
            nfrancys Francys Nivea (Inactive)
            Team A
            Votes:
            3 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: