Ad Widget

Collapse

show graphs with 2 days history

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • krusty
    Senior Member
    • Oct 2005
    • 222

    #1

    show graphs with 2 days history

    Hi, does anyone have got an idea how to show graphs with history of 2 days?

    In the include file graphs.inc.php i have added the lines:

    Code:
    function        navigation_bar($url)
    {
    $h2=$h2.form_select("period",2*24*3600,"48h");
    ...
    $h2=$h2.form_select("dec",2*24*3600,"-48h");
    ...
    $h2=$h2.form_select("inc",2*24*3600,"+48h");
    ...
    $h2=$h2.form_select("left",2*24,"-48h");
    ...
    $h2=$h2.form_select("right",2*24,"+48h");
    ...
    $a=array(S_1H=>3600,S_2H=>2*3600,S_4H=>4*3600,S_8H=>8*3600,S_12H=>12*3600,                   
    S_24H=>24*3600,S_48H=>48*3600,S_WEEK_SMALL=>7*24*3600,S_MONTH_SMALL=>31*24*3600,S_YEAR_SMALL=>365*24*3600);
    ...
    $a=array("1h"=>1,"2h"=>2,"4h"=>4,"8h"=>8,"12h"=>12,
    "24h"=>24,"48h"=>48,"week"=>7*24,"month"=>31*24,"year"=>365*24);
    ...
    }
    The values in the graphs are shown rigth. Also the time span but there is no picture shown. Have anyone an idea what i should do???

    Please help, it's very important for me.
  • elkor
    Senior Member
    • Jul 2005
    • 299

    #2
    selecting a 1 day period and then adding 1 day to it from the dropdown boxes should work.

    If you are having issues with the dropdowns resetting after you use them once there is a patch for it in the patches section.

    Comment

    • krusty
      Senior Member
      • Oct 2005
      • 222

      #3
      Shit it dosen´t work.

      Originally posted by elkor
      selecting a 1 day period and then adding 1 day to it from the dropdown boxes should work.

      If you are having issues with the dropdowns resetting after you use them once there is a patch for it in the patches section.
      Hi, i have made the steps like you have created in this link. I see that the timespan is 2 days and the values are okay too. But i dont see any graph. The discription in the link is from an older version. Isn't it? I have change the variable $_REQUEST["..."] into $_GET["..."] because i use the 1.1beta2 version. But this couldn´t be the error. Have you any idea what i have to do to fix my problem?

      Comment

      • cameronsto
        Senior Member
        • Oct 2005
        • 148

        #4
        Same thing happens for me. Steps to reproduce:
        1. Open graph.
        2. Change period to 24h
        3. Increase +24h
        4. Graph but no plotted line.

        -cameron

        Comment

        • krusty
          Senior Member
          • Oct 2005
          • 222

          #5
          Originally posted by cameronsto
          Same thing happens for me. Steps to reproduce:
          1. Open graph.
          2. Change period to 24h
          3. Increase +24h
          4. Graph but no plotted line.

          -cameron
          You are so right. That´s the problem i´ve had too.

          Comment

          • elkor
            Senior Member
            • Jul 2005
            • 299

            #6
            It works here.

            that being said.. I think I may know what the problem is. I have changed my default value to pull from history when the time < 7days (the normal default I believe is 24 hours) once this threshold is crossed, it pulls data from the trends table. What may be occuring is that it is attempting to pull data from trends and it just isn't there (or some other inconsistancy).

            to test.. search include/classes.inc.php for "if($this->period<=24*3600)" and increase 24 to a higher number of hours (I used 168) then try again. note: don't make this value more than the amount of history you are retaining for your items.

            Comment

            • krusty
              Senior Member
              • Oct 2005
              • 222

              #7
              Originally posted by elkor
              to test.. search include/classes.inc.php for "if($this->period<=24*3600)" and increase 24 to a higher number of hours (I used 168) then try again. note: don't make this value more than the amount of history you are retaining for your items.
              Hi, i have checked this but all graph shown trash. I think there is no good idea to change parameters like this. I get graphs with 48h range with values on the bottem, but i do not get a graph. I think there is a bug in source code.

              Comment

              • elkor
                Senior Member
                • Jul 2005
                • 299

                #8
                you are right, it's not generally good practice without a user configurable option. I set mine that way locally because I need the higher resolution graphs for several reports.

                That being said, I'm still running 1.1b2 locally until I get time to upgrade so it could be a bug in versions greater than that.

                Comment

                • krusty
                  Senior Member
                  • Oct 2005
                  • 222

                  #9
                  I have checked version 1.1beta3 and 1.1beta4 but this versions have to many bugs. I downgrade to 1.1beta2 and modifid this version.

                  But when i changed the parameter into include/classes.inc.php for "if($this->period<=24*3600)" and increase 24 to a higher number of hours maybe 48 hours i got no graph. Do you change another parameter?

                  @developers, could somebody inform us about this bug???

                  Thanks

                  Comment

                  • elkor
                    Senior Member
                    • Jul 2005
                    • 299

                    #10
                    no, that is the only thing I changed in relation to this particular problem.

                    I did have an issue with missing data for graphs that I described elsewhere on this forum but the graph always displayed.

                    it's only for 2 day time periods that you get nothing? 1 day works fine as does 1 week, etc?

                    are there actually values in the database for this?

                    Comment

                    • krusty
                      Senior Member
                      • Oct 2005
                      • 222

                      #11
                      I only do not see any graph when select 2 days history. Every other graph is shown. Any idea?

                      Comment

                      • krusty
                        Senior Member
                        • Oct 2005
                        • 222

                        #12
                        Hi, could somebody help me with this problem? I want to show one graph with 2day history. When I choose this option in graphs I only get the value but there is no graph. Please help me I need this function.

                        Comment

                        • Alexei
                          Founder, CEO
                          Zabbix Certified Trainer
                          Zabbix Certified SpecialistZabbix Certified Professional
                          • Sep 2004
                          • 5654

                          #13
                          Version of ZABBIX?
                          Alexei Vladishev
                          Creator of Zabbix, Product manager
                          New York | Tokyo | Riga
                          My Twitter

                          Comment

                          • krusty
                            Senior Member
                            • Oct 2005
                            • 222

                            #14
                            Originally posted by Alexei
                            Version of ZABBIX?
                            I check version 1.1beta3 beta4 and beta2. I still run 1.1beta2 because this version is more stable.

                            Comment

                            • krusty
                              Senior Member
                              • Oct 2005
                              • 222

                              #15
                              Hi Alexei and the others

                              I have made some screenshot that shows my problem. Today i have updated my zabbix server to 1.1beta5. I don´t get any errors or problems. Nice work. But the problem with the graphs is still in this new version. I do not get any graphs with 2 or more days history. Please show the images.

                              @all, i wish you a happy new year, and a fantastic zabbix tool.
                              Attached Files

                              Comment

                              Working...