Ad Widget

Collapse

Zabbix 1.5.4 Build-5784 - Simple Graphs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Palmertree
    Senior Member
    • Sep 2005
    • 746

    #1

    Zabbix 1.5.4 Build-5784 - Simple Graphs

    Zabbix 1.5.4 Build-5784 - Simple Graphs

    Simple graphs do not work. A blank screen is shown when clicking graph from latest data. After I got the graphs to work again if a user changes the time period, the time period will reset back to 3600 seconds if the screen refreshes. Looks like the new time period is not storing in the user's profile correctly.

    Change the following lines in history.php back to the old code and it worked but graph time periods will go back to 3600 seconds when the screen refreshes.

    Code:
    172c172
    <                               $icon->AddAction('onclick',new CScript('javascript: rm4favorites('itemid',''.$_REQUEST['itemid'].'',0);'));
    ---
    >                               $icon->AddAction('onclick',new CScript("javascript: rm4favorites('itemid','".$_REQUEST['itemid']."',0);"));
    177c177
    <                               $icon->AddAction('onclick',new CScript('javascript: add2favorites('itemid',''.$_REQUEST['itemid'].'');'));
    ---
    >                               $icon->AddAction('onclick',new CScript("javascript: add2favorites('itemid','".$_REQUEST['itemid']."');"));
    Last edited by Palmertree; 24-06-2008, 06:33.
  • Palmertree
    Senior Member
    • Sep 2005
    • 746

    #2
    Found the problem with graph time periods and refreshes. In chart.php modifiy the following:

    Code:
    diff -ruN zabbix-original/frontends/php/chart.php zabbix/frontends/php/chart.php
    --- zabbix-original/frontends/php/chart.php     2008-05-23 05:30:10.000000000 -0400
    +++ zabbix/frontends/php/chart.php      2008-06-23 10:15:34.000000000 -0400
    @@ -61,9 +61,9 @@
    
            $effectiveperiod = navigation_bar_calc();
    
    -       $_REQUEST['period'] = get_request('period',get_profile('web.item['.$_REQUEST['itemid'].'].graph.period', ZBX_PERIOD_DEFAULT));
    +       $_REQUEST['period'] = get_request('period',get_profile('web.item.graph.period', ZBX_PERIOD_DEFAULT, PROFILE_TYPE_INT, $_REQUEST['itemid']));
            if($_REQUEST['period'] >= ZBX_MIN_PERIOD){
    -               update_profile('web.item['.$_REQUEST['itemid'].'].graph.period',$_REQUEST['period']);
    +               update_profile('web.item.graph.period',$_REQUEST['period'], PROFILE_TYPE_INT, $_REQUEST['itemid']);
            }

    Comment

    • boxdreamer
      Junior Member
      • Mar 2008
      • 5

      #3
      Added the patch, doesn't fix the problem

      I applied your patch to my 1.5.4 installation. Doesn't fix the problem.
      I can see the data, but after a refresh of the screen, the data is gone
      again.

      Greetz,
      Karl

      Comment

      • Palmertree
        Senior Member
        • Sep 2005
        • 746

        #4
        Make sure you update the schema for the profiles table. It changed under the latest svn release. Also, I remember that I had to clean my profile table data to get rid of old stuff to make it work correctly. You will loose your favorites and stuff in the dashboard though...

        Comment

        • boxdreamer
          Junior Member
          • Mar 2008
          • 5

          #5
          No success

          Did yesterday a fresh install from svn. No success.
          Added your patches also no success.
          Deleted all rows from the profiles tables and updated the table with the patch from the upgrade directory.
          Still no success.
          I see only data when I change the timeframe. The next refresh the data is gone.

          Cheers,
          Karl

          Comment

          • Aly
            ZABBIX developer
            • May 2007
            • 1126

            #6
            Fixed. Thank You. rev. 5788
            Zabbix | ex GUI developer

            Comment

            • Palmertree
              Senior Member
              • Sep 2005
              • 746

              #7
              Thanks Aly.

              Comment

              • Palmertree
                Senior Member
                • Sep 2005
                • 746

                #8
                Originally posted by boxdreamer
                Did yesterday a fresh install from svn. No success.
                Added your patches also no success.
                Deleted all rows from the profiles tables and updated the table with the patch from the upgrade directory.
                Still no success.
                I see only data when I change the timeframe. The next refresh the data is gone.

                Cheers,
                Karl
                When you are viewing a graph, select "500 latest values" to see how far apart your polling periods are. Also is your time frame greater than 24 hours? After 24 hours I believe is when the trends database kicks in?

                Comment

                Working...