Ad Widget

Collapse

graphing

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • elkor
    Senior Member
    • Jul 2005
    • 299

    #1

    graphing

    I had been having an issue with 1 hour graphs since I started running the alpha11 frontend

    they had odd graphical dropouts to spite the fact there was data present in the DB for these times, furthermore the more hosts I added to the system the more prevelent these dropouts seemed to get. for example


    in chasing this down I was led to the select statement in include/classes.inc.php on line 510(I think). the line reads:
    Code:
    $sql="select itemid,round(900*((clock+$z)%($p))/($p),0) as i,count(*) as count,avg(value) as avg,min(value) as min,max(value) as max,max(clock) as clock from history where itemid in ($str) and clock>=".$thi        s->from_time." and clock<=".$this->to_time." group by itemid,round(900*((clock+$z)%($p))/($p),0)";
    by modifying it slightly and removing the max(clock) as clock item from the select I was able to get the graphs working properly.

    new select statement:
    Code:
     $sql="select itemid,round(900*((clock+$z)%($p))/($p),0) as i,count(*) as count,avg(value) as avg,min(value) as min,max(value) as max from history where itemid in ($str) and clock>=".$this->from_time." and clock<=".$this-        >to_time." group by itemid,round(900*((clock+$z)%($p))/($p),0)";
    resulting graph:


    could somebody with a little more knowledge into the structure of zabbix shine some light on to just why this particular data point caused such strange behaviour on the graphs and what is it intended to do? I just started wading through the code and making some customizations and fixing this was key but I don't want to break other functionality because of this change either.

    was anyone else having this issue?

    ps: sorry for the wide graphs, it's getting late and I'm about to go home.. didn't have time to resize them.
  • elkor
    Senior Member
    • Jul 2005
    • 299

    #2
    so no ideas? was this just a bug or was there a reason the item was in the query? I'm happy enough with the edited code, just wondering if I'm going to have to re-edit this when beta1 comes along

    Comment

    • elkor
      Senior Member
      • Jul 2005
      • 299

      #3
      Had this issue with the beta frontend as well. Am I the only one seeing this?

      Am I just being stupid? (like THAT never happens.... )

      Comment

      • Nate Bell
        Senior Member
        • Feb 2005
        • 141

        #4
        Wow! I just made that change and all of a sudden those strange pesky holes got filled! That's really cool, and a lot more useful to look at. Thanks for the tip.

        Nate

        Comment

        • dhackd
          Junior Member
          • Sep 2005
          • 14

          #5
          Same issue..

          I had the same issue as you... I made the change.. The only one that is messed up now.. is the "1h" graph.. All of the others look fine..

          dhackd

          Comment

          • James Wells
            Senior Member
            • Jun 2005
            • 664

            #6
            Greetings,

            This has been fixed in CVS. Thanx Elkor
            Unofficial Zabbix Developer

            Comment

            • volkerjaenisch
              Junior Member
              • Dec 2005
              • 7

              #7
              Originally posted by James Wells
              Greetings,

              This has been fixed in CVS. Thanx Elkor
              But not in 1.1beta4.
              Just found the code Elkor mentioned as faulty in line 508.

              Best regards,

              Volker

              Comment

              Working...