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

Empty Graphs in Web with history data in elasticsearch

XMLWordPrintable

    • Sprint 24, Sprint 25
    • 0.125

      History data configured to store in Elasticsearch and its updating.
      But when i open Latest data -> Any Graph they are empty.

      Frontend debug info:

      ******************** Script profiler ********************
      Total time: 0.1038
      Total SQL time: 0.035082
      Total ElasticSearch time: 0.021028995513916
      SQL count: 32 (selects: 20 | executes: 12)
      Peak memory usage: 9.5M
      Memory limit: 128M
      
      1. item.get [history.php:80]
      
      Parameters:
      Array
      (
          [itemids] => Array
              (
                  [0] => 28286
              )
      
          [webitems] => 1
          [selectHosts] => Array
              (
                  [0] => name
              )
      
          [output] => Array
              (
                  [0] => itemid
                  [1] => key_
                  [2] => name
                  [3] => value_type
                  [4] => hostid
                  [5] => valuemapid
                  [6] => history
                  [7] => trends
              )
      
          [preservekeys] => 1
      )
      Result:
      Array
      (
          [28286] => Array
              (
                  [itemid] => 28286
                  [key_] => system.cpu.switches
                  [name] => Context switches per second
                  [value_type] => 3
                  [hostid] => 10254
                  [valuemapid] => 0
                  [history] => 1w
                  [trends] => 365d
                  [hosts] => Array
                      (
                          [0] => Array
                              (
                                  [hostid] => 10254
                                  [name] => kvk-d-itm-run01
                              )
      
                      )
      
              )
      
      )
      
      2. item.get [CScreenHistory.php:110]
      
      Parameters:
      Array
      (
          [output] => Array
              (
                  [0] => itemid
                  [1] => hostid
                  [2] => name
                  [3] => key_
                  [4] => value_type
                  [5] => valuemapid
                  [6] => history
                  [7] => trends
              )
      
          [selectHosts] => Array
              (
                  [0] => name
              )
      
          [itemids] => Array
              (
                  [0] => 28286
              )
      
          [webitems] => 1
          [preservekeys] => 1
      )
      Result:
      Array
      (
          [28286] => Array
              (
                  [itemid] => 28286
                  [hostid] => 10254
                  [name] => Context switches per second
                  [key_] => system.cpu.switches
                  [value_type] => 3
                  [valuemapid] => 0
                  [history] => 1w
                  [trends] => 365d
                  [hosts] => Array
                      (
                          [0] => Array
                              (
                                  [hostid] => 10254
                                  [name] => kvk-d-itm-run01
                              )
      
                      )
      
              )
      
      )
      
      
      SQL (0.000353): SET search_path = 'public'
      history.php:22 ? require_once() ? ZBase->run() ? ZBase->initDB() ? DBconnect() ? DBexecute() in include/db.inc.php:84
      
      SQL (0.000235): SET bytea_output = escape
      history.php:22 ? require_once() ? ZBase->run() ? ZBase->initDB() ? DBconnect() ? DBexecute() in include/db.inc.php:95
      
      SQL (0.005441): SELECT 1 FROM information_schema.tables WHERE table_catalog='zabbix' AND table_schema='public' AND table_name='dbversion'
      history.php:22 ? require_once() ? ZBase->run() ? ZBase->initDB() ? DBconnect() ? DbBackend->checkDbVersion() ? PostgresqlDbBackend->checkDbVersionTable() ? DBselect() in include/classes/db/PostgresqlDbBackend.php:41
      
      SQL (0.000501): SELECT dv.mandatory,dv.optional FROM dbversion dv
      history.php:22 ? require_once() ? ZBase->run() ? ZBase->initDB() ? DBconnect() ? DbBackend->checkDbVersion() ? DBselect() in include/classes/db/DbBackend.php:46
      
      SQL (0.001057): SELECT NULL FROM config c
      history.php:22 ? require_once() ? ZBase->run() ? ZBase->initDB() ? DBconnect() ? DbBackend->checkConfig() ? DBselect() in include/classes/db/DbBackend.php:62
      
      SQL (0.00032): BEGIN
      history.php:22 ? require_once() ? ZBase->run() ? ZBase->authenticateUser() ? CWebUser::checkAuthentication() ? CFrontendApiWrapper->checkAuthentication() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? DBstart() ? DBexecute() in include/db.inc.php:237
      
      SQL (0.001088): SELECT sessionid,userid,lastaccess FROM sessions WHERE sessionid='3b037b8b4545a8f6d73bc44d8cee1f55' AND status=0
      history.php:22 ? require_once() ? ZBase->run() ? ZBase->authenticateUser() ? CWebUser::checkAuthentication() ? CFrontendApiWrapper->checkAuthentication() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CUser->checkAuthentication() ? DB::select() ? DBselect() in include/classes/db/DB.php:918
      
      SQL (0.001073): SELECT userid,alias,name,surname,url,autologin,autologout,lang,refresh,type,theme,attempt_failed,attempt_ip,attempt_clock,rows_per_page FROM users WHERE userid=1
      history.php:22 ? require_once() ? ZBase->run() ? ZBase->authenticateUser() ? CWebUser::checkAuthentication() ? CFrontendApiWrapper->checkAuthentication() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CUser->checkAuthentication() ? DB::select() ? DBselect() in include/classes/db/DB.php:918
      
      SQL (0.001092): SELECT g.debug_mode,g.users_status,g.gui_access FROM usrgrp g,users_groups ug WHERE g.usrgrpid=ug.usrgrpid AND ug.userid=1
      history.php:22 ? require_once() ? ZBase->run() ? ZBase->authenticateUser() ? CWebUser::checkAuthentication() ? CFrontendApiWrapper->checkAuthentication() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CUser->checkAuthentication() ? CUser->getUserGroupsData() ? DBselect() in include/classes/api/services/CUser.php:1576
      
      SQL (0.000642): UPDATE sessions SET lastaccess='1514546676' WHERE sessionid='3b037b8b4545a8f6d73bc44d8cee1f55'
      history.php:22 ? require_once() ? ZBase->run() ? ZBase->authenticateUser() ? CWebUser::checkAuthentication() ? CFrontendApiWrapper->checkAuthentication() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CUser->checkAuthentication() ? DB::update() ? DBexecute() in include/classes/db/DB.php:573
      
      SQL (0.001307): COMMIT
      history.php:22 ? require_once() ? ZBase->run() ? ZBase->authenticateUser() ? CWebUser::checkAuthentication() ? CFrontendApiWrapper->checkAuthentication() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? DBend() ? DBcommit() ? DBexecute() in include/db.inc.php:294
      
      SQL (0.000919): SELECT type,value_id,value_int,value_str,idx2 FROM profiles WHERE userid=1 AND idx='web.menu.view.last'
      history.php:36 ? require_once() ? zbx_construct_menu() ? CProfile::update() ? CProfile::get() ? DBselect() in include/classes/user/CProfile.php:165
      
      SQL (0.005038): SELECT c.* FROM config c
      history.php:36 ? require_once() ? select_config() ? DBselect() in include/profiles.inc.php:33
      
      SQL (0.000598): SELECT type,value_id,value_int,value_str,idx2 FROM profiles WHERE userid=1 AND idx='web.login.attempt.failed'
      history.php:36 ? require_once() ? CProfile::get() ? DBselect() in include/classes/user/CProfile.php:165
      
      SQL (0.003011): BEGIN
      history.php:80 ? CFrontendApiWrapper->get() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? DBstart() ? DBexecute() in include/db.inc.php:237
      
      SQL (0.00175): SELECT i.itemid,i.key_,i.name,i.value_type,i.hostid,i.valuemapid,i.history,i.trends FROM items i WHERE i.flags IN (0,4) AND i.itemid='28286'
      history.php:80 ? CFrontendApiWrapper->get() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CItem->get() ? DBselect() in include/classes/api/services/CItem.php:364
      
      SQL (0.001396): SELECT h.hostid,h.name FROM hosts h WHERE h.flags IN (0,4) AND h.hostid='10254' AND h.status IN (0,1,3)
      history.php:80 ? CFrontendApiWrapper->get() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CItem->get() ? CItem->addRelatedObjects() ? CItemGeneral->addRelatedObjects() ? CHost->get() ? DBselect() in include/classes/api/services/CHost.php:429
      
      SQL (0.000168): COMMIT
      history.php:80 ? CFrontendApiWrapper->get() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? DBend() ? DBcommit() ? DBexecute() in include/db.inc.php:294
      
      SQL (0.00095): SELECT p.value_id,p.source FROM profiles p WHERE p.userid=1 AND p.idx='web.favorite.graphids' ORDER BY p.profileid
      history.php:109 ? CView->render() ? include() ? get_icon() ? CFavorite::exists() ? CFavorite::get() ? DBselect() in include/classes/user/CFavorite.php:56
      
      SQL (0.000463): SELECT type,value_id,value_int,value_str,idx2 FROM profiles WHERE userid=1 AND idx='web.item.graph.period'
      history.php:109 ? CView->render() ? include() ? CScreenBuilder::getScreen() ? CScreenHistory->__construct() ? CScreenBase->__construct() ? calculateTime() ? CProfile::get() ? DBselect() in include/classes/user/CProfile.php:165
      
      SQL (0.000416): SELECT type,value_id,value_int,value_str,idx2 FROM profiles WHERE userid=1 AND idx='web.item.graph.isnow'
      history.php:109 ? CView->render() ? include() ? CScreenBuilder::getScreen() ? CScreenHistory->__construct() ? CScreenBase->__construct() ? calculateTime() ? CProfile::get() ? DBselect() in include/classes/user/CProfile.php:165
      
      SQL (0.000389): SELECT type,value_id,value_int,value_str,idx2 FROM profiles WHERE userid=1 AND idx='web.history.filter.state'
      history.php:109 ? CView->render() ? include() ? CFilter->__construct() ? CProfile::get() ? DBselect() in include/classes/user/CProfile.php:165
      
      SQL (0.000178): BEGIN
      history.php:109 ? CView->render() ? include() ? CScreenHistory->get() ? CFrontendApiWrapper->get() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? DBstart() ? DBexecute() in include/db.inc.php:237
      
      SQL (0.00043): SELECT i.itemid,i.hostid,i.name,i.key_,i.value_type,i.valuemapid,i.history,i.trends FROM items i WHERE i.flags IN (0,4) AND i.itemid='28286'
      history.php:109 ? CView->render() ? include() ? CScreenHistory->get() ? CFrontendApiWrapper->get() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CItem->get() ? DBselect() in include/classes/api/services/CItem.php:364
      
      SQL (0.00045): SELECT h.hostid,h.name FROM hosts h WHERE h.flags IN (0,4) AND h.hostid='10254' AND h.status IN (0,1,3)
      history.php:109 ? CView->render() ? include() ? CScreenHistory->get() ? CFrontendApiWrapper->get() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CItem->get() ? CItem->addRelatedObjects() ? CItemGeneral->addRelatedObjects() ? CHost->get() ? DBselect() in include/classes/api/services/CHost.php:429
      
      SQL (0.000204): COMMIT
      history.php:109 ? CView->render() ? include() ? CScreenHistory->get() ? CFrontendApiWrapper->get() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? DBend() ? DBcommit() ? DBexecute() in include/db.inc.php:294
      
      SQL (0.000689): SELECT type,value_id,value_int,value_str,idx2 FROM profiles WHERE userid=1 AND idx='web.history.timelinefixed'
      history.php:109 ? CView->render() ? include() ? CScreenHistory->get() ? CProfile::get() ? DBselect() in include/classes/user/CProfile.php:165
      
      SQL (0.000398): SELECT type,value_id,value_int,value_str,idx2 FROM profiles WHERE userid=1 AND idx='web.item.graph.timelinefixed'
      history.php:109 ? CView->render() ? include() ? CScreenBuilder::insertScreenStandardJs() ? CScreenBuilder::insertScreenScrollJs() ? CProfile::get() ? DBselect() in include/classes/user/CProfile.php:165
      
      SQL (0.000413): SELECT type,value_id,value_int,value_str,idx2 FROM profiles WHERE userid=1 AND idx='web.paging.lastpage'
      history.php:112 ? require_once() ? CProfile::update() ? CProfile::get() ? DBselect() in include/classes/user/CProfile.php:165
      
      SQL (0.000182): BEGIN
      history.php:112 ? require_once() ? DBstart() ? DBexecute() in include/db.inc.php:237
      
      SQL (0.000478): UPDATE profiles SET value_str='history.php', type=3 WHERE userid=1 AND idx='web.paging.lastpage'
      history.php:112 ? require_once() ? CProfile::flush() ? CProfile::updateDB() ? DBexecute() in include/classes/user/CProfile.php:341
      
      SQL (0.003453): COMMIT
      history.php:112 ? require_once() ? DBend() ? DBcommit() ? DBexecute() in include/db.inc.php:294
      
      
      ElasticSearch (0.021029): POST http://localhost:9200/uint/values/_search
      Request: {"aggs":{"min_clock":{"min":{"field":"clock"}}},"size":0,"query":{"terms":{"itemid":["28286"]}}}
      history.php:109 ? CView->render() ? include() ? CScreenHistory->get() ? CHistoryManager->getMinClock() ? CHistoryManager->getMinClockFromElasticSearch() ? CElasticSearchHelper::query() ? CElasticSearchHelper::request() in include/classes/helpers/CElasticSearchHelper.php:170

        1. Graph.PNG
          32 kB
          Mikhail Markov
        2. Values.PNG
          56 kB
          Mikhail Markov

            vjaceslavs Vjaceslavs Bogdanovs
            mmarkov Mikhail Markov
            Team C
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: