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

Error in comparison in the elastic search clearing history function

    XMLWordPrintable

    Details

    • Team:
      Team D
    • Sprint:
      Sprint 56 (Sep 2019), Sprint 57 (Oct 2019)
    • Story Points:
      0.125

      Description

      The error is reproduced for PHP 7.2.

      Steps to reproduce:
      1. Configure using Elasticsearch by adding the following lines to zabbix.conf.php:

      	global $HISTORY;
               // Elasticsearch url (can be string if same url is used for all types).
               $HISTORY['url']   = [
      		    'uint' => 'http://localhost:9200',
      		    'text' => 'http://localhost:9200'
               ];
               // Value types stored in Elasticsearch.
               $HISTORY['types'] = ['uint', 'text'];
      	

      2. Create host;
      3. Create any item;
      4. Edit this item;
      5. Click on button "Clear history and trends"

      Result:

      Cannot clear history

      count(): Parameter must be an array or an object that implements Countable [items.php:910 → CHistoryManager->deleteHistory() → CHistoryManager->deleteHistoryFromElasticsearch() in include\classes\api\managers\CHistoryManager.php:765]
      file_get_contents(http://localhost:9200/uint*/values/_delete_by_query?scroll=10s): failed to open stream: No connection could be made because the target machine actively refused it.
      [items.php:910 → CHistoryManager->deleteHistory() → CHistoryManager->deleteHistoryFromElasticsearch() → CElasticsearchHelper::query() → CElasticsearchHelper::request() → file_get_contents() in include\classes\helpers\CElasticsearchHelper.php:58]
      Elasticsearch error: failed to parse JSON.

        Attachments

          Activity

            People

            Assignee:
            basilgon Vasily Goncharenko
            Reporter:
            HunterCRS Alexander Shubin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: