Ad Widget

Collapse

48 Hour Graphs not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #1

    48 Hour Graphs not working

    It seems that every time I attempt to get a 48 hour graph I get empty graphs. Currently we're running 1.1.

    This happens with both individual and screen views. To reproduce I first select a 24 hour graph, then increase it by 24 hours.

    Is anyone else seeing this same behavior?
    RHCE, author of zbxapi
    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

  • peter_field
    Member
    • Jun 2006
    • 71

    #2
    Same here

    Yes, I can reproduce this. Running 1.1.2.

    Display a graph over 24 hours, add 24 hours, and all I get is a little sample of data on the left of the graph, and I cant move left or right.

    If I change to week, month, or year I have data.

    I can also change to week view and decrease by 24 hours at a time, which works right down to 3 days, but when it goes to 2 days, same problem.

    Also interesting is when I move left or right in 2 day view, the working time moves, but the small sample of data on the left of the graph doesn't move or change.
    Last edited by peter_field; 09-10-2006, 01:18. Reason: Typo - said can instead of cant

    Comment

    • alj
      Senior Member
      • Aug 2006
      • 188

      #3
      Try to open your php.ini and double memory settings.

      I have memory_limit = 16M and it works, it didnt work with 8M.

      You probably will have to reload your apache after that.

      Comment

      • peter_field
        Member
        • Jun 2006
        • 71

        #4
        Didn't work

        I set the memory_limit to 16M and restarted and still it doesn't work. It does works for 1 day, and for 3 days, but not 2 days. Seems weird.

        Comment

        • cadbury
          Member
          • Apr 2005
          • 77

          #5
          I have the same problem here, no 48h graph
          I tried to set memory_limit to 16M, same behavior
          but in my phpinfo, i found in the configure command '--disable-memory-limit'
          so i'm not sure this will fix anything for me

          Comment

          • AlfieRB
            Junior Member
            • Oct 2006
            • 16

            #6
            I have the exact same problem using version 1.1.2. My memory limit is also set to 16M, and it seems to make no difference. And stops working at 2d, but seems to start working again between 2.5 and 3 days. Anyone have any insight?

            Comment

            • muthukrishan
              Junior Member
              • Oct 2006
              • 1

              #7
              Iam using version 1.1.2 and the graphs are not showing for 1Hr average, but it is able to show for 2 Hrs, etc.

              Muthu

              Comment

              • jojo
                Member
                • Jul 2006
                • 57

                #8
                I'm having the same problem. Have a look at the my last post in my thread to see if you've got a similar setup:

                Comment

                • cadbury
                  Member
                  • Apr 2005
                  • 77

                  #9
                  after some tests, it start screwing at 25h, and it go well after 3d2h for me

                  Comment

                  • peter_field
                    Member
                    • Jun 2006
                    • 71

                    #10
                    My config

                    Heres a sample of one of my configs:

                    PIII 700Mhz 512MB
                    Debian 3.1

                    Code:
                    # cat /etc/php4/apache2/php.ini | grep memory_limit
                    memory_limit = 32M      ; Maximum amount of memory a script may consume (8MB)
                    Code:
                    # apt-show-versions | grep apache2
                    apache2-mpm-prefork/stable upgradeable from 2.0.54-5 to 2.0.54-5sarge1
                    apache2/stable upgradeable from 2.0.54-5 to 2.0.54-5sarge1
                    apache2-common/stable upgradeable from 2.0.54-5 to 2.0.54-5sarge1
                    apache2-utils/stable upgradeable from 2.0.54-5 to 2.0.54-5sarge1
                    libapache2-mod-php4/stable uptodate 4:4.3.10-16
                    Code:
                    # apt-show-versions | grep php
                    php4-gd/stable uptodate 4:4.3.10-16
                    php4-mysql/stable uptodate 4:4.3.10-16
                    php4-common/stable uptodate 4:4.3.10-16
                    php4/stable uptodate 4:4.3.10-16
                    libapache2-mod-php4/stable uptodate 4:4.3.10-16
                    Code:
                    # apt-show-versions | grep mysql
                    php4-mysql/stable uptodate 4:4.3.10-16
                    libmysqlclient12-dev/stable uptodate 4.0.24-10sarge2
                    mysql-common/stable uptodate 4.0.24-10sarge2
                    mysql-server/stable uptodate 4.0.24-10sarge2
                    libdbd-mysql-perl/stable uptodate 2.9006-1
                    libmysqlclient12/stable uptodate 4.0.24-10sarge2
                    mysql-client/stable uptodate 4.0.24-10sarge2

                    Comment

                    • jojo
                      Member
                      • Jul 2006
                      • 57

                      #11
                      I know this sounds stupid but make sure your using the correct libs/frontend with your version of zabbix.

                      I am still having this problem with 1.1.2 so i ended up downgrading back to 1.1.1 and that worked for the time being.

                      New versions of zabbix are able to be added and changed quite easily with the setup i've got here. Heres an idea (we're able to select between 1.1, 1.1.1 and 1.1.2):

                      All we need to do is do a service zabbix_server stop
                      then change the version variable to 1.1.2 and save the file.
                      and do a service zabbix_server start and hey presto!

                      Here's the /etc/rc.d/init.d/zabbix_server file:
                      HTML Code:
                      #!/bin/bash
                      #
                      # chkconfig: 35 90 10
                      # description:  Starts and stops Zabbix Server using chkconfig
                      #                               Tested on Fedora Core 2 - 5
                      #                               Should work on all Fedora Core versions
                      #
                      # @name:        zabbix_server
                      # @author:      Alexander Hagenah <[email protected]>
                      # @created:     18.04.2006
                      #
                      # Source function library.
                      . /etc/init.d/functions
                      
                      # Variables
                      # Edit these to match your system settings
                      
                              # Zabbix-Directory
                              BASEDIR=/opt/zabbix
                      
                              # version
                              VERSION=1.1.1
                      
                              # Binary File
                              BINARY_NAME=zabbix_server-$VERSION
                      
                              # Full Binary File Call
                              FULLPATH=$BASEDIR/bin/$BINARY_NAME
                      
                              # PID file
                              PIDFILE=/var/run/$BINARY_NAME.pid
                      
                              PHPDIR=$BASEDIR/www
                      
                              # Establish args
                              ERROR=0
                              STOPPING=0
                      
                              REPORT_RECIPIENTS="[email protected]"
                      
                      #
                      # No need to edit the things below
                      #
                      
                      # application checking status
                      if [ -f $PIDFILE  ] && [ -s $PIDFILE ]
                              then
                              PID=`cat $PIDFILE`
                      
                              if [ "x$PID" != "x" ] && kill -0 $PID 2>/dev/null && [ $BINARY_NAME == `ps -e | grep $PID | awk '{print $4}'` ]
                              then
                                      STATUS="$BINARY_NAME (pid `pidof $APP`) running.."
                                      RUNNING=1
                              else
                                      rm -f $PIDFILE
                                      STATUS="$BINARY_NAME (pid file existed ($PID) and now removed) not running.."
                                      RUNNING=0
                              fi
                      else
                              if [ `ps -e | grep $BINARY_NAME | head -1 | awk '{ print $1 }'` ]
                                      then
                                      STATUS="$BINARY_NAME (pid `pidof $APP`, but no pid file) running.."
                              else
                                      STATUS="$BINARY_NAME (no pid file) not running"
                              fi
                              RUNNING=0
                      fi
                      
                      # functions
                      start() {
                              if [ $RUNNING -eq 1 ]
                                      then
                                      echo "$0 $ARG: $BINARY_NAME (pid $PID) already running"
                              else
                                      # use the currect libs for the correct version
                                      rm -f $BASEDIR/lib
                                      ln -s $BASEDIR/libs/$VERSION $BASEDIR/lib
                      
                                      # use the correct frontend for the correct version
                                      rm -f $PHPDIR/zabbix_frontend
                                      ln -s $PHPDIR/$VERSION $PHPDIR/zabbix_frontend
                      
                                      action $"Starting $BINARY_NAME: " $FULLPATH
                                      touch /var/lock/subsys/$BINARY_NAME
                          fi
                      }
                      
                      stop() {
                              echo -n $"Shutting down $BINARY_NAME: "
                              killproc zabbix_server
                              killproc $BINARY_NAME
                              RETVAL=$?
                              echo
                              [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$BINARY_NAME
                              RUNNING=0
                      }
                      
                      mailnotify() {
                                      # Construct a basic message
                                      SUBJECT="[`hostname`] has [re]started"
                                      BODY=/tmp/zabbix_mailout.$$
                                      echo -e "This email is sent when the zabbix server is sent a start command" >> $BODY
                                      echo -e "\nw output:" >> $BODY
                                      w >> $BODY
                                      echo -e "\nlast output:" >> $BODY
                                      last >> $BODY
                      
                                      # Send the notification
                                      mail -s "$SUBJECT" $REPORT_RECIPIENTS < $BODY
                      
                                      # Clean up
                                      rm -f $BODY
                      }
                      # logic
                      case "$1" in
                              start)
                                      mailnotify
                                      start
                                      ;;
                              stop)
                                      stop
                                      ;;
                              status)
                                      status $BINARY_NAME
                                      ;;
                              restart)
                                      mailnotify
                                      stop
                                      start
                                      ;;
                              help|*)
                              echo $"Usage: $0 {start|stop|status|restart|help}"
                                      cat <<EOF
                      
                                              start           - start $BINARY_NAME
                                              stop            - stop $BINARY_NAME
                                              status          - show current status of $BINARY_NAME
                                              restart         - restart $BINARY_NAME if running by sending a SIGHUP or start if not running
                                              help            - this screen
                      
                      EOF
                              exit 1
                              ;;
                      esac
                      
                      exit 0

                      all other zabbix related files are stored in /opt/zabbix

                      there is a new directory structure though:

                      /opt
                      /opt/zabbix
                      /opt/zabbix/bin
                      /opt/zabbix/libs
                      /opt/zabbix/libs/1.1
                      /opt/zabbix/libs/1.1.1
                      /opt/zabbix/libs/1.1.2
                      /opt/zabbix/www
                      /opt/zabbix/www/1.1
                      /opt/zabbix/www/1.1.1
                      /opt/zabbix/www/1.1.2

                      the above file creates soft links to the correct directory. and uses the correct zabbix executable in the bin folder. we have 3 executables there which is zabbix_server-1.1 zabbix_server-1.1.1 zabbix_server-1.1.2

                      so with a new release it's a whole lot easier to manage

                      Comment

                      • cadbury
                        Member
                        • Apr 2005
                        • 77

                        #12
                        Originally posted by Palmertree
                        I found a temporary fix. I modified the graph.inc.php under selectData function from if($this->period <= 24*3600) to if($this->period <= 71*3600). Could it be that the trends database is empty between 1d1h and 2d13h why the original settings in graph.inc.php do not work.
                        from http://www.zabbix.com/forum/showthread.php?t=4248
                        does anybody else tested this?

                        Comment

                        • alj
                          Senior Member
                          • Aug 2006
                          • 188

                          #13
                          Originally posted by peter_field
                          I set the memory_limit to 16M and restarted and still it doesn't work. It does works for 1 day, and for 3 days, but not 2 days. Seems weird.
                          Actually i noticed - if you select "Period" to +*h (any number of hours) then press "+24h" it breaks graph instantly no matter how many hours was set originally.

                          So it is broken for me too.
                          Zabbix 1.1.2, debian-testing standard package.

                          Comment

                          • cadbury
                            Member
                            • Apr 2005
                            • 77

                            #14
                            Originally posted by Palmertree
                            I found a temporary fix. I modified the graph.inc.php under selectData function from if($this->period <= 24*3600) to if($this->period <= 71*3600). Could it be that the trends database is empty between 1d1h and 2d13h why the original settings in graph.inc.php do not work.
                            after changing graph.inc.php, it work well (for me with 73*3600, i had no graph for 3d and 3d1h else)

                            Comment

                            • richlv
                              Senior Member
                              Zabbix Certified Trainer
                              Zabbix Certified SpecialistZabbix Certified Professional
                              • Oct 2005
                              • 3112

                              #15
                              zabbix 1.1.3, the problem still seems to be there.
                              graphs break in the interval 25h - 2d8h.
                              fix suggested indeed works (i had to set it to 56*3600), but, of course, periods after 2d generate quite slowly.

                              as already suggested, it seems periods between 25h - 2d8h. don't have trend data stored, but frontend believes they have.
                              the fix probably either has to increase this value in the fronted, as done here, or (probably the correct solution) fix trend data not getting stored.

                              it would be nice to receive an upstream fix, as it is pretty trivial for the fronted and probably only slightly more difficult for trend storing

                              edit: oh well, here's the simplest patch ever, for 1.1.3 (it seems missing periods change over versions...)
                              as usual, -p 1 from the frontend index directory itself.
                              Attached Files
                              Last edited by richlv; 30-10-2006, 18:00.
                              Zabbix 3.0 Network Monitoring book

                              Comment

                              Working...