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

"Failed to parse time string" runtime error observed for graphs with items without data

    XMLWordPrintable

Details

    • Problem report
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • 6.0.5rc1, 6.2.0beta3
    • None
    • Frontend (F)
    • Technical backlog

    Description

      Problem description: the following runtime error is observed when a user previews or opens is view mode (in Monitoring => Hosts => Graphs ) a graph that has some specific item (for example the Host local time item) with "Y axis MAX value" set to Calculated and that doesn't have any values to show yet:

      Exception: DateTime::__construct(): Failed to parse time string (@0.2) at position 3 (2): Unexpected character in /home/sergejs/workspace/6.0/ui/include/func.inc.php:205
      Stack trace:
      #0 /home/sergejs/workspace/6.0/ui/include/func.inc.php(205): DateTime->__construct()
      #1 /home/sergejs/workspace/6.0/ui/include/func.inc.php(689): zbx_date2str()
      #2 /home/sergejs/workspace/6.0/ui/include/func.inc.php(631): convertUnitsRaw()
      #3 /home/sergejs/workspace/6.0/ui/include/graphs.inc.php(965): convertUnits()
      #4 /home/sergejs/workspace/6.0/ui/include/classes/graphdraw/CLineGraphDraw.php(1172): calculateGraphScaleValues()
      #5 /home/sergejs/workspace/6.0/ui/include/classes/graphdraw/CLineGraphDraw.php(2093): CLineGraphDraw->drawVerticalScale()
      #6 /home/sergejs/workspace/6.0/ui/chart3.php(194): CLineGraphDraw->draw()
      #7 {main}
      

      Steps to reproduce:

      1. Make sure Zabbix server isn't running
      2. Create a host with the Host local time item
      3. Navigate to Graphs section for this host and press "Create graph" button
      4. In the opened form select the Host local time item and set "Y axis MAX value" set to "Calculated".
      5. Switch to the "Preview" tab

      Result: the above runtime error is observed, the graph is not loaded. This runtime error is also observed when opening the graph in Monitoring => Hosts => Graphs view
      Expected: no runtime errors should be observed, empty graph should be displayed

      Attachments

        Issue Links

          Activity

            People

              zabbix.dev Zabbix Development Team
              solonkins Sergejs Olonkins
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: